sticky sessions
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 27s

This commit is contained in:
matst80
2024-11-09 01:26:46 +01:00
parent 0c58b3fdbf
commit 82dcd7871c
3 changed files with 17 additions and 9 deletions

View File

@@ -2,19 +2,19 @@ package main
type SyncedPool struct {
local *GrainLocalPool
remotes []RemoteGrainPool
remotes []*RemoteGrainPool
remoteIndex map[CartId]*RemoteGrainPool
}
func NewSyncedPool(local *GrainLocalPool) *SyncedPool {
return &SyncedPool{
local: local,
remotes: make([]RemoteGrainPool, 0),
remotes: make([]*RemoteGrainPool, 0),
remoteIndex: make(map[CartId]*RemoteGrainPool),
}
}
func (p *SyncedPool) AddRemote(remote RemoteGrainPool) {
func (p *SyncedPool) AddRemote(remote *RemoteGrainPool) {
p.remotes = append(p.remotes, remote)
// get all available grains from remote, and start syncing
}