cleanup
This commit is contained in:
@@ -22,6 +22,7 @@ type GrainPool[V any] interface {
|
||||
Negotiate(otherHosts []string)
|
||||
GetLocalIds() []uint64
|
||||
RemoveHost(host string)
|
||||
AddRemoteHost(host string)
|
||||
IsHealthy() bool
|
||||
IsKnown(string) bool
|
||||
Close()
|
||||
|
||||
@@ -157,6 +157,10 @@ func (p *SimpleGrainPool[V]) TakeOwnership(id uint64) {
|
||||
p.broadcastOwnership([]uint64{id})
|
||||
}
|
||||
|
||||
func (p *SimpleGrainPool[V]) AddRemoteHost(host string) {
|
||||
p.AddRemote(host)
|
||||
}
|
||||
|
||||
func (p *SimpleGrainPool[V]) AddRemote(host string) (Host, error) {
|
||||
if host == "" {
|
||||
return nil, fmt.Errorf("host is empty")
|
||||
|
||||
Reference in New Issue
Block a user