MCPcopy
hub / github.com/fagongzi/manba / EtcdStore

Struct EtcdStore

pkg/store/store_etcd.go:41–61  ·  view source on GitHub ↗

EtcdStore etcd store impl

Source from the content-addressed store, hash-verified

39
40// EtcdStore etcd store impl
41type EtcdStore struct {
42 sync.RWMutex
43
44 prefix string
45 clustersDir string
46 serversDir string
47 bindsDir string
48 apisDir string
49 proxiesDir string
50 routingsDir string
51 idPath string
52
53 idLock sync.Mutex
54 base uint64
55 end uint64
56
57 evtCh chan *Evt
58 watchMethodMapping map[EvtSrc]func(EvtType, *mvccpb.KeyValue) *Evt
59
60 rawClient *clientv3.Client
61}
62
63// NewEtcdStore create a etcd store
64func NewEtcdStore(etcdAddrs []string, prefix string, basicAuth BasicAuth) (Store, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected