MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / add

Method add

consistent/consistent.go:187–195  ·  view source on GitHub ↗

need c.Lock() before calling.

(node proto.Node)

Source from the content-addressed store, hash-verified

185
186// need c.Lock() before calling.
187func (c *Consistent) add(node proto.Node) (err error) {
188 err = c.persist.SetNode(&node)
189 if err != nil {
190 log.WithField("node", node).WithError(err).Error("set node info failed")
191 return
192 }
193 c.AddCache(node)
194 return
195}
196
197// AddCache only adds c.circle skips persist.
198func (c *Consistent) AddCache(node proto.Node) {

Callers 2

AddMethod · 0.95
SetMethod · 0.95

Calls 5

AddCacheMethod · 0.95
WithFieldFunction · 0.92
ErrorMethod · 0.80
WithErrorMethod · 0.80
SetNodeMethod · 0.65

Tested by

no test coverage detected