Documentation
¶
Overview ¶
Package kvdb is kvdb module
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kv ¶
type Kv struct {
// contains filtered or unexported fields
}
type KvDBBatcher ¶
type KvDBBatcher struct {
// contains filtered or unexported fields
}
func NewKvDBBatcher ¶
func NewKvDBBatcher() *KvDBBatcher
func (*KvDBBatcher) Add ¶
func (b *KvDBBatcher) Add(key string, value []byte)
func (*KvDBBatcher) GetKvs ¶
func (b *KvDBBatcher) GetKvs() []*Kv
func (*KvDBBatcher) Len ¶
func (b *KvDBBatcher) Len() int
type KvDBProvider ¶
type KvDBProvider interface { // Get returns value by key Get(key string) ([]byte, bool) // Put saves the key-values Put(key string, value []byte) error // Has return true if the given key exist, or return false if none exists Has(key string) (bool, error) // Delete deletes the given key Delete(key string) error // WriteBatch writes a batch in an atomic operation WriteBatch(batch *KvDBBatcher) error Close() }
KvDBProvider defines kv db provider interface
Click to show internal directories.
Click to hide internal directories.