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

Method GetClusterNodesString

store/cluster_node.go:236–242  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

234}
235
236func (n *ClusterNode) GetClusterNodesString(ctx context.Context) (string, error) {
237 clusterNodesStr, err := n.GetClient().ClusterNodes(ctx).Result()
238 if err != nil {
239 return "", err
240 }
241 return strings.TrimRight(clusterNodesStr, "\n"), nil
242}
243
244func (n *ClusterNode) SyncClusterInfo(ctx context.Context, cluster *Cluster) error {
245 clusterStr, err := cluster.ToSlotString()

Callers 2

TestClusterNodeFunction · 0.95
ImportMethod · 0.95

Calls 1

GetClientMethod · 0.95

Tested by 1

TestClusterNodeFunction · 0.76