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

Function NewDHTService

route/service.go:43–50  ·  view source on GitHub ↗

NewDHTService will return a new DHTService.

(DHTStorePath string, persistImpl consistent.Persistence, initBP bool)

Source from the content-addressed store, hash-verified

41
42// NewDHTService will return a new DHTService.
43func NewDHTService(DHTStorePath string, persistImpl consistent.Persistence, initBP bool) (s *DHTService, err error) {
44 c, err := consistent.InitConsistent(DHTStorePath, persistImpl, initBP)
45 if err != nil {
46 log.WithError(err).Error("init DHT service failed")
47 return
48 }
49 return NewDHTServiceWithRing(c)
50}
51
52// Nil RPC does nothing just for probe.
53func (DHT *DHTService) Nil(req *interface{}, resp *interface{}) (err error) {

Callers 15

initNodeFunction · 0.92
TestMultiChainFunction · 0.92
setupMuxParallelFunction · 0.92
initNodeChainBusServiceFunction · 0.92
initNodeFunction · 0.92
runNodeFunction · 0.92
TestETLSBugFunction · 0.92
TestEncPingFindNeighborFunction · 0.92
TestCaller_CallNodeFunction · 0.92
TestNewPersistentCallerFunction · 0.92

Calls 4

InitConsistentFunction · 0.92
WithErrorFunction · 0.92
NewDHTServiceWithRingFunction · 0.85
ErrorMethod · 0.80

Tested by 15

initNodeFunction · 0.74
TestMultiChainFunction · 0.74
setupMuxParallelFunction · 0.74
initNodeChainBusServiceFunction · 0.74
initNodeFunction · 0.74
TestETLSBugFunction · 0.74
TestEncPingFindNeighborFunction · 0.74
TestCaller_CallNodeFunction · 0.74
TestNewPersistentCallerFunction · 0.74