package mock
import "github.com/docker/libkv/store/mock"
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)
Functions ¶
func New ¶
New creates a Mock store
Types ¶
type Lock ¶
Lock mock implementation of Locker
func (*Lock) Lock ¶
Lock mock
func (*Lock) Unlock ¶
Unlock mock
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
func (*Mock) Close ¶
func (s *Mock) Close()
Close mock
func (*Mock) Delete ¶
Delete mock
func (*Mock) DeleteTree ¶
DeleteTree mock
func (*Mock) Exists ¶
Exists mock
func (*Mock) Get ¶
Get mock
func (*Mock) List ¶
List mock
func (*Mock) NewLock ¶
NewLock mock
func (*Mock) Put ¶
Put mock
func (*Mock) Watch ¶
Watch mock
func (*Mock) WatchTree ¶
WatchTree mock
Source Files ¶
- Version
- v0.2.1 (latest)
- Published
- Jul 20, 2016
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 weeks ago –
Tools for package owners.