refactor cluster server to initialise state when initialising cluster, allow machine to be reinitialised

This commit is contained in:
Pavel Sviderski
2024-09-11 14:50:52 +10:00
parent 676f22a935
commit da72c0515a
3 changed files with 121 additions and 77 deletions
+5
View File
@@ -10,6 +10,11 @@ import (
const StateFile = "cluster.pb"
type State struct {
State *pb.State
path string
}
func StatePath(dataDir string) string {
return filepath.Join(dataDir, StateFile)
}