Documentation ¶
Overview ¶
Package kv is a generated GoMock package.
Index ¶
- Constants
- Variables
- func ComponentLeaderKey(component string) string
- func DistributedLockKey(component string) string
- func NamespaceAllKey() string
- func NamespaceKey(id vanus.ID) string
- func UserAllKey() string
- func UserKey(identifier string) string
- func UserRoleAllKey() string
- func UserRoleKey(identifier, role string) string
- func UserTokenAllKey() string
- func UserTokenKey(id vanus.ID) string
- type Action
- type Client
- type MockClient
- func (m *MockClient) Close() error
- func (m *MockClient) CompareAndDelete(ctx context.Context, key string, preValue []byte) error
- func (m *MockClient) CompareAndSwap(ctx context.Context, key string, preValue, value []byte) error
- func (m *MockClient) Create(ctx context.Context, key string, value []byte) error
- func (m *MockClient) Delete(ctx context.Context, key string) error
- func (m *MockClient) DeleteDir(ctx context.Context, path string) error
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) Exists(ctx context.Context, key string) (bool, error)
- func (m *MockClient) Get(ctx context.Context, key string) ([]byte, error)
- func (m *MockClient) List(ctx context.Context, path string) ([]Pair, error)
- func (m *MockClient) Set(ctx context.Context, key string, value []byte) error
- func (m *MockClient) SetWithTTL(ctx context.Context, key string, value []byte, ttl time.Duration) error
- func (m *MockClient) Update(ctx context.Context, key string, value []byte) error
- func (m *MockClient) Watch(ctx context.Context, key string, stopCh <-chan struct{}) (chan Pair, chan error)
- func (m *MockClient) WatchTree(ctx context.Context, path string, stopCh <-chan struct{}) (chan Pair, chan error)
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) Close() *gomock.Call
- func (mr *MockClientMockRecorder) CompareAndDelete(ctx, key, preValue interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) CompareAndSwap(ctx, key, preValue, value interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Create(ctx, key, value interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Delete(ctx, key interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) DeleteDir(ctx, path interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Exists(ctx, key interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Get(ctx, key interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) List(ctx, path interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Set(ctx, key, value interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) SetWithTTL(ctx, key, value, ttl interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Update(ctx, key, value interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Watch(ctx, key, stopCh interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) WatchTree(ctx, path, stopCh interface{}) *gomock.Call
- type Pair
Constants ¶
const ( ResourceEventbus = "/vanus/core/eventbus_controller/eventbus" ResourceEventlog = "/vanus/core/eventbus_controller/eventlog" ResourceSegment = "/vanus/core/eventbus_controller/segment" ResourceSegmentOfEventlog = "/vanus/core/eventbus_controller/segs_of_eventlog" ResourceVolumeMetadata = "/vanus/core/eventbus_controller/volume/metadata" ResourceVolumeBlock = "/vanus/core/eventbus_controller/volume/block" ResourceVolumeInstance = "/vanus/core/eventbus_controller/volume/instance" ResourceSubscription = "/vanus/core/trigger_controller/subscriptions" MetadataSecret = "/vanus/core/trigger_controller/secrets" //nolint:gosec // ok MetadataOffset = "/vanus/core/trigger_controller/offsets" TriggerWorker = "/vanus/core/trigger_controller/trigger_workers" ClusterNode = "/vanus/core/cluster/nodes" ClusterStart = "/vanus/core/cluster/start_at" )
Variables ¶
Functions ¶
func ComponentLeaderKey ¶
func DistributedLockKey ¶
func NamespaceAllKey ¶
func NamespaceAllKey() string
func NamespaceKey ¶
func UserAllKey ¶
func UserAllKey() string
func UserRoleAllKey ¶
func UserRoleAllKey() string
func UserRoleKey ¶
func UserTokenAllKey ¶
func UserTokenAllKey() string
func UserTokenKey ¶
Types ¶
type Client ¶
type Client interface { Get(ctx context.Context, key string) ([]byte, error) Create(ctx context.Context, key string, value []byte) error Set(ctx context.Context, key string, value []byte) error Update(ctx context.Context, key string, value []byte) error Exists(ctx context.Context, key string) (bool, error) SetWithTTL(ctx context.Context, key string, value []byte, ttl time.Duration) error Delete(ctx context.Context, key string) error DeleteDir(ctx context.Context, path string) error List(ctx context.Context, path string) ([]Pair, error) Watch(ctx context.Context, key string, stopCh <-chan struct{}) (chan Pair, chan error) WatchTree(ctx context.Context, path string, stopCh <-chan struct{}) (chan Pair, chan error) CompareAndSwap(ctx context.Context, key string, preValue, value []byte) error CompareAndDelete(ctx context.Context, key string, preValue []byte) error Close() error }
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) CompareAndDelete ¶
CompareAndDelete mocks base method.
func (*MockClient) CompareAndSwap ¶
CompareAndSwap mocks base method.
func (*MockClient) Delete ¶
func (m *MockClient) Delete(ctx context.Context, key string) error
Delete mocks base method.
func (*MockClient) DeleteDir ¶
func (m *MockClient) DeleteDir(ctx context.Context, path string) error
DeleteDir mocks base method.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) SetWithTTL ¶
func (m *MockClient) SetWithTTL(ctx context.Context, key string, value []byte, ttl time.Duration) error
SetWithTTL mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) Close ¶
func (mr *MockClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockClientMockRecorder) CompareAndDelete ¶
func (mr *MockClientMockRecorder) CompareAndDelete(ctx, key, preValue interface{}) *gomock.Call
CompareAndDelete indicates an expected call of CompareAndDelete.
func (*MockClientMockRecorder) CompareAndSwap ¶
func (mr *MockClientMockRecorder) CompareAndSwap(ctx, key, preValue, value interface{}) *gomock.Call
CompareAndSwap indicates an expected call of CompareAndSwap.
func (*MockClientMockRecorder) Create ¶
func (mr *MockClientMockRecorder) Create(ctx, key, value interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockClientMockRecorder) Delete ¶
func (mr *MockClientMockRecorder) Delete(ctx, key interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockClientMockRecorder) DeleteDir ¶
func (mr *MockClientMockRecorder) DeleteDir(ctx, path interface{}) *gomock.Call
DeleteDir indicates an expected call of DeleteDir.
func (*MockClientMockRecorder) Exists ¶
func (mr *MockClientMockRecorder) Exists(ctx, key interface{}) *gomock.Call
Exists indicates an expected call of Exists.
func (*MockClientMockRecorder) Get ¶
func (mr *MockClientMockRecorder) Get(ctx, key interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockClientMockRecorder) List ¶
func (mr *MockClientMockRecorder) List(ctx, path interface{}) *gomock.Call
List indicates an expected call of List.
func (*MockClientMockRecorder) Set ¶
func (mr *MockClientMockRecorder) Set(ctx, key, value interface{}) *gomock.Call
Set indicates an expected call of Set.
func (*MockClientMockRecorder) SetWithTTL ¶
func (mr *MockClientMockRecorder) SetWithTTL(ctx, key, value, ttl interface{}) *gomock.Call
SetWithTTL indicates an expected call of SetWithTTL.
func (*MockClientMockRecorder) Update ¶
func (mr *MockClientMockRecorder) Update(ctx, key, value interface{}) *gomock.Call
Update indicates an expected call of Update.
func (*MockClientMockRecorder) Watch ¶
func (mr *MockClientMockRecorder) Watch(ctx, key, stopCh interface{}) *gomock.Call
Watch indicates an expected call of Watch.
func (*MockClientMockRecorder) WatchTree ¶
func (mr *MockClientMockRecorder) WatchTree(ctx, path, stopCh interface{}) *gomock.Call
WatchTree indicates an expected call of WatchTree.