internal

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package internal is a generated GoMock package.

Package internal is a generated GoMock package.

Package internal is a generated GoMock package.

Package internal is a generated GoMock package.

Index

Constants

View Source
const (
	Delimiter = '/'
)

Variables

View Source
var (
	DialTimeout    = dialTimeout
	RequestTimeout = requestTimeout
	NewClient      = DialClient
)

Functions

This section is empty.

Types

type EtcdClient

type EtcdClient interface {
	ActiveConnection() *grpc.ClientConn
	Close() error
	Ctx() context.Context
	Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
	Grant(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error)
	KeepAlive(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
	Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
	Revoke(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error)
	Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan
}

func DialClient

func DialClient(endpoints []string) (EtcdClient, error)

type KV

type KV struct {
	Key string
	Val string
}

type Listener

type Listener interface {
	OnUpdate(keys []string, values []string, newKey string)
}

type MockEtcdClient

type MockEtcdClient struct {
	// contains filtered or unexported fields
}

MockEtcdClient is a mock of EtcdClient interface

func NewMockEtcdClient

func NewMockEtcdClient(ctrl *gomock.Controller) *MockEtcdClient

NewMockEtcdClient creates a new mock instance

func (*MockEtcdClient) ActiveConnection

func (m *MockEtcdClient) ActiveConnection() *grpc.ClientConn

ActiveConnection mocks base method

func (*MockEtcdClient) Close

func (m *MockEtcdClient) Close() error

Close mocks base method

func (*MockEtcdClient) Ctx

func (m *MockEtcdClient) Ctx() context.Context

Ctx mocks base method

func (*MockEtcdClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockEtcdClient) Get

Get mocks base method

func (*MockEtcdClient) Grant

Grant mocks base method

func (*MockEtcdClient) KeepAlive

KeepAlive mocks base method

func (*MockEtcdClient) Put

func (m *MockEtcdClient) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)

Put mocks base method

func (*MockEtcdClient) Revoke

Revoke mocks base method

func (*MockEtcdClient) Watch

Watch mocks base method

type MockEtcdClientMockRecorder

type MockEtcdClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockEtcdClientMockRecorder is the mock recorder for MockEtcdClient

func (*MockEtcdClientMockRecorder) ActiveConnection

func (mr *MockEtcdClientMockRecorder) ActiveConnection() *gomock.Call

ActiveConnection indicates an expected call of ActiveConnection

func (*MockEtcdClientMockRecorder) Close

func (mr *MockEtcdClientMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockEtcdClientMockRecorder) Ctx

Ctx indicates an expected call of Ctx

func (*MockEtcdClientMockRecorder) Get

func (mr *MockEtcdClientMockRecorder) Get(ctx, key interface{}, opts ...interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockEtcdClientMockRecorder) Grant

func (mr *MockEtcdClientMockRecorder) Grant(ctx, ttl interface{}) *gomock.Call

Grant indicates an expected call of Grant

func (*MockEtcdClientMockRecorder) KeepAlive

func (mr *MockEtcdClientMockRecorder) KeepAlive(ctx, id interface{}) *gomock.Call

KeepAlive indicates an expected call of KeepAlive

func (*MockEtcdClientMockRecorder) Put

func (mr *MockEtcdClientMockRecorder) Put(ctx, key, val interface{}, opts ...interface{}) *gomock.Call

Put indicates an expected call of Put

func (*MockEtcdClientMockRecorder) Revoke

func (mr *MockEtcdClientMockRecorder) Revoke(ctx, id interface{}) *gomock.Call

Revoke indicates an expected call of Revoke

func (*MockEtcdClientMockRecorder) Watch

func (mr *MockEtcdClientMockRecorder) Watch(ctx, key interface{}, opts ...interface{}) *gomock.Call

Watch indicates an expected call of Watch

type MockListener

type MockListener struct {
	// contains filtered or unexported fields
}

MockListener is a mock of Listener interface

func NewMockListener

func NewMockListener(ctrl *gomock.Controller) *MockListener

NewMockListener creates a new mock instance

func (*MockListener) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockListener) OnUpdate

func (m *MockListener) OnUpdate(keys, values []string, newKey string)

OnUpdate mocks base method

type MockListenerMockRecorder

type MockListenerMockRecorder struct {
	// contains filtered or unexported fields
}

MockListenerMockRecorder is the mock recorder for MockListener

func (*MockListenerMockRecorder) OnUpdate

func (mr *MockListenerMockRecorder) OnUpdate(keys, values, newKey interface{}) *gomock.Call

OnUpdate indicates an expected call of OnUpdate

type MockUpdateListener

type MockUpdateListener struct {
	// contains filtered or unexported fields
}

MockUpdateListener is a mock of UpdateListener interface

func NewMockUpdateListener

func NewMockUpdateListener(ctrl *gomock.Controller) *MockUpdateListener

NewMockUpdateListener creates a new mock instance

func (*MockUpdateListener) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockUpdateListener) OnAdd

func (m *MockUpdateListener) OnAdd(kv KV)

OnAdd mocks base method

func (*MockUpdateListener) OnDelete

func (m *MockUpdateListener) OnDelete(kv KV)

OnDelete mocks base method

type MockUpdateListenerMockRecorder

type MockUpdateListenerMockRecorder struct {
	// contains filtered or unexported fields
}

MockUpdateListenerMockRecorder is the mock recorder for MockUpdateListener

func (*MockUpdateListenerMockRecorder) OnAdd

func (mr *MockUpdateListenerMockRecorder) OnAdd(kv interface{}) *gomock.Call

OnAdd indicates an expected call of OnAdd

func (*MockUpdateListenerMockRecorder) OnDelete

func (mr *MockUpdateListenerMockRecorder) OnDelete(kv interface{}) *gomock.Call

OnDelete indicates an expected call of OnDelete

type MocketcdConn

type MocketcdConn struct {
	// contains filtered or unexported fields
}

MocketcdConn is a mock of etcdConn interface

func NewMocketcdConn

func NewMocketcdConn(ctrl *gomock.Controller) *MocketcdConn

NewMocketcdConn creates a new mock instance

func (*MocketcdConn) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MocketcdConn) GetState

func (m *MocketcdConn) GetState() connectivity.State

GetState mocks base method

func (*MocketcdConn) WaitForStateChange

func (m *MocketcdConn) WaitForStateChange(ctx context.Context, sourceState connectivity.State) bool

WaitForStateChange mocks base method

type MocketcdConnMockRecorder

type MocketcdConnMockRecorder struct {
	// contains filtered or unexported fields
}

MocketcdConnMockRecorder is the mock recorder for MocketcdConn

func (*MocketcdConnMockRecorder) GetState

func (mr *MocketcdConnMockRecorder) GetState() *gomock.Call

GetState indicates an expected call of GetState

func (*MocketcdConnMockRecorder) WaitForStateChange

func (mr *MocketcdConnMockRecorder) WaitForStateChange(ctx, sourceState interface{}) *gomock.Call

WaitForStateChange indicates an expected call of WaitForStateChange

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func GetRegistry

func GetRegistry() *Registry

func (*Registry) GetConn

func (r *Registry) GetConn(endpoints []string) (EtcdClient, error)

func (*Registry) Monitor

func (r *Registry) Monitor(endpoints []string, key string, l UpdateListener) error

type UpdateListener

type UpdateListener interface {
	OnAdd(kv KV)
	OnDelete(kv KV)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL