mocks

package
v0.0.0-...-06bcc1c Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETCDClientV3

type ETCDClientV3 struct {
	mock.Mock
}

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

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

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

Grant provides a mock function with given fields: ctx, ttl

func (*ETCDClientV3) KeepAlive

KeepAlive provides a mock function with given fields: ctx, id

func (*ETCDClientV3) KeepAliveOnce

KeepAliveOnce provides a mock function with given fields: ctx, id

func (*ETCDClientV3) Leases

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

Revoke provides a mock function with given fields: ctx, id

func (*ETCDClientV3) TimeToLive

TimeToLive provides a mock function with given fields: ctx, id, opts

func (*ETCDClientV3) Txn

func (_m *ETCDClientV3) Txn(ctx context.Context) clientv3.Txn

Txn provides a mock function with given fields: ctx

func (*ETCDClientV3) Watch

func (_m *ETCDClientV3) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan

Watch provides a mock function with given fields: ctx, key, opts

type KV

type KV struct {
	mock.Mock
}

KV is an autogenerated mock type for the KV type

func NewKV

func NewKV(t interface {
	mock.TestingT
	Cleanup(func())
}) *KV

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

func (_m *KV) BatchCreateAndDecr(ctx context.Context, data map[string]string, decrKey string) error

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

func (_m *KV) CreateLock(key string, ttl time.Duration) (lock.DistributedLock, error)

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) Grant

func (_m *KV) Grant(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error)

Grant provides a mock function with given fields: ctx, ttl

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

func (*KV) Update

func (_m *KV) Update(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.TxnResponse, error)

Update provides a mock function with given fields: ctx, key, val, opts

func (*KV) Watch

func (_m *KV) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan

Watch provides a mock function with given fields: ctx, key, opts

type Txn

type Txn struct {
	mock.Mock
}

Txn is an autogenerated mock type for the Txn type

func NewTxn

func NewTxn(t interface {
	mock.TestingT
	Cleanup(func())
}) *Txn

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:

func (*Txn) Else

func (_m *Txn) Else(ops ...clientv3.Op) clientv3.Txn

Else provides a mock function with given fields: ops

func (*Txn) If

func (_m *Txn) If(cs ...clientv3.Cmp) clientv3.Txn

If provides a mock function with given fields: cs

func (*Txn) Then

func (_m *Txn) Then(ops ...clientv3.Op) clientv3.Txn

Then provides a mock function with given fields: ops

Jump to

Keyboard shortcuts

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