libkv: github.com/docker/libkv/store/mock Index | Files

package mock

import "github.com/docker/libkv/store/mock"

Index

Package Files

mock.go

func New Uses

func New(endpoints []string, options *store.Config) (store.Store, error)

New creates a Mock store

type Lock Uses

type Lock struct {
    mock.Mock
}

Lock mock implementation of Locker

func (*Lock) Lock Uses

func (l *Lock) Lock(stopCh chan struct{}) (<-chan struct{}, error)

Lock mock

func (*Lock) Unlock Uses

func (l *Lock) Unlock() error

Unlock mock

type Mock Uses

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 Uses

func (s *Mock) AtomicDelete(key string, previous *store.KVPair) (bool, error)

AtomicDelete mock

func (*Mock) AtomicPut Uses

func (s *Mock) AtomicPut(key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)

AtomicPut mock

func (*Mock) Close Uses

func (s *Mock) Close()

Close mock

func (*Mock) Delete Uses

func (s *Mock) Delete(key string) error

Delete mock

func (*Mock) DeleteTree Uses

func (s *Mock) DeleteTree(prefix string) error

DeleteTree mock

func (*Mock) Exists Uses

func (s *Mock) Exists(key string) (bool, error)

Exists mock

func (*Mock) Get Uses

func (s *Mock) Get(key string) (*store.KVPair, error)

Get mock

func (*Mock) List Uses

func (s *Mock) List(prefix string) ([]*store.KVPair, error)

List mock

func (*Mock) NewLock Uses

func (s *Mock) NewLock(key string, options *store.LockOptions) (store.Locker, error)

NewLock mock

func (*Mock) Put Uses

func (s *Mock) Put(key string, value []byte, opts *store.WriteOptions) error

Put mock

func (*Mock) Watch Uses

func (s *Mock) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error)

Watch mock

func (*Mock) WatchTree Uses

func (s *Mock) WatchTree(prefix string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error)

WatchTree mock

Package mock imports 2 packages (graph) and is imported by 1 packages. Updated 2016-07-31. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).