mirror of https://github.com/xSmurf/oz.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.1 KiB
79 lines
1.1 KiB
package daemon
|
|
import "github.com/subgraph/oz/ipc"
|
|
|
|
const SocketName = "@oz-control"
|
|
|
|
type OkMsg struct {
|
|
_ string "Ok"
|
|
}
|
|
|
|
type ErrorMsg struct {
|
|
Msg string "Error"
|
|
}
|
|
|
|
type PingMsg struct {
|
|
Data string "Ping"
|
|
}
|
|
|
|
type ListProfilesMsg struct {
|
|
_ string "ListProfiles"
|
|
}
|
|
|
|
type Profile struct {
|
|
Index int
|
|
Name string
|
|
Path string
|
|
}
|
|
|
|
type ListProfilesResp struct {
|
|
Profiles []Profile "ListProfilesResp"
|
|
}
|
|
|
|
type LaunchMsg struct {
|
|
Index int "Launch"
|
|
Name string
|
|
}
|
|
|
|
type ListSandboxesMsg struct {
|
|
_ string "ListSandboxes"
|
|
}
|
|
|
|
type SandboxInfo struct {
|
|
Id int
|
|
Address string
|
|
Profile string
|
|
}
|
|
|
|
type ListSandboxesResp struct {
|
|
Sandboxes []SandboxInfo "ListSandboxesResp"
|
|
}
|
|
|
|
type CleanMsg struct {
|
|
Index int "Clean"
|
|
Name string
|
|
}
|
|
|
|
type LogsMsg struct {
|
|
Count int "Logs"
|
|
Follow bool
|
|
}
|
|
|
|
type LogData struct {
|
|
Lines []string "LogData"
|
|
}
|
|
|
|
var messageFactory = ipc.NewMsgFactory(
|
|
new(PingMsg),
|
|
new(OkMsg),
|
|
new(ErrorMsg),
|
|
new(ListProfilesMsg),
|
|
new(ListProfilesResp),
|
|
new(LaunchMsg),
|
|
new(ListSandboxesMsg),
|
|
new(ListSandboxesResp),
|
|
new(CleanMsg),
|
|
new(LogsMsg),
|
|
new(LogData),
|
|
)
|
|
|