add docs to PeerPicker

This commit is contained in:
Andrew Gerrand 2013-07-24 11:09:53 +10:00
parent 6dad98a783
commit e2abff3bea

View File

@ -35,6 +35,9 @@ type ProtoGetter interface {
// 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)
}