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

Method Start

controller/controller.go:68–78  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

66}
67
68func (c *Controller) Start(ctx context.Context) error {
69 if !c.state.CompareAndSwap(stateInit, stateRunning) {
70 return nil
71 }
72
73 c.wg.Add(1)
74 go c.syncLoop(ctx)
75 c.wg.Add(1)
76 go c.leaderEventLoop()
77 return nil
78}
79
80func (c *Controller) WaitForReady() {
81 <-c.readyCh

Callers 2

addClusterMethod · 0.45
TestController_BasicsFunction · 0.45

Calls 2

syncLoopMethod · 0.95
leaderEventLoopMethod · 0.95

Tested by 1

TestController_BasicsFunction · 0.36