From 6d94c67e2a9b82bce96bde945e0dcf683b7ae69e Mon Sep 17 00:00:00 2001 From: Jeromy Date: Wed, 20 Apr 2016 10:11:01 -0700 Subject: [PATCH] move interface method to more appropriate location --- peerstore.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/peerstore.go b/peerstore.go index 1cc25c0..9b367f8 100644 --- a/peerstore.go +++ b/peerstore.go @@ -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) }