Documentation ¶
Index ¶
- Variables
- func WithCache(cache Cache) withCache
- func WithCodec(codec Codec) withCodec
- type Cache
- type Codec
- type CostInfo
- type Def
- type KV
- type Key
- type New
- type NewOption
- type Store
- func (s *Store) CacheGet(key Key, fn func(sb.Stream) error) (err error)
- func (s *Store) CachePut(key Key, tokes sb.Tokens, options ...store.CachePutOption) error
- func (s *Store) Delete(keys []Key) error
- func (s *Store) Exists(key Key) (bool, error)
- func (s *Store) ID() (StoreID, error)
- func (s *Store) IterAllKeys(fn func(Key) error) error
- func (s *Store) IterKeys(ns key.Namespace, fn func(Key) error) error
- func (s *Store) Name() string
- func (s *Store) Read(key Key, fn func(sb.Stream) error) error
- func (s *Store) Write(ns key.Namespace, stream sb.Stream, options ...WriteOption) (res store.WriteResult, err error)
- type StoreID
- type StringKey
- type TapKey
- type TapWriteResult
- type TestKV
- type WithOffload
- type WithoutRead
- type WithoutWrite
- type WriteOption
- type WriteResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Break = store.Break DefaultCodec = codec.DefaultCodec ErrKeyNotFound = store.ErrKeyNotFound ErrKeyNotMatch = store.ErrKeyNotMatch ErrRead = store.ErrRead )
Functions ¶
Types ¶
type KV ¶
type KV interface { StoreID() string // IndexID is only used in initialization, should be stable and unique Name() string // Name is for human readable KeyPut(key string, r io.Reader) error // implementation should not retain reader underlying bytes after return KeyGet(key string, fn func(io.Reader) error) error KeyExists(key string) (bool, error) KeyIter(prefix string, fn func(key string) error) error KeyDelete(key ...string) error CostInfo() CostInfo }
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
type TapWriteResult ¶
type TapWriteResult = store.TapWriteResult
type WithOffload ¶
func (WithOffload) IsNewOption ¶
func (_ WithOffload) IsNewOption()
type WithoutRead ¶
type WithoutRead struct{}
func (WithoutRead) IsNewOption ¶
func (_ WithoutRead) IsNewOption()
type WithoutWrite ¶
type WithoutWrite struct{}
func (WithoutWrite) IsNewOption ¶
func (_ WithoutWrite) IsNewOption()
type WriteOption ¶
type WriteOption = store.WriteOption
type WriteResult ¶
type WriteResult = store.WriteResult
Source Files ¶
Click to show internal directories.
Click to hide internal directories.