MCPcopy
hub / github.com/CodisLabs/codis / Rewatch

Method Rewatch

pkg/proxy/jodis.go:84–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82}
83
84func (j *Jodis) Rewatch() (<-chan struct{}, error) {
85 j.mu.Lock()
86 defer j.mu.Unlock()
87 if j.closed {
88 return nil, ErrClosedJodis
89 }
90 w, err := j.client.CreateEphemeral(j.path, j.data)
91 if err != nil {
92 log.WarnErrorf(err, "jodis create node %s failed", j.path)
93 j.watching = false
94 } else {
95 log.Warnf("jodis create node %s", j.path)
96 j.watching = true
97 }
98 return w, err
99}
100
101func (j *Jodis) Start() {
102 j.mu.Lock()

Callers 1

StartMethod · 0.95

Calls 3

WarnErrorfMethod · 0.80
WarnfMethod · 0.80
CreateEphemeralMethod · 0.65

Tested by

no test coverage detected