Versions in this module Expand all Collapse all v1 v1.0.50 Nov 27, 2020 Changes in this version + const Delimiter + var DialTimeout = dialTimeout + var NewClient = DialClient + var RequestTimeout = requestTimeout + type EtcdClient interface + ActiveConnection func() *grpc.ClientConn + Close func() error + Ctx func() context.Context + Get func(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) + Grant func(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error) + KeepAlive func(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error) + Put func(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) + Revoke func(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error) + Watch func(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan + func DialClient(endpoints []string) (EtcdClient, error) + type KV struct + Key string + Val string + type Listener interface + OnUpdate func(keys []string, values []string, newKey string) + type MockEtcdClient struct + func NewMockEtcdClient(ctrl *gomock.Controller) *MockEtcdClient + func (m *MockEtcdClient) ActiveConnection() *grpc.ClientConn + func (m *MockEtcdClient) Close() error + func (m *MockEtcdClient) Ctx() context.Context + func (m *MockEtcdClient) EXPECT() *MockEtcdClientMockRecorder + func (m *MockEtcdClient) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) + func (m *MockEtcdClient) Grant(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error) + func (m *MockEtcdClient) KeepAlive(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error) + func (m *MockEtcdClient) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) + func (m *MockEtcdClient) Revoke(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error) + func (m *MockEtcdClient) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan + type MockEtcdClientMockRecorder struct + func (mr *MockEtcdClientMockRecorder) ActiveConnection() *gomock.Call + func (mr *MockEtcdClientMockRecorder) Close() *gomock.Call + func (mr *MockEtcdClientMockRecorder) Ctx() *gomock.Call + func (mr *MockEtcdClientMockRecorder) Get(ctx, key interface{}, opts ...interface{}) *gomock.Call + func (mr *MockEtcdClientMockRecorder) Grant(ctx, ttl interface{}) *gomock.Call + func (mr *MockEtcdClientMockRecorder) KeepAlive(ctx, id interface{}) *gomock.Call + func (mr *MockEtcdClientMockRecorder) Put(ctx, key, val interface{}, opts ...interface{}) *gomock.Call + func (mr *MockEtcdClientMockRecorder) Revoke(ctx, id interface{}) *gomock.Call + func (mr *MockEtcdClientMockRecorder) Watch(ctx, key interface{}, opts ...interface{}) *gomock.Call + type MockUpdateListener struct + func NewMockUpdateListener(ctrl *gomock.Controller) *MockUpdateListener + func (m *MockUpdateListener) EXPECT() *MockUpdateListenerMockRecorder + func (m *MockUpdateListener) OnAdd(kv KV) + func (m *MockUpdateListener) OnDelete(kv KV) + type MockUpdateListenerMockRecorder struct + func (mr *MockUpdateListenerMockRecorder) OnAdd(kv interface{}) *gomock.Call + func (mr *MockUpdateListenerMockRecorder) OnDelete(kv interface{}) *gomock.Call + type MocketcdConn struct + func NewMocketcdConn(ctrl *gomock.Controller) *MocketcdConn + func (m *MocketcdConn) EXPECT() *MocketcdConnMockRecorder + func (m *MocketcdConn) GetState() connectivity.State + func (m *MocketcdConn) WaitForStateChange(ctx context.Context, sourceState connectivity.State) bool + type MocketcdConnMockRecorder struct + func (mr *MocketcdConnMockRecorder) GetState() *gomock.Call + func (mr *MocketcdConnMockRecorder) WaitForStateChange(ctx, sourceState interface{}) *gomock.Call + type Registry struct + func GetRegistry() *Registry + func (r *Registry) GetConn(endpoints []string) (EtcdClient, error) + func (r *Registry) Monitor(endpoints []string, key string, l UpdateListener) error + type UpdateListener interface + OnAdd func(kv KV) + OnDelete func(kv KV)