opredis

package
v0.0.0-...-03f4900 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllKey

func AllKey() []string

func Analysis

func Analysis(filename, serverip string) map[string]interface{}

func AppendMap

func AppendMap(result, val map[string]int64) map[string]int64

func BgsaveKey

func BgsaveKey() (string, bool)

func BigKey

func BigKey() map[string]interface{}

func BigKeyClick

func BigKeyClick(clusterName, groupName, keyname string) (string, int)

func CDelKey

func CDelKey(keyname string) (int64, bool)

func CDeleteKey

func CDeleteKey(keyname string) string

func CGetClusterNode

func CGetClusterNode() []string

func CGetHashKey

func CGetHashKey(keyname string) (map[string]string, bool)

func CGetListKey

func CGetListKey(keyname string) ([]string, bool)

func CGetSetKey

func CGetSetKey(keyname string) ([]string, bool)

func CGetStringKey

func CGetStringKey(keyname string) (string, bool)

String key op

func CGetZsetKey

func CGetZsetKey(keyname string) ([]string, bool)

func CQuery_value

func CQuery_value(keytype, keyname string) (interface{}, int)

func CTypeKey

func CTypeKey(keyname string) (string, bool)

func Cdilatation

func Cdilatation(codisnode model.CodisChangeNode, auth string, topom codisapi.Topom) map[string]interface{}

Codis扩容操作

func CheckGroup

func CheckGroup(groupid int, Curl, ClusterName string) bool

检查group状态

func CheckSlotGroup

func CheckSlotGroup(groupid int, Curl, ClusterName string) bool

检查group的slot

func CheckSlotPending

func CheckSlotPending(curl, cn string) bool

codis pending check

func CodisRebalanceAll

func CodisRebalanceAll(curl, cn, auth string) bool

Codis cluster rebalance

func ConnectRedis

func ConnectRedis(addr, password string) bool

func ConnectRedisCluster

func ConnectRedisCluster(addr []string, password string) bool

func Countkey

func Countkey(keylist []string)

func Cshrinkage

func Cshrinkage(codisnode model.CodisChangeNode, auth string, topom codisapi.Topom) map[string]interface{}

缩容操作

func DebugKey

func DebugKey(keyname string) (string, bool)

func DelKey

func DelKey(keyname string) (int64, bool)

func DeleteKey

func DeleteKey(keyname string) string

func DownClusterHost

func DownClusterHost(codisnode model.CodisChangeNode, auth string, topomstats codisapi.TopomStats) (bool, []string)

codis shrinkage ====================

func ExistsKey

func ExistsKey(keyname string) bool

func ExpireKey

func ExpireKey(keyname string, keytime int) bool

func GetHashKey

func GetHashKey(keyname string) (map[string]string, bool)

Hash key op

func GetListKey

func GetListKey(keyname string) ([]string, bool)

list key op

func GetNextGroupId

func GetNextGroupId(topom codisapi.Topom) int

get codis group id

func GetScanKey

func GetScanKey(cursor uint64, allnum int64) ([]string, uint64, bool)

func GetSetKey

func GetSetKey(keyname string) ([]string, bool)

Set key op

func GetSlowLog

func GetSlowLog() ([]redis.SlowLog, bool)

func GetStringKey

func GetStringKey(keyname string) (string, bool)

String key op

func GetZsetKey

func GetZsetKey(keyname string) ([]string, bool)

Zset key op

func HotKey

func HotKey(serverip, pw string) map[string]int

func IncrStringKey

func IncrStringKey(keyname string) (int64, bool)

func LockCheck

func LockCheck(key string, keytime time.Duration) bool

func LockOp

func LockOp(lockkeyname string, timekey time.Duration) bool

lock

func LockRm

func LockRm(key string) bool

func Query_value

func Query_value(keytype, keyname string) (interface{}, int)

func ReaderTelnet

func ReaderTelnet(conn *telnet.Conn) (out string, knowtime int64)

func RedisSave

func RedisSave(serverip string) bool

SAVE

func SenderTelnet

func SenderTelnet(conn *telnet.Conn, command string)

func SetStringKey

func SetStringKey(keyname, keyvalue string) (string, bool)

func SizeHashKey

func SizeHashKey(keyname string) (int64, bool)

func SizeListKey

func SizeListKey(keyname string) (int64, bool)

func SizeSetKey

func SizeSetKey(keyname string) (int64, bool)

func SizeStringKey

func SizeStringKey(keyname string) (int64, bool)

func SizeZsetKey

func SizeZsetKey(keyname string) (int64, bool)

func SlowKey

func SlowKey() []redis.SlowLog

func SortTopkey

func SortTopkey(keymap map[string]int) map[string]int

func Sortkey

func Sortkey(keymap map[string]int64) map[string]int64

func TelnetCommond

func TelnetCommond(ip, command, pw string) (string, int64)

func TtlKey

func TtlKey(keyname string) (string, bool)

func TypeKey

func TypeKey(keyname string) (string, bool)

Base op

func UnLockOp

func UnLockOp(lockkeyname string) bool

func UpClusterHost

func UpClusterHost(codisnode model.CodisChangeNode, topom codisapi.Topom, auth string) (bool, []string)

codis集群添加某个机器

Types

type ClientClusterConnect

type ClientClusterConnect struct {
	*redis.ClusterClient
}

集群链接

type ClientConnect

type ClientConnect struct {
	*redis.Client
}

单点和codis链接

var RD ClientConnect

type QueryResult

type QueryResult struct {
	Ttl   string      `json:"ttl"`
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
	Len   int         `json:"len"`
}

func CQueryKey

func CQueryKey(keyname string) QueryResult

func QueryKey

func QueryKey(keyname string) QueryResult

Jump to

Keyboard shortcuts

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