NewDHTService will return a new DHTService.
(DHTStorePath string, persistImpl consistent.Persistence, initBP bool)
| 41 | |
| 42 | // NewDHTService will return a new DHTService. |
| 43 | func 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. |
| 53 | func (DHT *DHTService) Nil(req *interface{}, resp *interface{}) (err error) { |