goworld: github.com/xiaonanln/goworld/engine/kvdb/types Index | Files

package kvdbtypes

import "github.com/xiaonanln/goworld/engine/kvdb/types"

Index

Package Files

kvdb_types.go

type Iterator Uses

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 Uses

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 Uses

type KVItem struct {
    Key string
    Val string
}

KVItem is the type of KVDB item

Package kvdbtypes is imported by 3 packages. Updated 2017-11-06. Refresh now. Tools for package owners.