From 550b98b7fd60fa1b9dade392a5a634f854f131fb Mon Sep 17 00:00:00 2001
From: Brian Tiger Chow <brian.holderchow@gmail.com>
Date: Tue, 4 Nov 2014 21:39:06 -0800
Subject: [PATCH] doc(peer)

---
 peer/peer.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/peer/peer.go b/peer/peer.go
index 6a5c8a2f6..14617dc2d 100644
--- a/peer/peer.go
+++ b/peer/peer.go
@@ -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
+	// on the peer store eg. peerstore.SetLatency(peerId, value).
+
 	// ID returns the peer's ID
 	ID() ID
 
@@ -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
-- 
GitLab