move interface method to more appropriate location

This commit is contained in:
Jeromy 2016-04-20 10:11:01 -07:00 committed by Jeromy
parent d98569b4c1
commit 6d94c67e2a

View File

@ -33,11 +33,6 @@ type Peerstore interface {
// that peer, useful to other services.
PeerInfo(ID) PeerInfo
// AddrStream returns a channel that gets all addresses for a given
// peer sent on it. If new addresses are added after the call is made
// they will be sent along through the channel as well.
AddrStream(context.Context, ID) <-chan ma.Multiaddr
// Get/Put is a simple registry for other peer-related key/value pairs.
// if we find something we use often, it should become its own set of
// methods. this is a last resort.
@ -67,6 +62,11 @@ type AddrBook interface {
// Addresses returns all known (and valid) addresses for a given
Addrs(p ID) []ma.Multiaddr
// AddrStream returns a channel that gets all addresses for a given
// peer sent on it. If new addresses are added after the call is made
// they will be sent along through the channel as well.
AddrStream(context.Context, ID) <-chan ma.Multiaddr
// ClearAddresses removes all previously stored addresses
ClearAddrs(p ID)
}