stele

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DEFPEM = `` /* 953-byte string literal not displayed */

Variables

This section is empty.

Functions

func IsNotFund

func IsNotFund(err error) bool

func NewLocal

func NewLocal(storagePath string) (*stele.Local, error)

Types

type BatchSet

type BatchSet struct {
	// contains filtered or unexported fields
}

func (*BatchSet) Flash

func (b *BatchSet) Flash() error

func (*BatchSet) Set

func (b *BatchSet) Set(key, val []byte, ttl time.Duration)

type Stele

type Stele struct {
	// contains filtered or unexported fields
}

func New

func New(socketAddr string, username string, password string) (*Stele, error)

func (*Stele) BatchGet

func (s *Stele) BatchGet(keys [][]byte) (kvs []*generate.SteleKV, err error)

Batch Get. 批量查询

func (*Stele) Del added in v0.0.6

func (s *Stele) Del(key []byte) error

Del Params: key

func (*Stele) Get

func (s *Stele) Get(key []byte) (val []byte, err error)

Get Params: key Return: val: There is no such thing as a null.

func (*Stele) IterateKeys

func (s *Stele) IterateKeys() (keys [][]byte, err error)

Iterate over all keys. 遍历所有Key

func (*Stele) IterateKeysAndValues

func (s *Stele) IterateKeysAndValues() (kvs []*generate.SteleKV, err error)

Iterate over keys and values. 遍历Key和value

func (*Stele) NewBatchSet

func (s *Stele) NewBatchSet() *BatchSet

Batch Insertion Failure Rollback. 批量插入 失败 回滚 Params: datas: []map[key]val

func (*Stele) PrefixScan

func (s *Stele) PrefixScan(prefix []byte) (kvs []*generate.SteleKV, err error)

Prefix Scan. 前缀扫描 Params: prefix: Prefix of key

func (*Stele) Set

func (s *Stele) Set(key, val []byte, ttl time.Duration) error

Set Params: Key, Val, Ttl: A zero is permanent.

Jump to

Keyboard shortcuts

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