use node name for state
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m46s

This commit is contained in:
matst80
2024-11-09 14:23:59 +01:00
parent 7e0f75bde5
commit 6c81171e66
2 changed files with 3 additions and 2 deletions

View File

@@ -123,10 +123,11 @@ func (s *PoolServer) Serve() *http.ServeMux {
} }
var clientName = os.Getenv("POD_IP") var clientName = os.Getenv("POD_IP")
var name = os.Getenv("POD_NAME")
func main() { func main() {
// Create a new instance of the server // Create a new instance of the server
storage, err := NewDiskStorage(fmt.Sprintf("data/%s_state.gob", clientName)) storage, err := NewDiskStorage(fmt.Sprintf("data/%s_state.gob", name))
if err != nil { if err != nil {
log.Printf("Error loading state: %v\n", err) log.Printf("Error loading state: %v\n", err)
} }

View File

@@ -49,7 +49,7 @@ func NewK8sDiscovery(client *kubernetes.Clientset) *K8sDiscovery {
type Quorum interface { type Quorum interface {
Negotiate(knownHosts []string) ([]string, error) Negotiate(knownHosts []string) ([]string, error)
ListChanged([]CartId) error ElectOwner(CartId) error
} }
type RemoteHost struct { type RemoteHost struct {