github.com/unionj-cloud/go-doudou/v2@v2.3.5/toolkit/memberlist/merge_delegate.go (about) 1 package memberlist 2 3 // MergeDelegate is used to involve a client in 4 // a potential cluster merge operation. Namely, when 5 // a node does a TCP push/pull (as part of a join), 6 // the delegate is involved and allowed to cancel the join 7 // based on custom logic. The merge delegate is NOT invoked 8 // as part of the push-pull anti-entropy. 9 type MergeDelegate interface { 10 // NotifyMerge is invoked when a merge could take place. 11 // Provides a list of the nodes known by the peer. If 12 // the return value is non-nil, the merge is canceled. 13 NotifyMerge(peers []*Node) error 14 }