Documentation
¶
Overview ¶
Package redis----------------------- @author: xiejunqiao @since: 2024/11/21 @desc: //TODO ----------------------------------------
Index ¶
- Constants
- func ExpireFunc(cli *redis.Client, key string, expiration time.Duration, option string) *redis.BoolCmd
- func HotKeyFunc(ctx context.Context, cli *redis.Client, key string, valueForCache string)
- func NewCacheExpireActionSpec() spec.ExpActionCommandSpec
- func NewCacheHotKeyActionSpec() spec.ExpActionCommandSpec
- func NewCacheLimitActionSpec() spec.ExpActionCommandSpec
- func NewClientsLimitActionSpec() spec.ExpActionCommandSpec
- func NewRedisCommandSpec() spec.ExpModelCommandSpec
- type CacheExpireActionCommandSpec
- type CacheExpireExecutor
- type CacheHotKeyActionCommandSpec
- type CacheHotKeyExecutor
- type CacheLimitActionCommandSpec
- type CacheLimitExecutor
- type ClientsLimitActionCommandSpec
- type ClientsLimitExecutor
- type RedisCommandSpec
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 HotKeyFunc ¶ added in v1.7.4
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) Name() string
func (*CacheExpireActionCommandSpec) ShortDesc ¶
func (*CacheExpireActionCommandSpec) ShortDesc() string
type CacheExpireExecutor ¶
type CacheExpireExecutor struct {
// contains filtered or unexported fields
}
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) Name() string
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) 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) Name() string
func (*CacheLimitActionCommandSpec) ShortDesc ¶
func (*CacheLimitActionCommandSpec) ShortDesc() string
type CacheLimitExecutor ¶
type CacheLimitExecutor struct {
// contains filtered or unexported fields
}
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) Aliases() []string
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) Name() string
func (*ClientsLimitActionCommandSpec) ShortDesc ¶ added in v1.7.5
func (*ClientsLimitActionCommandSpec) ShortDesc() string
type ClientsLimitExecutor ¶ added in v1.7.5
type ClientsLimitExecutor struct {
// contains filtered or unexported fields
}
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
Click to show internal directories.
Click to hide internal directories.