service

package
v0.0.0-...-7f9e108 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisClient

func NewRedisClient(storageDir string, conf model.RedisService) (*redis.Client, error)

NewRedisClient 生成redis客户端

func SaveRedisConfig

func SaveRedisConfig(conf model.RedisService) error

保存配置

func TestConnect

func TestConnect(conf model.RedisService) error

TestConnect 测试连接

Types

type API

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

func NewAPI

func NewAPI(service string) (*API, error)

func (*API) DelKey

func (a *API) DelKey(ctx context.Context, db, key string) error

DelKey 删除key

func (*API) GetDBs

func (a *API) GetDBs(ctx context.Context, service string) (dbInfos []model.DbInfo, err error)

GetDBs 获取数据库的db

func (*API) GetKeys

func (a *API) GetKeys(ctx context.Context, db, filter string, cursor int) ([]model.Node, int, error)

GetKeys 获取匹配的key列表

func (*API) GetTypes

func (a *API) GetTypes(ctx context.Context, db, key string) (string, error)

GetVal 获取键值类型

func (*API) LuaRun

func (a *API) LuaRun(ctx context.Context, db string, script string, keys, args []string) (string, error)

func (*API) ServerInfo

func (a *API) ServerInfo(ctx context.Context) (string, error)

ServerInfo redis server详情

func (*API) TTLKey

func (a *API) TTLKey(ctx context.Context, db, key string, ttl int) error

TTLKey 设置key的过期时间

func (*API) TestConnect

func (a *API) TestConnect() error

TestConnect 测试连接

Jump to

Keyboard shortcuts

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