store

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 16 Imported by: 9

Documentation

Overview

Package store is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type EtcdWatcher added in v0.8.0

type EtcdWatcher interface {
	WatchChan() clientv3.WatchChan
	Close() error
}

type MockEtcdWatcher added in v0.8.0

type MockEtcdWatcher struct {
	// contains filtered or unexported fields
}

MockEtcdWatcher is a mock of EtcdWatcher interface

func NewMockEtcdWatcher added in v0.8.0

func NewMockEtcdWatcher(ctrl *gomock.Controller) *MockEtcdWatcher

NewMockEtcdWatcher creates a new mock instance

func (*MockEtcdWatcher) Close added in v0.8.0

func (m *MockEtcdWatcher) Close() error

Close mocks base method

func (*MockEtcdWatcher) EXPECT added in v0.8.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockEtcdWatcher) WatchChan added in v0.8.0

func (m *MockEtcdWatcher) WatchChan() clientv3.WatchChan

WatchChan mocks base method

type MockEtcdWatcherMockRecorder added in v0.8.0

type MockEtcdWatcherMockRecorder struct {
	// contains filtered or unexported fields
}

MockEtcdWatcherMockRecorder is the mock recorder for MockEtcdWatcher

func (*MockEtcdWatcherMockRecorder) Close added in v0.8.0

Close indicates an expected call of Close

func (*MockEtcdWatcherMockRecorder) WatchChan added in v0.8.0

func (mr *MockEtcdWatcherMockRecorder) WatchChan() *gomock.Call

WatchChan indicates an expected call of WatchChan

type Registration added in v0.8.0

type Registration interface {
	EventChan() <-chan *clientv3.Event
	Unregister()
}

type Store

type Store interface {
	Get(ctx context.Context, key string, recursive bool, data interface{}) error
	GetWithRevision(ctx context.Context, key string, rev int64, recursive bool, data interface{}) error
	Set(ctx context.Context, key string, data interface{}) error
	Delete(ctx context.Context, key string) error
}

func New

func New(c *config.Config) Store

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher added in v0.8.0

func NewWatcher(ctx context.Context, config *config.Config, opts ...WatcherOpt) (Watcher, error)

func (Watcher) Close added in v0.8.0

func (w Watcher) Close() error

func (Watcher) Register added in v0.8.0

func (w Watcher) Register(key string) (Registration, error)

type WatcherOpt added in v0.8.0

type WatcherOpt func(w *Watcher)

func WithEtcdWatcher added in v0.8.0

func WithEtcdWatcher(etcdWatcher EtcdWatcher) WatcherOpt

func WithPrefix added in v0.8.0

func WithPrefix(prefix string) WatcherOpt

Directories

Path Synopsis
Package storemock is a generated GoMock package.
Package storemock is a generated GoMock package.

Jump to

Keyboard shortcuts

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