Skip to content

Commit fcea155

Browse files
committed
add ACLLogReset to rueidiscompat
Signed-off-by: hcc429 <[email protected]>
1 parent 93e9af3 commit fcea155

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

rueidiscompat/adapter.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ type CoreCmdable interface {
416416

417417
ACLDryRun(ctx context.Context, username string, command ...any) *StringCmd
418418
// TODO ACLLog(ctx context.Context, count int64) *ACLLogCmd
419-
// TODO ACLLogReset(ctx context.Context) *StatusCmd
419+
ACLLogReset(ctx context.Context) *StatusCmd
420+
420421

421422
ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
422423
GearsCmdable
@@ -3202,6 +3203,12 @@ func (c *Compat) ACLDryRun(ctx context.Context, username string, command ...any)
32023203
return newStringCmd(resp)
32033204
}
32043205

3206+
func (c *Compat) ACLLogReset(ctx context.Context) *StatusCmd {
3207+
cmd := c.client.B().AclLog().Reset().Build()
3208+
resp := c.client.Do(ctx, cmd)
3209+
return newStatusCmd(resp)
3210+
}
3211+
32053212
func (c *Compat) doPrimaries(ctx context.Context, fn func(c rueidis.Client) error) error {
32063213
if c.pOnly {
32073214
return fn(c.client)

rueidiscompat/pipeline.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,6 +2089,12 @@ func (c *Pipeline) ACLDryRun(ctx context.Context, username string, command ...an
20892089
return ret
20902090
}
20912091

2092+
func (c *Pipeline) ACLLogReset(ctx context.Context) *StatusCmd {
2093+
ret := c.comp.ACLLogReset(ctx)
2094+
c.rets = append(c.rets, ret)
2095+
return ret
2096+
}
2097+
20922098
func (c *Pipeline) TFunctionLoad(ctx context.Context, lib string) *StatusCmd {
20932099
ret := c.comp.TFunctionLoad(ctx, lib)
20942100
c.rets = append(c.rets, ret)

0 commit comments

Comments
 (0)