Documentation ¶
Overview ¶
Package mock Mocks all Store functions using testify.Mock.
Index ¶
- func New(endpoints []string, options *store.Config) (store.Store, error)
- type Lock
- type Mock
- func (s *Mock) AtomicDelete(_ context.Context, key string, previous *store.KVPair) (bool, error)
- func (s *Mock) AtomicPut(_ context.Context, key string, value []byte, previous *store.KVPair, ...) (bool, *store.KVPair, error)
- func (s *Mock) Close() error
- func (s *Mock) Delete(_ context.Context, key string) error
- func (s *Mock) DeleteTree(_ context.Context, prefix string) error
- func (s *Mock) Exists(_ context.Context, key string, opts *store.ReadOptions) (bool, error)
- func (s *Mock) Get(_ context.Context, key string, opts *store.ReadOptions) (*store.KVPair, error)
- func (s *Mock) List(_ context.Context, prefix string, opts *store.ReadOptions) ([]*store.KVPair, error)
- func (s *Mock) NewLock(_ context.Context, key string, options *store.LockOptions) (store.Locker, error)
- func (s *Mock) Put(_ context.Context, key string, value []byte, opts *store.WriteOptions) error
- func (s *Mock) Watch(_ context.Context, key string, stopCh <-chan struct{}, opts *store.ReadOptions) (<-chan *store.KVPair, error)
- func (s *Mock) WatchTree(_ context.Context, prefix string, stopCh <-chan struct{}, ...) (<-chan []*store.KVPair, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mock ¶
type Mock struct { mock.Mock // Endpoints passed to InitializeMock. Endpoints []string // Options passed to InitializeMock. Options *store.Config }
Mock store. Mocks all Store functions using testify.Mock.
func (*Mock) AtomicDelete ¶
AtomicDelete mock.
func (*Mock) AtomicPut ¶
func (s *Mock) AtomicPut(_ context.Context, key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut mock.
func (*Mock) DeleteTree ¶
DeleteTree mock.
func (*Mock) List ¶
func (s *Mock) List(_ context.Context, prefix string, opts *store.ReadOptions) ([]*store.KVPair, error)
List mock.
func (*Mock) NewLock ¶
func (s *Mock) NewLock(_ context.Context, key string, options *store.LockOptions) (store.Locker, error)
NewLock mock.
Click to show internal directories.
Click to hide internal directories.