SetPeer sets the address of the peer with the given id. The address must not be empty.
(pid uint64, addr string)
| 229 | |
| 230 | // SetPeer sets the address of the peer with the given id. The address must not be empty. |
| 231 | func (n *Node) SetPeer(pid uint64, addr string) { |
| 232 | x.AssertTruef(addr != "", "SetPeer for peer %d has empty addr.", pid) |
| 233 | n.Lock() |
| 234 | defer n.Unlock() |
| 235 | n.peers[pid] = addr |
| 236 | } |
| 237 | |
| 238 | // Send sends the given RAFT message from this node. |
| 239 | func (n *Node) Send(msg *raftpb.Message) { |
no test coverage detected