Documentation ¶
Index ¶
- func New(endpoints []string, options *store.Config) (store.Store, error)
- type Lock
- type Mock
- func (s *Mock) AtomicDelete(key string, previous *store.KVPair) (bool, error)
- func (s *Mock) AtomicPut(key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)
- func (s *Mock) Close()
- func (s *Mock) Delete(key string) error
- func (s *Mock) DeleteTree(prefix string) error
- func (s *Mock) Exists(key string) (bool, error)
- func (s *Mock) Get(key string) (*store.KVPair, error)
- func (s *Mock) List(prefix string) ([]*store.KVPair, error)
- func (s *Mock) NewLock(key string, options *store.LockOptions) (store.Locker, error)
- func (s *Mock) Put(key string, value []byte, opts *store.WriteOptions) error
- func (s *Mock) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error)
- func (s *Mock) WatchTree(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(key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut mock
Click to show internal directories.
Click to hide internal directories.