Skip to content

Commit

Permalink
doc(peer)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Tiger Chow committed Nov 5, 2014
1 parent 074722c commit 550b98b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ type Map map[u.Key]Peer
// Peer represents the identity information of an IPFS Node, including
// ID, and relevant Addresses.
type Peer interface {

// TODO reduce the peer interface to be read-only. Force mutations to occur

This comment has been minimized.

Copy link
@btc

btc Dec 19, 2014

Contributor

@jbenet =)

// on the peer store eg. peerstore.SetLatency(peerId, value).

// ID returns the peer's ID
ID() ID

Expand Down Expand Up @@ -102,6 +106,8 @@ type peer struct {
privKey ic.PrivKey
pubKey ic.PubKey

// TODO move latency away from peer into the package that uses it. Instead,
// within that package, map from ID to latency value.
latency time.Duration

sync.RWMutex
Expand Down

0 comments on commit 550b98b

Please sign in to comment.