Versions in this module Expand all Collapse all v0 v0.3.4 May 10, 2015 v0.3.3 Apr 28, 2015 v0.3.2 Apr 22, 2015 v0.2.3 Feb 27, 2015 v0.2.2 Feb 27, 2015 Changes in this version + const AddressTTL + const ConnectedAddrTTL + const OwnObservedAddrTTL + const PermanentAddrTTL + const ProviderAddrTTL + const RecentlyConnectedAddrTTL + const TempAddrTTL + var LatencyEWMASmoothing = 0.1 + func IDB58Encode(id ID) string + func IDHexEncode(id ID) string + type AddrBook interface + AddAddr func(p ID, addr ma.Multiaddr, ttl time.Duration) + AddAddrs func(p ID, addrs []ma.Multiaddr, ttl time.Duration) + Addrs func(p ID) []ma.Multiaddr + ClearAddrs func(p ID) + SetAddr func(p ID, addr ma.Multiaddr, ttl time.Duration) + SetAddrs func(p ID, addrs []ma.Multiaddr, ttl time.Duration) + type AddrManager struct + func (mgr *AddrManager) AddAddr(p ID, addr ma.Multiaddr, ttl time.Duration) + func (mgr *AddrManager) AddAddrs(p ID, addrs []ma.Multiaddr, ttl time.Duration) + func (mgr *AddrManager) Addrs(p ID) []ma.Multiaddr + func (mgr *AddrManager) ClearAddrs(p ID) + func (mgr *AddrManager) Peers() []ID + func (mgr *AddrManager) SetAddr(p ID, addr ma.Multiaddr, ttl time.Duration) + func (mgr *AddrManager) SetAddrs(p ID, addrs []ma.Multiaddr, ttl time.Duration) + type ID string + func IDB58Decode(s string) (ID, error) + func IDFromBytes(b []byte) (ID, error) + func IDFromPrivateKey(sk ic.PrivKey) (ID, error) + func IDFromPublicKey(pk ic.PubKey) (ID, error) + func IDFromString(s string) (ID, error) + func IDHexDecode(s string) (ID, error) + func PeerInfoIDs(pis []PeerInfo) []ID + func (id ID) Loggable() map[string]interface{} + func (id ID) MatchesPrivateKey(sk ic.PrivKey) bool + func (id ID) MatchesPublicKey(pk ic.PubKey) bool + func (id ID) Pretty() string + func (id ID) String() string + type IDSlice []ID + func (es IDSlice) Len() int + func (es IDSlice) Less(i, j int) bool + func (es IDSlice) Swap(i, j int) + type KeyBook interface + AddPrivKey func(ID, ic.PrivKey) error + AddPubKey func(ID, ic.PubKey) error + PrivKey func(ID) ic.PrivKey + PubKey func(ID) ic.PubKey + type Metrics interface + LatencyEWMA func(ID) time.Duration + RecordLatency func(ID, time.Duration) + func NewMetrics() Metrics + type PeerInfo struct + Addrs []ma.Multiaddr + ID ID + func PeerInfos(ps Peerstore, peers []ID) []PeerInfo + func (pi *PeerInfo) MarshalJSON() ([]byte, error) + func (pi *PeerInfo) UnmarshalJSON(b []byte) error + type Peerstore interface + Get func(id ID, key string) (interface{}, error) + PeerInfo func(ID) PeerInfo + Peers func() []ID + Put func(id ID, key string, val interface{}) error + func NewPeerstore() Peerstore + type Set map[ID]struct