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

Method suspend

controller/controller.go:85–92  ·  view source on GitHub ↗

suspend stops the controller from processing events if it's not the leader

()

Source from the content-addressed store, hash-verified

83
84// suspend stops the controller from processing events if it's not the leader
85func (c *Controller) suspend() {
86 c.mu.Lock()
87 for key, cluster := range c.clusters {
88 cluster.Close()
89 delete(c.clusters, key)
90 }
91 c.mu.Unlock()
92}
93
94// resume starts the controller to process events
95func (c *Controller) resume(ctx context.Context) error {

Callers 2

syncLoopMethod · 0.95
CloseMethod · 0.95

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected