redis

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Gclient0       *redis.Client //
	Gclient1       *redis.Client //
	GRedisIsactive bool
)
View Source
var MihPrefix = "blockid-"

Functions

func RedisInit

func RedisInit(conf conf.RedisConfig) error

Types

type BlockID

type BlockID struct {
	ID   int64
	Time int64
	Name string
}

BlockID is model

func (*BlockID) GetRangeByName

func (b *BlockID) GetRangeByName(n1, n2 string, count int64) (bool, error)

Get by name

func (*BlockID) GetbyName

func (b *BlockID) GetbyName(name string) (bool, error)

Get by name

func (*BlockID) Marshal

func (b *BlockID) Marshal() ([]byte, error)

marshal

func (*BlockID) Unmarshal

func (b *BlockID) Unmarshal(bt []byte) error

unmarshal

type RedisParams

type RedisParams struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func (*RedisParams) Cleardb

func (rp *RedisParams) Cleardb() error

func (*RedisParams) Getdb

func (rp *RedisParams) Getdb() error

func (*RedisParams) Getdb1

func (rp *RedisParams) Getdb1() error

func (*RedisParams) Getdbsize

func (rp *RedisParams) Getdbsize() (int64, error)

func (*RedisParams) Setdb

func (rp *RedisParams) Setdb() error

Jump to

Keyboard shortcuts

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