mirror of
https://github.com/redis/go-redis.git
synced 2025-11-10 00:00:57 +03:00
feat: Add support for certain slowlog commands (#3585)
* Add support for certain slowlog commands * add NonRedisEnterprise label for slow reset test --------- Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
This commit is contained in:
14
commands.go
14
commands.go
@@ -211,6 +211,8 @@ type Cmdable interface {
|
||||
ShutdownNoSave(ctx context.Context) *StatusCmd
|
||||
SlaveOf(ctx context.Context, host, port string) *StatusCmd
|
||||
SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
|
||||
SlowLogLen(ctx context.Context) *IntCmd
|
||||
SlowLogReset(ctx context.Context) *StatusCmd
|
||||
Time(ctx context.Context) *TimeCmd
|
||||
DebugObject(ctx context.Context, key string) *StringCmd
|
||||
MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd
|
||||
@@ -675,6 +677,18 @@ func (c cmdable) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c cmdable) SlowLogLen(ctx context.Context) *IntCmd {
|
||||
cmd := NewIntCmd(ctx, "slowlog", "len")
|
||||
_ = c(ctx, cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c cmdable) SlowLogReset(ctx context.Context) *StatusCmd {
|
||||
cmd := NewStatusCmd(ctx, "slowlog", "reset")
|
||||
_ = c(ctx, cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c cmdable) Latency(ctx context.Context) *LatencyCmd {
|
||||
cmd := NewLatencyCmd(ctx, "latency", "latest")
|
||||
_ = c(ctx, cmd)
|
||||
|
||||
Reference in New Issue
Block a user