1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 06:26:46 +00:00

feature(manager): implement manager server, to be tested

这个提交包含在:
walkerning
2016-04-24 22:33:42 +08:00
提交者 bigeagle
父节点 6062aa4b9d
当前提交 bf31e168a2
共有 6 个文件被更改,包括 341 次插入25 次删除

查看文件

@@ -15,9 +15,10 @@ type StatusUpdateMsg struct {
ErrorMsg string `json:"error_msg"`
}
// A WorkerInfoMsg is
// A WorkerInfoMsg is the information struct that describe
// a worker, and sent from the manager to clients.
type WorkerInfoMsg struct {
Name string `json:"name"`
ID string `json:"id"`
}
type CmdVerb uint8
@@ -30,11 +31,16 @@ const (
CmdPing // ensure the goroutine is alive
)
// A WorkerCmd is the command message send from the
// manager to a worker
type WorkerCmd struct {
Cmd CmdVerb `json:"cmd"`
Args []string `json:"args"`
Cmd CmdVerb `json:"cmd"`
MirrorID string `json:"mirror_id"`
Args []string `json:"args"`
}
// A ClientCmd is the command message send from client
// to the manager
type ClientCmd struct {
Cmd CmdVerb `json:"cmd"`
MirrorID string `json:"mirror_id"`