Documentation
¶
Index ¶
- type BackendConfig
- type CallConfig
- type CallsConfig
- type CallsRepository
- type ConnectionRegistry
- type Etcd
- type EtcdConfig
- type EtcdHandler
- type MockEtcd
- type MockEtcd_Close_Call
- type MockEtcd_Expecter
- type MockEtcd_Put_Call
- type MockEtcd_Watch_Call
- func (_c *MockEtcd_Watch_Call) Return(_a0 clientv3.WatchChan, _a1 context.CancelFunc) *MockEtcd_Watch_Call
- func (_c *MockEtcd_Watch_Call) Run(run func(key string)) *MockEtcd_Watch_Call
- func (_c *MockEtcd_Watch_Call) RunAndReturn(run func(string) (clientv3.WatchChan, context.CancelFunc)) *MockEtcd_Watch_Call
- type MockKV
- func (_m *MockKV) Compact(ctx context.Context, rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
- func (_m *MockKV) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
- func (_m *MockKV) Do(ctx context.Context, op clientv3.Op) (clientv3.OpResponse, error)
- func (_m *MockKV) EXPECT() *MockKV_Expecter
- func (_m *MockKV) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
- func (_m *MockKV) Put(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
- func (_m *MockKV) Txn(ctx context.Context) clientv3.Txn
- type MockKV_Compact_Call
- func (_c *MockKV_Compact_Call) Return(_a0 *clientv3.CompactResponse, _a1 error) *MockKV_Compact_Call
- func (_c *MockKV_Compact_Call) Run(run func(ctx context.Context, rev int64, opts ...clientv3.CompactOption)) *MockKV_Compact_Call
- func (_c *MockKV_Compact_Call) RunAndReturn(...) *MockKV_Compact_Call
- type MockKV_Delete_Call
- type MockKV_Do_Call
- func (_c *MockKV_Do_Call) Return(_a0 clientv3.OpResponse, _a1 error) *MockKV_Do_Call
- func (_c *MockKV_Do_Call) Run(run func(ctx context.Context, op clientv3.Op)) *MockKV_Do_Call
- func (_c *MockKV_Do_Call) RunAndReturn(run func(context.Context, clientv3.Op) (clientv3.OpResponse, error)) *MockKV_Do_Call
- type MockKV_Expecter
- func (_e *MockKV_Expecter) Compact(ctx interface{}, rev interface{}, opts ...interface{}) *MockKV_Compact_Call
- func (_e *MockKV_Expecter) Delete(ctx interface{}, key interface{}, opts ...interface{}) *MockKV_Delete_Call
- func (_e *MockKV_Expecter) Do(ctx interface{}, op interface{}) *MockKV_Do_Call
- func (_e *MockKV_Expecter) Get(ctx interface{}, key interface{}, opts ...interface{}) *MockKV_Get_Call
- func (_e *MockKV_Expecter) Put(ctx interface{}, key interface{}, val interface{}, opts ...interface{}) *MockKV_Put_Call
- func (_e *MockKV_Expecter) Txn(ctx interface{}) *MockKV_Txn_Call
- type MockKV_Get_Call
- type MockKV_Put_Call
- type MockKV_Txn_Call
- type MockLease
- func (_m *MockLease) Close() error
- func (_m *MockLease) EXPECT() *MockLease_Expecter
- func (_m *MockLease) Grant(ctx context.Context, ttl int64) (*clientv3.LeaseGrantResponse, error)
- func (_m *MockLease) KeepAlive(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
- func (_m *MockLease) KeepAliveOnce(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseKeepAliveResponse, error)
- func (_m *MockLease) Leases(ctx context.Context) (*clientv3.LeaseLeasesResponse, error)
- func (_m *MockLease) Revoke(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error)
- func (_m *MockLease) TimeToLive(ctx context.Context, id clientv3.LeaseID, opts ...clientv3.LeaseOption) (*clientv3.LeaseTimeToLiveResponse, error)
- type MockLease_Close_Call
- type MockLease_Expecter
- func (_e *MockLease_Expecter) Close() *MockLease_Close_Call
- func (_e *MockLease_Expecter) Grant(ctx interface{}, ttl interface{}) *MockLease_Grant_Call
- func (_e *MockLease_Expecter) KeepAlive(ctx interface{}, id interface{}) *MockLease_KeepAlive_Call
- func (_e *MockLease_Expecter) KeepAliveOnce(ctx interface{}, id interface{}) *MockLease_KeepAliveOnce_Call
- func (_e *MockLease_Expecter) Leases(ctx interface{}) *MockLease_Leases_Call
- func (_e *MockLease_Expecter) Revoke(ctx interface{}, id interface{}) *MockLease_Revoke_Call
- func (_e *MockLease_Expecter) TimeToLive(ctx interface{}, id interface{}, opts ...interface{}) *MockLease_TimeToLive_Call
- type MockLease_Grant_Call
- func (_c *MockLease_Grant_Call) Return(_a0 *clientv3.LeaseGrantResponse, _a1 error) *MockLease_Grant_Call
- func (_c *MockLease_Grant_Call) Run(run func(ctx context.Context, ttl int64)) *MockLease_Grant_Call
- func (_c *MockLease_Grant_Call) RunAndReturn(run func(context.Context, int64) (*clientv3.LeaseGrantResponse, error)) *MockLease_Grant_Call
- type MockLease_KeepAliveOnce_Call
- func (_c *MockLease_KeepAliveOnce_Call) Return(_a0 *clientv3.LeaseKeepAliveResponse, _a1 error) *MockLease_KeepAliveOnce_Call
- func (_c *MockLease_KeepAliveOnce_Call) Run(run func(ctx context.Context, id clientv3.LeaseID)) *MockLease_KeepAliveOnce_Call
- func (_c *MockLease_KeepAliveOnce_Call) RunAndReturn(...) *MockLease_KeepAliveOnce_Call
- type MockLease_KeepAlive_Call
- func (_c *MockLease_KeepAlive_Call) Return(_a0 <-chan *clientv3.LeaseKeepAliveResponse, _a1 error) *MockLease_KeepAlive_Call
- func (_c *MockLease_KeepAlive_Call) Run(run func(ctx context.Context, id clientv3.LeaseID)) *MockLease_KeepAlive_Call
- func (_c *MockLease_KeepAlive_Call) RunAndReturn(...) *MockLease_KeepAlive_Call
- type MockLease_Leases_Call
- func (_c *MockLease_Leases_Call) Return(_a0 *clientv3.LeaseLeasesResponse, _a1 error) *MockLease_Leases_Call
- func (_c *MockLease_Leases_Call) Run(run func(ctx context.Context)) *MockLease_Leases_Call
- func (_c *MockLease_Leases_Call) RunAndReturn(run func(context.Context) (*clientv3.LeaseLeasesResponse, error)) *MockLease_Leases_Call
- type MockLease_Revoke_Call
- type MockLease_TimeToLive_Call
- type MockWatcher
- type MockWatcher_Close_Call
- type MockWatcher_Expecter
- type MockWatcher_RequestProgress_Call
- func (_c *MockWatcher_RequestProgress_Call) Return(_a0 error) *MockWatcher_RequestProgress_Call
- func (_c *MockWatcher_RequestProgress_Call) Run(run func(ctx context.Context)) *MockWatcher_RequestProgress_Call
- func (_c *MockWatcher_RequestProgress_Call) RunAndReturn(run func(context.Context) error) *MockWatcher_RequestProgress_Call
- type MockWatcher_Watch_Call
- func (_c *MockWatcher_Watch_Call) Return(_a0 clientv3.WatchChan) *MockWatcher_Watch_Call
- func (_c *MockWatcher_Watch_Call) Run(run func(ctx context.Context, key string, opts ...clientv3.OpOption)) *MockWatcher_Watch_Call
- func (_c *MockWatcher_Watch_Call) RunAndReturn(run func(context.Context, string, ...clientv3.OpOption) clientv3.WatchChan) *MockWatcher_Watch_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendConfig ¶
type BackendConfig struct { Name string `mapstructure:"name"` FieldsMap map[string]string `mapstructure:"fields_map"` ResponseBody string `mapstructure:"response_body"` RequestTemplate map[string]any `mapstructure:"request_template"` Method string `mapstructure:"method"` URLTemplate string `mapstructure:"url_template"` DependsOn []string `mapstructure:"depends_on"` Allow []string `mapstructure:"allow"` }
type CallConfig ¶
type CallConfig struct { Method string `mapstructure:"method"` Params validator.Config `mapstructure:"params"` Backend []*BackendConfig `mapstructure:"backend"` }
type CallsConfig ¶
type CallsConfig struct {
Calls []CallConfig `mapstructure:"calls"`
}
type CallsRepository ¶
type CallsRepository struct {
// contains filtered or unexported fields
}
func NewCallsRepository ¶
func NewCallsRepository(cfg *CallsConfig) (*CallsRepository, error)
NewCallsRepository creates a new instance of CallsRepository based on the provided configuration. It takes cfg of type *CallsConfig which contains the configuration for the calls. It returns a pointer to CallsRepository and an error if the repository creation fails. It returns an error if the validator creation fails or if there is an error parsing the request template.
func (*CallsRepository) GetCall ¶
func (r *CallsRepository) GetCall(method string) core.Handler
GetCall retrieves a CallRunConfig based on the provided method name. It takes a single parameter method of type string, which specifies the method name. It returns a pointer to a CallRunConfig if the method exists in the repository, otherwise it returns nil.
func (*CallsRepository) UpdateCalls ¶ added in v0.2.0
func (r *CallsRepository) UpdateCalls(calls *CallsConfig)
UpdateCalls refreshes the CallsConfig and rebuilds the handlers for calls accordingly It takes a single parameter that is pointer to the new calls config. The current implementation will completely overwrite the old config with new config. It returns an error to if any while building the handlers, otherwise it returns nil.
type ConnectionRegistry ¶
type ConnectionRegistry struct {
// contains filtered or unexported fields
}
func NewConnectionRegistry ¶
func NewConnectionRegistry() *ConnectionRegistry
NewConnectionRegistry creates and returns a new instance of ConnectionRegistry. It initializes the connections map to store connection objects. It returns a pointer to the newly created ConnectionRegistry.
func (*ConnectionRegistry) GetConnection ¶
func (c *ConnectionRegistry) GetConnection(clientConn wasabi.Connection) *core.Conn
GetConnection retrieves an existing connection or creates a new one if it doesn't exist. It takes a clientConn of type wasabi.Connection. It returns a pointer to a core.Conn.
type Etcd ¶ added in v0.1.0
type Etcd interface { Put(key string, value string) error Watch(key string) (clientv3.WatchChan, context.CancelFunc) Close() error }
func NewEtcdHandler ¶ added in v0.1.0
func NewEtcdHandler(ctx context.Context, etcdConfig EtcdConfig) (Etcd, error)
type EtcdConfig ¶ added in v0.1.0
type EtcdHandler ¶ added in v0.1.0
type EtcdHandler struct {
// contains filtered or unexported fields
}
func (*EtcdHandler) Close ¶ added in v0.2.0
func (etcdHandler *EtcdHandler) Close() error
func (*EtcdHandler) Put ¶ added in v0.1.0
func (etcdHandler *EtcdHandler) Put(key, value string) error
func (*EtcdHandler) Watch ¶ added in v0.2.0
func (etcdHandler *EtcdHandler) Watch(key string) (clientv3.WatchChan, context.CancelFunc)
type MockEtcd ¶ added in v0.1.0
MockEtcd is an autogenerated mock type for the Etcd type
func NewMockEtcd ¶ added in v0.1.0
NewMockEtcd creates a new instance of MockEtcd. 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 (*MockEtcd) EXPECT ¶ added in v0.1.0
func (_m *MockEtcd) EXPECT() *MockEtcd_Expecter
type MockEtcd_Close_Call ¶ added in v0.2.0
MockEtcd_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockEtcd_Close_Call) Return ¶ added in v0.2.0
func (_c *MockEtcd_Close_Call) Return(_a0 error) *MockEtcd_Close_Call
func (*MockEtcd_Close_Call) Run ¶ added in v0.2.0
func (_c *MockEtcd_Close_Call) Run(run func()) *MockEtcd_Close_Call
func (*MockEtcd_Close_Call) RunAndReturn ¶ added in v0.2.0
func (_c *MockEtcd_Close_Call) RunAndReturn(run func() error) *MockEtcd_Close_Call
type MockEtcd_Expecter ¶ added in v0.1.0
type MockEtcd_Expecter struct {
// contains filtered or unexported fields
}
func (*MockEtcd_Expecter) Close ¶ added in v0.2.0
func (_e *MockEtcd_Expecter) Close() *MockEtcd_Close_Call
Close is a helper method to define mock.On call
func (*MockEtcd_Expecter) Put ¶ added in v0.1.0
func (_e *MockEtcd_Expecter) Put(key interface{}, value interface{}) *MockEtcd_Put_Call
Put is a helper method to define mock.On call
- key string
- value string
func (*MockEtcd_Expecter) Watch ¶ added in v0.2.0
func (_e *MockEtcd_Expecter) Watch(key interface{}) *MockEtcd_Watch_Call
Watch is a helper method to define mock.On call
- key string
type MockEtcd_Put_Call ¶ added in v0.1.0
MockEtcd_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'
func (*MockEtcd_Put_Call) Return ¶ added in v0.1.0
func (_c *MockEtcd_Put_Call) Return(_a0 error) *MockEtcd_Put_Call
func (*MockEtcd_Put_Call) Run ¶ added in v0.1.0
func (_c *MockEtcd_Put_Call) Run(run func(key string, value string)) *MockEtcd_Put_Call
func (*MockEtcd_Put_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockEtcd_Put_Call) RunAndReturn(run func(string, string) error) *MockEtcd_Put_Call
type MockEtcd_Watch_Call ¶ added in v0.2.0
MockEtcd_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'
func (*MockEtcd_Watch_Call) Return ¶ added in v0.2.0
func (_c *MockEtcd_Watch_Call) Return(_a0 clientv3.WatchChan, _a1 context.CancelFunc) *MockEtcd_Watch_Call
func (*MockEtcd_Watch_Call) Run ¶ added in v0.2.0
func (_c *MockEtcd_Watch_Call) Run(run func(key string)) *MockEtcd_Watch_Call
func (*MockEtcd_Watch_Call) RunAndReturn ¶ added in v0.2.0
func (_c *MockEtcd_Watch_Call) RunAndReturn(run func(string) (clientv3.WatchChan, context.CancelFunc)) *MockEtcd_Watch_Call
type MockKV ¶ added in v0.1.0
MockKV is an autogenerated mock type for the KV type
func NewMockKV ¶ added in v0.1.0
NewMockKV creates a new instance of MockKV. 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 (*MockKV) Compact ¶ added in v0.1.0
func (_m *MockKV) Compact(ctx context.Context, rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
Compact provides a mock function with given fields: ctx, rev, opts
func (*MockKV) Delete ¶ added in v0.1.0
func (_m *MockKV) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
Delete provides a mock function with given fields: ctx, key, opts
func (*MockKV) EXPECT ¶ added in v0.1.0
func (_m *MockKV) EXPECT() *MockKV_Expecter
func (*MockKV) Get ¶ added in v0.1.0
func (_m *MockKV) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
Get provides a mock function with given fields: ctx, key, opts
type MockKV_Compact_Call ¶ added in v0.1.0
MockKV_Compact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compact'
func (*MockKV_Compact_Call) Return ¶ added in v0.1.0
func (_c *MockKV_Compact_Call) Return(_a0 *clientv3.CompactResponse, _a1 error) *MockKV_Compact_Call
func (*MockKV_Compact_Call) Run ¶ added in v0.1.0
func (_c *MockKV_Compact_Call) Run(run func(ctx context.Context, rev int64, opts ...clientv3.CompactOption)) *MockKV_Compact_Call
func (*MockKV_Compact_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockKV_Compact_Call) RunAndReturn(run func(context.Context, int64, ...clientv3.CompactOption) (*clientv3.CompactResponse, error)) *MockKV_Compact_Call
type MockKV_Delete_Call ¶ added in v0.1.0
MockKV_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*MockKV_Delete_Call) Return ¶ added in v0.1.0
func (_c *MockKV_Delete_Call) Return(_a0 *clientv3.DeleteResponse, _a1 error) *MockKV_Delete_Call
func (*MockKV_Delete_Call) Run ¶ added in v0.1.0
func (_c *MockKV_Delete_Call) Run(run func(ctx context.Context, key string, opts ...clientv3.OpOption)) *MockKV_Delete_Call
func (*MockKV_Delete_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockKV_Delete_Call) RunAndReturn(run func(context.Context, string, ...clientv3.OpOption) (*clientv3.DeleteResponse, error)) *MockKV_Delete_Call
type MockKV_Do_Call ¶ added in v0.1.0
MockKV_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
func (*MockKV_Do_Call) Return ¶ added in v0.1.0
func (_c *MockKV_Do_Call) Return(_a0 clientv3.OpResponse, _a1 error) *MockKV_Do_Call
func (*MockKV_Do_Call) Run ¶ added in v0.1.0
func (_c *MockKV_Do_Call) Run(run func(ctx context.Context, op clientv3.Op)) *MockKV_Do_Call
func (*MockKV_Do_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockKV_Do_Call) RunAndReturn(run func(context.Context, clientv3.Op) (clientv3.OpResponse, error)) *MockKV_Do_Call
type MockKV_Expecter ¶ added in v0.1.0
type MockKV_Expecter struct {
// contains filtered or unexported fields
}
func (*MockKV_Expecter) Compact ¶ added in v0.1.0
func (_e *MockKV_Expecter) Compact(ctx interface{}, rev interface{}, opts ...interface{}) *MockKV_Compact_Call
Compact is a helper method to define mock.On call
- ctx context.Context
- rev int64
- opts ...clientv3.CompactOption
func (*MockKV_Expecter) Delete ¶ added in v0.1.0
func (_e *MockKV_Expecter) Delete(ctx interface{}, key interface{}, opts ...interface{}) *MockKV_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- key string
- opts ...clientv3.OpOption
func (*MockKV_Expecter) Do ¶ added in v0.1.0
func (_e *MockKV_Expecter) Do(ctx interface{}, op interface{}) *MockKV_Do_Call
Do is a helper method to define mock.On call
- ctx context.Context
- op clientv3.Op
func (*MockKV_Expecter) Get ¶ added in v0.1.0
func (_e *MockKV_Expecter) Get(ctx interface{}, key interface{}, opts ...interface{}) *MockKV_Get_Call
Get is a helper method to define mock.On call
- ctx context.Context
- key string
- opts ...clientv3.OpOption
func (*MockKV_Expecter) Put ¶ added in v0.1.0
func (_e *MockKV_Expecter) Put(ctx interface{}, key interface{}, val interface{}, opts ...interface{}) *MockKV_Put_Call
Put is a helper method to define mock.On call
- ctx context.Context
- key string
- val string
- opts ...clientv3.OpOption
func (*MockKV_Expecter) Txn ¶ added in v0.1.0
func (_e *MockKV_Expecter) Txn(ctx interface{}) *MockKV_Txn_Call
Txn is a helper method to define mock.On call
- ctx context.Context
type MockKV_Get_Call ¶ added in v0.1.0
MockKV_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*MockKV_Get_Call) Return ¶ added in v0.1.0
func (_c *MockKV_Get_Call) Return(_a0 *clientv3.GetResponse, _a1 error) *MockKV_Get_Call
func (*MockKV_Get_Call) Run ¶ added in v0.1.0
func (_c *MockKV_Get_Call) Run(run func(ctx context.Context, key string, opts ...clientv3.OpOption)) *MockKV_Get_Call
func (*MockKV_Get_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockKV_Get_Call) RunAndReturn(run func(context.Context, string, ...clientv3.OpOption) (*clientv3.GetResponse, error)) *MockKV_Get_Call
type MockKV_Put_Call ¶ added in v0.1.0
MockKV_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'
func (*MockKV_Put_Call) Return ¶ added in v0.1.0
func (_c *MockKV_Put_Call) Return(_a0 *clientv3.PutResponse, _a1 error) *MockKV_Put_Call
func (*MockKV_Put_Call) Run ¶ added in v0.1.0
func (_c *MockKV_Put_Call) Run(run func(ctx context.Context, key string, val string, opts ...clientv3.OpOption)) *MockKV_Put_Call
func (*MockKV_Put_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockKV_Put_Call) RunAndReturn(run func(context.Context, string, string, ...clientv3.OpOption) (*clientv3.PutResponse, error)) *MockKV_Put_Call
type MockKV_Txn_Call ¶ added in v0.1.0
MockKV_Txn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Txn'
func (*MockKV_Txn_Call) Return ¶ added in v0.1.0
func (_c *MockKV_Txn_Call) Return(_a0 clientv3.Txn) *MockKV_Txn_Call
func (*MockKV_Txn_Call) Run ¶ added in v0.1.0
func (_c *MockKV_Txn_Call) Run(run func(ctx context.Context)) *MockKV_Txn_Call
func (*MockKV_Txn_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockKV_Txn_Call) RunAndReturn(run func(context.Context) clientv3.Txn) *MockKV_Txn_Call
type MockLease ¶ added in v0.1.0
MockLease is an autogenerated mock type for the Lease type
func NewMockLease ¶ added in v0.1.0
NewMockLease creates a new instance of MockLease. 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 (*MockLease) EXPECT ¶ added in v0.1.0
func (_m *MockLease) EXPECT() *MockLease_Expecter
func (*MockLease) Grant ¶ added in v0.1.0
Grant provides a mock function with given fields: ctx, ttl
func (*MockLease) KeepAlive ¶ added in v0.1.0
func (_m *MockLease) KeepAlive(ctx context.Context, id clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
KeepAlive provides a mock function with given fields: ctx, id
func (*MockLease) KeepAliveOnce ¶ added in v0.1.0
func (_m *MockLease) KeepAliveOnce(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseKeepAliveResponse, error)
KeepAliveOnce provides a mock function with given fields: ctx, id
func (*MockLease) Revoke ¶ added in v0.1.0
func (_m *MockLease) Revoke(ctx context.Context, id clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error)
Revoke provides a mock function with given fields: ctx, id
func (*MockLease) TimeToLive ¶ added in v0.1.0
func (_m *MockLease) 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 MockLease_Close_Call ¶ added in v0.1.0
MockLease_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockLease_Close_Call) Return ¶ added in v0.1.0
func (_c *MockLease_Close_Call) Return(_a0 error) *MockLease_Close_Call
func (*MockLease_Close_Call) Run ¶ added in v0.1.0
func (_c *MockLease_Close_Call) Run(run func()) *MockLease_Close_Call
func (*MockLease_Close_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockLease_Close_Call) RunAndReturn(run func() error) *MockLease_Close_Call
type MockLease_Expecter ¶ added in v0.1.0
type MockLease_Expecter struct {
// contains filtered or unexported fields
}
func (*MockLease_Expecter) Close ¶ added in v0.1.0
func (_e *MockLease_Expecter) Close() *MockLease_Close_Call
Close is a helper method to define mock.On call
func (*MockLease_Expecter) Grant ¶ added in v0.1.0
func (_e *MockLease_Expecter) Grant(ctx interface{}, ttl interface{}) *MockLease_Grant_Call
Grant is a helper method to define mock.On call
- ctx context.Context
- ttl int64
func (*MockLease_Expecter) KeepAlive ¶ added in v0.1.0
func (_e *MockLease_Expecter) KeepAlive(ctx interface{}, id interface{}) *MockLease_KeepAlive_Call
KeepAlive is a helper method to define mock.On call
- ctx context.Context
- id clientv3.LeaseID
func (*MockLease_Expecter) KeepAliveOnce ¶ added in v0.1.0
func (_e *MockLease_Expecter) KeepAliveOnce(ctx interface{}, id interface{}) *MockLease_KeepAliveOnce_Call
KeepAliveOnce is a helper method to define mock.On call
- ctx context.Context
- id clientv3.LeaseID
func (*MockLease_Expecter) Leases ¶ added in v0.1.0
func (_e *MockLease_Expecter) Leases(ctx interface{}) *MockLease_Leases_Call
Leases is a helper method to define mock.On call
- ctx context.Context
func (*MockLease_Expecter) Revoke ¶ added in v0.1.0
func (_e *MockLease_Expecter) Revoke(ctx interface{}, id interface{}) *MockLease_Revoke_Call
Revoke is a helper method to define mock.On call
- ctx context.Context
- id clientv3.LeaseID
func (*MockLease_Expecter) TimeToLive ¶ added in v0.1.0
func (_e *MockLease_Expecter) TimeToLive(ctx interface{}, id interface{}, opts ...interface{}) *MockLease_TimeToLive_Call
TimeToLive is a helper method to define mock.On call
- ctx context.Context
- id clientv3.LeaseID
- opts ...clientv3.LeaseOption
type MockLease_Grant_Call ¶ added in v0.1.0
MockLease_Grant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Grant'
func (*MockLease_Grant_Call) Return ¶ added in v0.1.0
func (_c *MockLease_Grant_Call) Return(_a0 *clientv3.LeaseGrantResponse, _a1 error) *MockLease_Grant_Call
func (*MockLease_Grant_Call) Run ¶ added in v0.1.0
func (_c *MockLease_Grant_Call) Run(run func(ctx context.Context, ttl int64)) *MockLease_Grant_Call
func (*MockLease_Grant_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockLease_Grant_Call) RunAndReturn(run func(context.Context, int64) (*clientv3.LeaseGrantResponse, error)) *MockLease_Grant_Call
type MockLease_KeepAliveOnce_Call ¶ added in v0.1.0
MockLease_KeepAliveOnce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KeepAliveOnce'
func (*MockLease_KeepAliveOnce_Call) Return ¶ added in v0.1.0
func (_c *MockLease_KeepAliveOnce_Call) Return(_a0 *clientv3.LeaseKeepAliveResponse, _a1 error) *MockLease_KeepAliveOnce_Call
func (*MockLease_KeepAliveOnce_Call) Run ¶ added in v0.1.0
func (_c *MockLease_KeepAliveOnce_Call) Run(run func(ctx context.Context, id clientv3.LeaseID)) *MockLease_KeepAliveOnce_Call
func (*MockLease_KeepAliveOnce_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockLease_KeepAliveOnce_Call) RunAndReturn(run func(context.Context, clientv3.LeaseID) (*clientv3.LeaseKeepAliveResponse, error)) *MockLease_KeepAliveOnce_Call
type MockLease_KeepAlive_Call ¶ added in v0.1.0
MockLease_KeepAlive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KeepAlive'
func (*MockLease_KeepAlive_Call) Return ¶ added in v0.1.0
func (_c *MockLease_KeepAlive_Call) Return(_a0 <-chan *clientv3.LeaseKeepAliveResponse, _a1 error) *MockLease_KeepAlive_Call
func (*MockLease_KeepAlive_Call) Run ¶ added in v0.1.0
func (_c *MockLease_KeepAlive_Call) Run(run func(ctx context.Context, id clientv3.LeaseID)) *MockLease_KeepAlive_Call
func (*MockLease_KeepAlive_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockLease_KeepAlive_Call) RunAndReturn(run func(context.Context, clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)) *MockLease_KeepAlive_Call
type MockLease_Leases_Call ¶ added in v0.1.0
MockLease_Leases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Leases'
func (*MockLease_Leases_Call) Return ¶ added in v0.1.0
func (_c *MockLease_Leases_Call) Return(_a0 *clientv3.LeaseLeasesResponse, _a1 error) *MockLease_Leases_Call
func (*MockLease_Leases_Call) Run ¶ added in v0.1.0
func (_c *MockLease_Leases_Call) Run(run func(ctx context.Context)) *MockLease_Leases_Call
func (*MockLease_Leases_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockLease_Leases_Call) RunAndReturn(run func(context.Context) (*clientv3.LeaseLeasesResponse, error)) *MockLease_Leases_Call
type MockLease_Revoke_Call ¶ added in v0.1.0
MockLease_Revoke_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Revoke'
func (*MockLease_Revoke_Call) Return ¶ added in v0.1.0
func (_c *MockLease_Revoke_Call) Return(_a0 *clientv3.LeaseRevokeResponse, _a1 error) *MockLease_Revoke_Call
func (*MockLease_Revoke_Call) Run ¶ added in v0.1.0
func (_c *MockLease_Revoke_Call) Run(run func(ctx context.Context, id clientv3.LeaseID)) *MockLease_Revoke_Call
func (*MockLease_Revoke_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockLease_Revoke_Call) RunAndReturn(run func(context.Context, clientv3.LeaseID) (*clientv3.LeaseRevokeResponse, error)) *MockLease_Revoke_Call
type MockLease_TimeToLive_Call ¶ added in v0.1.0
MockLease_TimeToLive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TimeToLive'
func (*MockLease_TimeToLive_Call) Return ¶ added in v0.1.0
func (_c *MockLease_TimeToLive_Call) Return(_a0 *clientv3.LeaseTimeToLiveResponse, _a1 error) *MockLease_TimeToLive_Call
func (*MockLease_TimeToLive_Call) Run ¶ added in v0.1.0
func (_c *MockLease_TimeToLive_Call) Run(run func(ctx context.Context, id clientv3.LeaseID, opts ...clientv3.LeaseOption)) *MockLease_TimeToLive_Call
func (*MockLease_TimeToLive_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockLease_TimeToLive_Call) RunAndReturn(run func(context.Context, clientv3.LeaseID, ...clientv3.LeaseOption) (*clientv3.LeaseTimeToLiveResponse, error)) *MockLease_TimeToLive_Call
type MockWatcher ¶ added in v0.1.0
MockWatcher is an autogenerated mock type for the Watcher type
func NewMockWatcher ¶ added in v0.1.0
func NewMockWatcher(t interface { mock.TestingT Cleanup(func()) }) *MockWatcher
NewMockWatcher creates a new instance of MockWatcher. 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 (*MockWatcher) Close ¶ added in v0.1.0
func (_m *MockWatcher) Close() error
Close provides a mock function with given fields:
func (*MockWatcher) EXPECT ¶ added in v0.1.0
func (_m *MockWatcher) EXPECT() *MockWatcher_Expecter
func (*MockWatcher) RequestProgress ¶ added in v0.1.0
func (_m *MockWatcher) RequestProgress(ctx context.Context) error
RequestProgress provides a mock function with given fields: ctx
type MockWatcher_Close_Call ¶ added in v0.1.0
MockWatcher_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockWatcher_Close_Call) Return ¶ added in v0.1.0
func (_c *MockWatcher_Close_Call) Return(_a0 error) *MockWatcher_Close_Call
func (*MockWatcher_Close_Call) Run ¶ added in v0.1.0
func (_c *MockWatcher_Close_Call) Run(run func()) *MockWatcher_Close_Call
func (*MockWatcher_Close_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockWatcher_Close_Call) RunAndReturn(run func() error) *MockWatcher_Close_Call
type MockWatcher_Expecter ¶ added in v0.1.0
type MockWatcher_Expecter struct {
// contains filtered or unexported fields
}
func (*MockWatcher_Expecter) Close ¶ added in v0.1.0
func (_e *MockWatcher_Expecter) Close() *MockWatcher_Close_Call
Close is a helper method to define mock.On call
func (*MockWatcher_Expecter) RequestProgress ¶ added in v0.1.0
func (_e *MockWatcher_Expecter) RequestProgress(ctx interface{}) *MockWatcher_RequestProgress_Call
RequestProgress is a helper method to define mock.On call
- ctx context.Context
func (*MockWatcher_Expecter) Watch ¶ added in v0.1.0
func (_e *MockWatcher_Expecter) Watch(ctx interface{}, key interface{}, opts ...interface{}) *MockWatcher_Watch_Call
Watch is a helper method to define mock.On call
- ctx context.Context
- key string
- opts ...OpOption
type MockWatcher_RequestProgress_Call ¶ added in v0.1.0
MockWatcher_RequestProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestProgress'
func (*MockWatcher_RequestProgress_Call) Return ¶ added in v0.1.0
func (_c *MockWatcher_RequestProgress_Call) Return(_a0 error) *MockWatcher_RequestProgress_Call
func (*MockWatcher_RequestProgress_Call) Run ¶ added in v0.1.0
func (_c *MockWatcher_RequestProgress_Call) Run(run func(ctx context.Context)) *MockWatcher_RequestProgress_Call
func (*MockWatcher_RequestProgress_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockWatcher_RequestProgress_Call) RunAndReturn(run func(context.Context) error) *MockWatcher_RequestProgress_Call
type MockWatcher_Watch_Call ¶ added in v0.1.0
MockWatcher_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'
func (*MockWatcher_Watch_Call) Return ¶ added in v0.1.0
func (_c *MockWatcher_Watch_Call) Return(_a0 clientv3.WatchChan) *MockWatcher_Watch_Call
func (*MockWatcher_Watch_Call) Run ¶ added in v0.1.0
func (_c *MockWatcher_Watch_Call) Run(run func(ctx context.Context, key string, opts ...clientv3.OpOption)) *MockWatcher_Watch_Call
func (*MockWatcher_Watch_Call) RunAndReturn ¶ added in v0.1.0
func (_c *MockWatcher_Watch_Call) RunAndReturn(run func(context.Context, string, ...clientv3.OpOption) clientv3.WatchChan) *MockWatcher_Watch_Call