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

Function NewClusterChecker

controller/cluster.go:64–82  ·  view source on GitHub ↗
(s store.Store, ns, cluster string)

Source from the content-addressed store, hash-verified

62}
63
64func NewClusterChecker(s store.Store, ns, cluster string) *ClusterChecker {
65 ctx, cancel := context.WithCancel(context.Background())
66 c := &ClusterChecker{
67 namespace: ns,
68 clusterName: cluster,
69
70 clusterStore: s,
71 options: ClusterCheckOptions{
72 pingInterval: time.Second * 3,
73 maxFailureCount: 5,
74 },
75 failureCounts: make(map[string]int64),
76 syncCh: make(chan struct{}, 1),
77
78 ctx: ctx,
79 cancelFn: cancel,
80 }
81 return c
82}
83
84func (c *ClusterChecker) Start() {
85 c.wg.Add(1)

Callers 3

addClusterMethod · 0.85
TestCluster_LoadAndProbeFunction · 0.85
TestCluster_MigrateSlotFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestCluster_LoadAndProbeFunction · 0.68
TestCluster_MigrateSlotFunction · 0.68