Peer retrieves the registered peer with the given id.
(id string)
| 479 | |
| 480 | // Peer retrieves the registered peer with the given id. |
| 481 | func (ps *peerSet) Peer(id string) *peer { |
| 482 | ps.lock.RLock() |
| 483 | defer ps.lock.RUnlock() |
| 484 | |
| 485 | return ps.peers[id] |
| 486 | } |
| 487 | |
| 488 | // Len returns if the current number of peers in the set. |
| 489 | func (ps *peerSet) Len() int { |
no outgoing calls
no test coverage detected