Documentation
¶
Index ¶
- func NewSnapshot(dir, name string) (store.Snapshot, error)
- func NewStore(typeName string, dir string) store.KV
- type Store
- func (s *Store) Close() error
- func (s *Store) Delete(key interface{}) error
- func (s *Store) Entries() (<-chan store.Pair, error)
- func (s *Store) Exists(key interface{}) (bool, error)
- func (s *Store) Key(key interface{}) string
- func (s *Store) Read(key interface{}) ([]byte, error)
- func (s *Store) Write(key interface{}, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSnapshot ¶
NewSnapshot returns an instance of the snapshot service where data is stored in the directory given. This is a simple implementation that assumes a single file for the entire snapshot.
Types ¶
type Store ¶
type Store struct { Dir string // IDFunc is the function that generates the id. IDFunc func(interface{}) string // contains filtered or unexported fields }
Store is an abstraction for writing and reading from entries in a file directory.
Click to show internal directories.
Click to hide internal directories.