use node name for state
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m46s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m46s
This commit is contained in:
3
main.go
3
main.go
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user