package mock
import "github.com/coreos/etcd/tests/mock"
Index ¶
- type ServerV2
- func NewServerV2(store store.Store) *ServerV2
- func (s *ServerV2) ClientURL(name string) (string, bool)
- func (s *ServerV2) CommitIndex() uint64
- func (s *ServerV2) Dispatch(c raft.Command, w http.ResponseWriter, req *http.Request) error
- func (s *ServerV2) Leader() string
- func (s *ServerV2) PeerURL(name string) (string, bool)
- func (s *ServerV2) State() string
- func (s *ServerV2) Store() store.Store
- func (s *ServerV2) Term() uint64
- type Store
- func NewStore() *Store
- func (s *Store) CompareAndSwap(nodePath string, prevValue string, prevIndex uint64, value string, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
- func (s *Store) Create(nodePath string, value string, incrementalSuffix bool, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
- func (s *Store) Delete(nodePath string, recursive bool, index uint64, term uint64) (*store.Event, error)
- func (s *Store) Get(nodePath string, recursive, sorted bool, index uint64, term uint64) (*store.Event, error)
- func (s *Store) JsonStats() []byte
- func (s *Store) Recovery(b []byte) error
- func (s *Store) Save() ([]byte, error)
- func (s *Store) Set(nodePath string, value string, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
- func (s *Store) Update(nodePath string, newValue string, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
- func (s *Store) Watch(prefix string, recursive bool, sinceIndex uint64, index uint64, term uint64) (<-chan *store.Event, error)
Types ¶
type ServerV2 ¶
A mock Server for the v2 handlers.
func NewServerV2 ¶
func (*ServerV2) ClientURL ¶
func (*ServerV2) CommitIndex ¶
func (*ServerV2) Dispatch ¶
func (*ServerV2) Leader ¶
func (*ServerV2) PeerURL ¶
func (*ServerV2) State ¶
func (*ServerV2) Store ¶
func (*ServerV2) Term ¶
type Store ¶
A mock Store object used for testing.
func NewStore ¶
func NewStore() *Store
func (*Store) CompareAndSwap ¶
func (s *Store) CompareAndSwap(nodePath string, prevValue string, prevIndex uint64, value string, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
func (*Store) Create ¶
func (s *Store) Create(nodePath string, value string, incrementalSuffix bool, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
func (*Store) Delete ¶
func (s *Store) Delete(nodePath string, recursive bool, index uint64, term uint64) (*store.Event, error)
func (*Store) Get ¶
func (s *Store) Get(nodePath string, recursive, sorted bool, index uint64, term uint64) (*store.Event, error)
func (*Store) JsonStats ¶
func (*Store) Recovery ¶
func (*Store) Save ¶
func (*Store) Set ¶
func (s *Store) Set(nodePath string, value string, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
func (*Store) Update ¶
func (s *Store) Update(nodePath string, newValue string, expireTime time.Time, index uint64, term uint64) (*store.Event, error)
func (*Store) Watch ¶
func (s *Store) Watch(prefix string, recursive bool, sinceIndex uint64, index uint64, term uint64) (<-chan *store.Event, error)
Source Files ¶
- Version
- v0.4.8
- Published
- Mar 23, 2015
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 50 minutes ago –
Tools for package owners.