mirror of
https://github.com/mailgun/groupcache.git
synced 2024-10-02 21:02:08 +00:00
add docs to PeerPicker
This commit is contained in:
parent
6dad98a783
commit
e2abff3bea
3
peers.go
3
peers.go
@ -35,6 +35,9 @@ type ProtoGetter interface {
|
|||||||
// PeerPicker is the interface that must be implemented to locate
|
// PeerPicker is the interface that must be implemented to locate
|
||||||
// the peer that owns a specific key.
|
// the peer that owns a specific key.
|
||||||
type PeerPicker interface {
|
type PeerPicker interface {
|
||||||
|
// PickPeer returns the peer that owns the specific key
|
||||||
|
// and true to indicate that a remote peer was nominated.
|
||||||
|
// It returns nil, false if the key owner is the current peer.
|
||||||
PickPeer(key string) (peer ProtoGetter, ok bool)
|
PickPeer(key string) (peer ProtoGetter, ok bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user