MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / AddPeer

Method AddPeer

store/engine/raft/node.go:346–353  ·  view source on GitHub ↗
(ctx context.Context, nodeID uint64, peer string)

Source from the content-addressed store, hash-verified

344}
345
346func (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
355func (n *Node) RemovePeer(ctx context.Context, nodeID uint64) error {
356 cc := raftpb.ConfChange{

Callers 4

runTransportMethod · 0.80
applyEntryMethod · 0.80
AddNodeMethod · 0.80
UpdatePeerMethod · 0.80

Implementers 1

ClusterNodestore/cluster_node.go

Calls

no outgoing calls

Tested by 1

AddNodeMethod · 0.64