source

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: BSD-3-Clause Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuchKey = fmt.Errorf("no such key")

Functions

func Reg

func Reg(dirver string, registry Registry)

Types

type Cursor

type Cursor interface {
	Next() (string, error)
	Close()
}

type Registry

type Registry = func(driver string, config interface{}) (Source, error)

type Source

type Source interface {
	Put(key string, data []byte) error
	Del(key string) error
	Get(key string) ([]byte, error)
	Query(prefix string, delimiter string) (Cursor, error)
}

func NewSource

func NewSource(driver string, config interface{}) (Source, error)

Jump to

Keyboard shortcuts

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