mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 14:14:52 +00:00
move InitCluster to Machine
This commit is contained in:
1 parent
31e2b8456f
commit
7e93abb972
5 files changed
+131
-120
No files matched your search
@@ -32,6 +32,12 @@ func (s *State) Load() error {
|
||||
if err = proto.Unmarshal(data, s.State); err != nil {
|
||||
return fmt.Errorf("parse state file %q: %w", s.path, err)
|
||||
}
|
||||
if s.State.Machines == nil {
|
||||
s.State.Machines = make(map[string]*pb.Machine)
|
||||
}
|
||||
if s.State.Endpoints == nil {
|
||||
s.State.Endpoints = make(map[string]*pb.MachineEndpoints)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user