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

Function NewClusterNode

store/cluster_node.go:98–106  ·  view source on GitHub ↗
(addr, password string)

Source from the content-addressed store, hash-verified

96}
97
98func NewClusterNode(addr, password string) *ClusterNode {
99 return &ClusterNode{
100 id: util.GenerateNodeID(),
101 addr: addr,
102 password: password,
103 role: RoleMaster,
104 createdAt: time.Now().Unix(),
105 }
106}
107
108func (n *ClusterNode) ID() string {
109 return n.id

Callers 8

CreateMethod · 0.92
TestShardBasicsFunction · 0.92
TestClusterImportFunction · 0.92
ImportMethod · 0.92
NewClusterMockNodeFunction · 0.85
addNodeMethod · 0.85
TestClusterNodeFunction · 0.85
NewClusterFunction · 0.85

Calls 1

GenerateNodeIDFunction · 0.92

Tested by 3

TestShardBasicsFunction · 0.74
TestClusterImportFunction · 0.74
TestClusterNodeFunction · 0.68