Documentation ¶
Index ¶
- type ETCDClientV3
- func (_m *ETCDClientV3) Close() error
- func (_m *ETCDClientV3) Compact(ctx context.Context, rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
- func (_m *ETCDClientV3) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
- func (_m *ETCDClientV3) Do(ctx context.Context, op clientv3.Op) (clientv3.OpResponse, error)
- func (_m *ETCDClientV3) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
- func (_m *ETCDClientV3) Grant(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error)
- func (_m *ETCDClientV3) KeepAlive(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
- func (_m *ETCDClientV3) KeepAliveOnce(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseKeepAliveResponse, error)
- func (_m *ETCDClientV3) Leases(ctx context.Context) (*clientv3.LeaseLeasesResponse, error)
- func (_m *ETCDClientV3) Put(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
- func (_m *ETCDClientV3) RequestProgress(ctx context.Context) error
- func (_m *ETCDClientV3) Revoke(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error)
- func (_m *ETCDClientV3) TimeToLive(ctx context.Context, id clientv3.LeaseID, opts ...clientv3.LeaseOption) (*clientv3.LeaseTimeToLiveResponse, error)
- func (_m *ETCDClientV3) Txn(ctx context.Context) clientv3.Txn
- func (_m *ETCDClientV3) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan
- type KV
- func (_m *KV) BatchCreate(ctx context.Context, data map[string]string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
- func (_m *KV) BatchCreateAndDecr(ctx context.Context, data map[string]string, decrKey string) error
- func (_m *KV) BatchDelete(ctx context.Context, keys []string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
- func (_m *KV) BatchPut(ctx context.Context, data map[string]string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
- func (_m *KV) BatchUpdate(ctx context.Context, data map[string]string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
- func (_m *KV) BindStatus(ctx context.Context, entityKey string, statusKey string, statusValue string, ...) error
- func (_m *KV) Create(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
- func (_m *KV) CreateLock(key string, ttl time.Duration) (lock.DistributedLock, error)
- func (_m *KV) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
- func (_m *KV) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
- func (_m *KV) GetMulti(ctx context.Context, keys []string, opts ...clientv3.OpOption) ([]*mvccpb.KeyValue, error)
- func (_m *KV) GetOne(ctx context.Context, key string, opts ...clientv3.OpOption) (*mvccpb.KeyValue, error)
- func (_m *KV) Grant(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error)
- func (_m *KV) Put(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
- func (_m *KV) StartEphemeral(ctx context.Context, path string, heartbeat time.Duration) (<-chan struct{}, func(), error)
- func (_m *KV) Update(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
- func (_m *KV) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan
- type Txn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ETCDClientV3 ¶
ETCDClientV3 is an autogenerated mock type for the ETCDClientV3 type
func NewETCDClientV3 ¶
func NewETCDClientV3(t interface { mock.TestingT Cleanup(func()) }) *ETCDClientV3
NewETCDClientV3 creates a new instance of ETCDClientV3. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ETCDClientV3) Close ¶
func (_m *ETCDClientV3) Close() error
Close provides a mock function with given fields:
func (*ETCDClientV3) Compact ¶
func (_m *ETCDClientV3) Compact(ctx context.Context, rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
Compact provides a mock function with given fields: ctx, rev, opts
func (*ETCDClientV3) Delete ¶
func (_m *ETCDClientV3) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
Delete provides a mock function with given fields: ctx, key, opts
func (*ETCDClientV3) Do ¶
func (_m *ETCDClientV3) Do(ctx context.Context, op clientv3.Op) (clientv3.OpResponse, error)
Do provides a mock function with given fields: ctx, op
func (*ETCDClientV3) Get ¶
func (_m *ETCDClientV3) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
Get provides a mock function with given fields: ctx, key, opts
func (*ETCDClientV3) Grant ¶
func (_m *ETCDClientV3) Grant(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error)
Grant provides a mock function with given fields: ctx, ttl
func (*ETCDClientV3) KeepAlive ¶
func (_m *ETCDClientV3) KeepAlive(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
KeepAlive provides a mock function with given fields: ctx, id
func (*ETCDClientV3) KeepAliveOnce ¶
func (_m *ETCDClientV3) KeepAliveOnce(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseKeepAliveResponse, error)
KeepAliveOnce provides a mock function with given fields: ctx, id
func (*ETCDClientV3) Leases ¶
func (_m *ETCDClientV3) Leases(ctx context.Context) (*clientv3.LeaseLeasesResponse, error)
Leases provides a mock function with given fields: ctx
func (*ETCDClientV3) Put ¶
func (_m *ETCDClientV3) Put(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
Put provides a mock function with given fields: ctx, key, val, opts
func (*ETCDClientV3) RequestProgress ¶
func (_m *ETCDClientV3) RequestProgress(ctx context.Context) error
RequestProgress provides a mock function with given fields: ctx
func (*ETCDClientV3) Revoke ¶
func (_m *ETCDClientV3) Revoke(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error)
Revoke provides a mock function with given fields: ctx, id
func (*ETCDClientV3) TimeToLive ¶
func (_m *ETCDClientV3) TimeToLive(ctx context.Context, id clientv3.LeaseID, opts ...clientv3.LeaseOption) (*clientv3.LeaseTimeToLiveResponse, error)
TimeToLive provides a mock function with given fields: ctx, id, opts
type KV ¶
KV is an autogenerated mock type for the KV type
func NewKV ¶
NewKV creates a new instance of KV. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*KV) BatchCreate ¶
func (_m *KV) BatchCreate(ctx context.Context, data map[string]string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
BatchCreate provides a mock function with given fields: ctx, data, opts
func (*KV) BatchCreateAndDecr ¶
BatchCreateAndDecr provides a mock function with given fields: ctx, data, decrKey
func (*KV) BatchDelete ¶
func (_m *KV) BatchDelete(ctx context.Context, keys []string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
BatchDelete provides a mock function with given fields: ctx, keys, opts
func (*KV) BatchPut ¶
func (_m *KV) BatchPut(ctx context.Context, data map[string]string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
BatchPut provides a mock function with given fields: ctx, data, opts
func (*KV) BatchUpdate ¶
func (_m *KV) BatchUpdate(ctx context.Context, data map[string]string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
BatchUpdate provides a mock function with given fields: ctx, data, opts
func (*KV) BindStatus ¶
func (_m *KV) BindStatus(ctx context.Context, entityKey string, statusKey string, statusValue string, ttl int64) error
BindStatus provides a mock function with given fields: ctx, entityKey, statusKey, statusValue, ttl
func (*KV) Create ¶
func (_m *KV) Create(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)
Create provides a mock function with given fields: ctx, key, val, opts
func (*KV) CreateLock ¶
CreateLock provides a mock function with given fields: key, ttl
func (*KV) Delete ¶
func (_m *KV) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
Delete provides a mock function with given fields: ctx, key, opts
func (*KV) Get ¶
func (_m *KV) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
Get provides a mock function with given fields: ctx, key, opts
func (*KV) GetMulti ¶
func (_m *KV) GetMulti(ctx context.Context, keys []string, opts ...clientv3.OpOption) ([]*mvccpb.KeyValue, error)
GetMulti provides a mock function with given fields: ctx, keys, opts
func (*KV) GetOne ¶
func (_m *KV) GetOne(ctx context.Context, key string, opts ...clientv3.OpOption) (*mvccpb.KeyValue, error)
GetOne provides a mock function with given fields: ctx, key, opts
func (*KV) Put ¶
func (_m *KV) Put(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
Put provides a mock function with given fields: ctx, key, val, opts
func (*KV) StartEphemeral ¶
func (_m *KV) StartEphemeral(ctx context.Context, path string, heartbeat time.Duration) (<-chan struct{}, func(), error)
StartEphemeral provides a mock function with given fields: ctx, path, heartbeat
type Txn ¶
Txn is an autogenerated mock type for the Txn type
func NewTxn ¶
NewTxn creates a new instance of Txn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Txn) Commit ¶
func (_m *Txn) Commit() (*clientv3.TxnResponse, error)
Commit provides a mock function with given fields: