(ctx context.Context, nodeID uint64, peer string)
| 344 | } |
| 345 | |
| 346 | func (n *Node) AddPeer(ctx context.Context, nodeID uint64, peer string) error { |
| 347 | cc := raftpb.ConfChange{ |
| 348 | Type: raftpb.ConfChangeAddNode, |
| 349 | NodeID: nodeID, |
| 350 | Context: []byte(peer), |
| 351 | } |
| 352 | return n.raftNode.ProposeConfChange(ctx, cc) |
| 353 | } |
| 354 | |
| 355 | func (n *Node) RemovePeer(ctx context.Context, nodeID uint64) error { |
| 356 | cc := raftpb.ConfChange{ |
no outgoing calls