redis

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package redis----------------------- @author: xiejunqiao @since: 2024/11/21 @desc: //TODO ----------------------------------------

Index

Constants

View Source
const (
	CacheExpireBin = "chaos_cacheExpire"
	STATUSOK       = "OK"
	OPTIONNX       = "NX"
	OPTIONXX       = "XX"
	OPTIONGT       = "GT"
	OPTIONLT       = "LT"
)
View Source
const (
	CacheHotKeyBin         = "chaos_cacheHotKey"
	DefaultThreadCount     = "20"
	DefaultSize            = "512"
	DefaultDuration        = "5m"
	ActionCommandName      = "cache-hot-key"
	ShortActionCommandName = "chk"
)
View Source
const CacheLimitBin = "chaos_cacheLimit"
View Source
const ClientsLimitBin = "chaos_clientLimit"

Variables

This section is empty.

Functions

func ExpireFunc

func ExpireFunc(cli *redis.Client, key string, expiration time.Duration, option string) *redis.BoolCmd

func HotKeyFunc added in v1.7.4

func HotKeyFunc(ctx context.Context, cli *redis.Client, key string, valueForCache string)

func NewCacheExpireActionSpec

func NewCacheExpireActionSpec() spec.ExpActionCommandSpec

func NewCacheHotKeyActionSpec added in v1.7.4

func NewCacheHotKeyActionSpec() spec.ExpActionCommandSpec

func NewCacheLimitActionSpec

func NewCacheLimitActionSpec() spec.ExpActionCommandSpec

func NewClientsLimitActionSpec added in v1.7.5

func NewClientsLimitActionSpec() spec.ExpActionCommandSpec

func NewRedisCommandSpec

func NewRedisCommandSpec() spec.ExpModelCommandSpec

Types

type CacheExpireActionCommandSpec

type CacheExpireActionCommandSpec struct {
	spec.BaseExpActionCommandSpec
}

func (*CacheExpireActionCommandSpec) Aliases

func (*CacheExpireActionCommandSpec) Aliases() []string

func (*CacheExpireActionCommandSpec) Categories

func (*CacheExpireActionCommandSpec) Categories() []string

func (*CacheExpireActionCommandSpec) LongDesc

func (k *CacheExpireActionCommandSpec) LongDesc() string

func (*CacheExpireActionCommandSpec) Name

func (*CacheExpireActionCommandSpec) ShortDesc

func (*CacheExpireActionCommandSpec) ShortDesc() string

type CacheExpireExecutor

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

func (*CacheExpireExecutor) Exec

func (cee *CacheExpireExecutor) Exec(uid string, ctx context.Context, model *spec.ExpModel) *spec.Response

func (*CacheExpireExecutor) Name

func (cee *CacheExpireExecutor) Name() string

func (*CacheExpireExecutor) SetChannel

func (cee *CacheExpireExecutor) SetChannel(channel spec.Channel)

type CacheHotKeyActionCommandSpec added in v1.7.4

type CacheHotKeyActionCommandSpec struct {
	spec.BaseExpActionCommandSpec
}

func (*CacheHotKeyActionCommandSpec) Aliases added in v1.7.4

func (*CacheHotKeyActionCommandSpec) Aliases() []string

func (*CacheHotKeyActionCommandSpec) Categories added in v1.7.4

func (*CacheHotKeyActionCommandSpec) Categories() []string

func (*CacheHotKeyActionCommandSpec) LongDesc added in v1.7.4

func (k *CacheHotKeyActionCommandSpec) LongDesc() string

func (*CacheHotKeyActionCommandSpec) Name added in v1.7.4

func (*CacheHotKeyActionCommandSpec) ShortDesc added in v1.7.4

func (*CacheHotKeyActionCommandSpec) ShortDesc() string

type CacheHotKeyExecutor added in v1.7.4

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

func (*CacheHotKeyExecutor) Exec added in v1.7.4

func (cbe *CacheHotKeyExecutor) Exec(uid string, ctx context.Context, model *spec.ExpModel) *spec.Response

func (*CacheHotKeyExecutor) Name added in v1.7.4

func (cbe *CacheHotKeyExecutor) Name() string

func (*CacheHotKeyExecutor) SetChannel added in v1.7.4

func (cbe *CacheHotKeyExecutor) SetChannel(channel spec.Channel)

type CacheLimitActionCommandSpec

type CacheLimitActionCommandSpec struct {
	spec.BaseExpActionCommandSpec
}

func (*CacheLimitActionCommandSpec) Aliases

func (*CacheLimitActionCommandSpec) Aliases() []string

func (*CacheLimitActionCommandSpec) Categories

func (*CacheLimitActionCommandSpec) Categories() []string

func (*CacheLimitActionCommandSpec) LongDesc

func (k *CacheLimitActionCommandSpec) LongDesc() string

func (*CacheLimitActionCommandSpec) Name

func (*CacheLimitActionCommandSpec) ShortDesc

func (*CacheLimitActionCommandSpec) ShortDesc() string

type CacheLimitExecutor

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

func (*CacheLimitExecutor) Exec

func (cle *CacheLimitExecutor) Exec(uid string, ctx context.Context, model *spec.ExpModel) *spec.Response

func (*CacheLimitExecutor) Name

func (cle *CacheLimitExecutor) Name() string

func (*CacheLimitExecutor) SetChannel

func (cle *CacheLimitExecutor) SetChannel(channel spec.Channel)

type ClientsLimitActionCommandSpec added in v1.7.5

type ClientsLimitActionCommandSpec struct {
	spec.BaseExpActionCommandSpec
}

func (*ClientsLimitActionCommandSpec) Aliases added in v1.7.5

func (*ClientsLimitActionCommandSpec) Categories added in v1.7.5

func (*ClientsLimitActionCommandSpec) Categories() []string

func (*ClientsLimitActionCommandSpec) LongDesc added in v1.7.5

func (k *ClientsLimitActionCommandSpec) LongDesc() string

func (*ClientsLimitActionCommandSpec) Name added in v1.7.5

func (*ClientsLimitActionCommandSpec) ShortDesc added in v1.7.5

type ClientsLimitExecutor added in v1.7.5

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

func (*ClientsLimitExecutor) Exec added in v1.7.5

func (cle *ClientsLimitExecutor) Exec(uid string, ctx context.Context, model *spec.ExpModel) *spec.Response

func (*ClientsLimitExecutor) Name added in v1.7.5

func (cle *ClientsLimitExecutor) Name() string

func (*ClientsLimitExecutor) SetChannel added in v1.7.5

func (cle *ClientsLimitExecutor) SetChannel(channel spec.Channel)

type RedisCommandSpec

type RedisCommandSpec struct {
	spec.BaseExpModelCommandSpec
}

func (*RedisCommandSpec) LongDesc

func (*RedisCommandSpec) LongDesc() string

func (*RedisCommandSpec) Name

func (*RedisCommandSpec) Name() string

func (*RedisCommandSpec) ShortDesc

func (*RedisCommandSpec) ShortDesc() string

Jump to

Keyboard shortcuts

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