안쓰는 필드 제거

This commit is contained in:
2023-06-14 15:30:01 +09:00
parent 279c9f47f0
commit 1c1f9f748a
3 changed files with 43 additions and 69 deletions

View File

@ -16,19 +16,17 @@ type opdef struct {
}
type ProcessSnapshot struct {
Name string
Args []string
Version string
State protos.ProcessState
Pid int32
StdoutSize int32
StderrSize int32
Name string `json:"name"`
Args []string `json:"args"`
Version string `json:"version"`
State protos.ProcessState `json:"state"`
Pid int32 `json:"pid"`
}
type hostWithChan struct {
Hostname string
Procs []*protos.ProcessDescription
Deploys map[string][]*protos.VersionAndArgs
Procs []*protos.ProcessDescription `json:"procs"`
Deploys map[string][]*protos.VersionAndArgs `json:"deploys"`
opChan chan *opdef
}
@ -105,13 +103,11 @@ func (sp *hostPool) allHosts() map[string]hostSnapshot {
procs := make([]ProcessSnapshot, 0, len(v.Procs))
for _, p := range v.Procs {
procs = append(procs, ProcessSnapshot{
Name: p.Name,
Args: p.Args,
Version: p.Version,
State: p.State,
Pid: p.Pid,
StdoutSize: p.StdoutSize,
StderrSize: p.StderrSize,
Name: p.Name,
Args: p.Args,
Version: p.Version,
State: p.State,
Pid: p.Pid,
})
}
out[hn] = hostSnapshot{