redis

package
v0.0.0-...-d2c5623 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: GPL-3.0, GPL-3.0-or-later Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongTypeOperation = errors.New("WRONGTYPE Operation against a key holding the kind of value")
)

Functions

This section is empty.

Types

type DataStructure

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

DataStructure redis 数据结构

func NewDataStructure

func NewDataStructure(options bitcask.Options) (*DataStructure, error)

func (*DataStructure) Close

func (d *DataStructure) Close() error

func (*DataStructure) Del

func (d *DataStructure) Del(key []byte) error

func (*DataStructure) Get

func (d *DataStructure) Get(key []byte) ([]byte, error)

func (*DataStructure) HDel

func (d *DataStructure) HDel(key, field []byte) (bool, error)

func (*DataStructure) HGet

func (d *DataStructure) HGet(key, field []byte) ([]byte, error)

func (*DataStructure) HSet

func (d *DataStructure) HSet(key, field, value []byte) (bool, error)

func (*DataStructure) LPop

func (d *DataStructure) LPop(key []byte) ([]byte, error)

func (*DataStructure) LPush

func (d *DataStructure) LPush(key []byte, values ...[]byte) (int64, error)

func (*DataStructure) RPop

func (d *DataStructure) RPop(key []byte) ([]byte, error)

func (*DataStructure) RPush

func (d *DataStructure) RPush(key []byte, values ...[]byte) (int64, error)

func (*DataStructure) SAdd

func (d *DataStructure) SAdd(key []byte, members ...[]byte) (int64, error)

func (*DataStructure) SIsMember

func (d *DataStructure) SIsMember(key []byte, member []byte) (bool, error)

func (*DataStructure) SRem

func (d *DataStructure) SRem(key []byte, member []byte) (bool, error)

func (*DataStructure) Set

func (d *DataStructure) Set(key []byte, ttl time.Duration, value []byte) error

func (*DataStructure) Type

func (d *DataStructure) Type(key []byte) (DataType, error)

func (*DataStructure) ZAdd

func (d *DataStructure) ZAdd(key []byte, score float64, member []byte) (bool, error)

func (*DataStructure) ZScore

func (d *DataStructure) ZScore(key []byte, member []byte) (float64, error)

type DataType

type DataType = byte
const (
	String DataType = iota
	Hash
	Set
	List
	ZSet
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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