Versions in this module Expand all Collapse all v0 v0.9.0 Sep 7, 2023 v0.8.0 Apr 17, 2023 Changes in this version + const ClusterNode + const ClusterStart + const MetadataOffset + const MetadataSecret + const ResourceEventbus + const ResourceEventlog + const ResourceSegment + const ResourceSegmentOfEventlog + const ResourceSubscription + const ResourceVolumeBlock + const ResourceVolumeInstance + const ResourceVolumeMetadata + const TriggerWorker + var ErrKeyNotFound = errors.New("key not found") + var ErrNodeExist = errors.New("node exist") + var ErrSetFailed = errors.New("set failed") + var ErrUnknown = errors.New("unknown") + 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 string + const Create + const Delete + const Update + type Client interface + Close func() error + CompareAndDelete func(ctx context.Context, key string, preValue []byte) error + CompareAndSwap func(ctx context.Context, key string, preValue, value []byte) error + Create func(ctx context.Context, key string, value []byte) error + Delete func(ctx context.Context, key string) error + DeleteDir func(ctx context.Context, path string) error + Exists func(ctx context.Context, key string) (bool, error) + Get func(ctx context.Context, key string) ([]byte, error) + List func(ctx context.Context, path string) ([]Pair, error) + Set func(ctx context.Context, key string, value []byte) error + SetWithTTL func(ctx context.Context, key string, value []byte, ttl time.Duration) error + Update func(ctx context.Context, key string, value []byte) error + Watch func(ctx context.Context, key string, stopCh <-chan struct{}) (chan Pair, chan error) + WatchTree func(ctx context.Context, path string, stopCh <-chan struct{}) (chan Pair, chan error) + type MockClient struct + func NewMockClient(ctrl *gomock.Controller) *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 struct + 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 struct + Action Action + Key string + Value []byte