Documentation ¶
Overview ¶
Package kv provide k/v storage by LevelDB
Index ¶
- Variables
- func Compact() error
- func Delete(key []byte) error
- func Get(key []byte) ([]byte, error)
- func Has(key []byte) (bool, error)
- func List(start []byte, limit []byte) (list [][]byte)
- func Put(key []byte, value []byte) error
- type Context
- func (c *Context) Compact() error
- func (c *Context) Delete(key []byte) error
- func (c *Context) Get(key []byte) ([]byte, error)
- func (c *Context) Has(key []byte) (bool, error)
- func (c *Context) List(start []byte, limit []byte) (list [][]byte)
- func (c *Context) Name() string
- func (c *Context) Put(key []byte, value []byte) error
- type Kver
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound indicates record was not found in db ErrNotFound = fmt.Errorf("kv: not found") // ErrForbidden indicates no access ErrForbidden = fmt.Errorf("kv: forbidden") // ErrTransfer indicates can't link to db ErrConnection = fmt.Errorf("kv: connect error") // ErrEncoding indicates an error occured while in/decoding ErrEncoding = fmt.Errorf("kv: encoding error") // ErrUnknown indicates an unknown error ErrUnknown = fmt.Errorf("kv: unknown error") )
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context of kv client
func NewContext ¶
NewContext return a new Context of kv
Context was initialized at path that named `kv.name.path` in config file NewContext will return nil if no client found by name `kv.name.path`
Click to show internal directories.
Click to hide internal directories.