commit | e2abff3bea79bb94d5baaed34dd8918b094c5672 | [log] [tgz] |
---|---|---|
author | Andrew Gerrand <adg@golang.org> | Wed Jul 24 11:09:53 2013 +1000 |
committer | Andrew Gerrand <adg@golang.org> | Wed Jul 24 11:09:53 2013 +1000 |
tree | ab8a5c2e3558eabf71cf645cc6832bb229b93641 | |
parent | 6dad98a783706eed16bd2f90356daa33bbc925b2 [diff] |
add docs to PeerPicker
diff --git a/peers.go b/peers.go index 4644640..dfaf5df 100644 --- a/peers.go +++ b/peers.go
@@ -35,6 +35,9 @@ // PeerPicker is the interface that must be implemented to locate // the peer that owns a specific key. 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) }