kvdbtypes

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator interface {
	Next() (KVItem, error)
}

Iterator is the interface for iterators for KVDB

Next should returns the next item with error=nil whenever has next item otherwise returns KVItem{}, io.EOF When failed, returns KVItem{}, error

type KVDBEngine

type KVDBEngine interface {
	Get(key string) (val string, err error)
	Put(key string, val string) (err error)
	Find(beginKey string, endKey string) (Iterator, error)
	Close()
	IsConnectionError(err error) bool
}

KVDBEngine defines the interface of a KVDB engine implementation

type KVItem

type KVItem struct {
	Key string
	Val string
}

KVItem is the type of KVDB item

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL