store

package
v0.0.0-...-270fe73 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 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 Provider

type Provider interface {
	// OpenStore opens a store with given name space and returns the handle
	OpenStore(name string) (Store, error)
	// Close closes all stores created under this store provider
	Close() error
}

Provider storage provider interface

type Store

type Store interface {
	// Put stores the key and the record
	Put(k []byte, v []byte) error
	// Get fetches the record based on key
	Get(k []byte) ([]byte, error)
	//check the record exist base on key
	Has(k []byte) (bool, error)
	// Delete stores by key
	Delete(k []byte) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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