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

Method Init

cmd/cqld/adapter.go:138–147  ·  view source on GitHub ↗

Init implements consistent.Persistence

(storePath string, initNodes []proto.Node)

Source from the content-addressed store, hash-verified

136
137// Init implements consistent.Persistence
138func (s *KVServer) Init(storePath string, initNodes []proto.Node) (err error) {
139 for _, n := range initNodes {
140 err = s.storage.SetNode(&n)
141 if err != nil {
142 log.WithError(err).Error("init dht kv server failed")
143 return
144 }
145 }
146 return
147}
148
149// SetNode implements consistent.Persistence
150func (s *KVServer) SetNode(node *proto.Node) (err error) {

Callers

nothing calls this directly

Calls 3

WithErrorFunction · 0.92
ErrorMethod · 0.80
SetNodeMethod · 0.65

Tested by

no test coverage detected