1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-07 15:06:47 +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 次删除

查看文件

@@ -12,6 +12,8 @@ import (
type mirrorStatus struct {
Name string
Worker string
IsMaster bool
Status SyncStatus
LastUpdate time.Time
Upstream string
@@ -21,6 +23,8 @@ type mirrorStatus struct {
func (s mirrorStatus) MarshalJSON() ([]byte, error) {
m := map[string]interface{}{
"name": s.Name,
"worker": s.Worker,
"is_master": s.IsMaster,
"status": s.Status,
"last_update": s.LastUpdate.Format("2006-01-02 15:04:05"),
"last_update_ts": fmt.Sprintf("%d", s.LastUpdate.Unix()),