diff --git a/commands.go b/commands.go index da23db220..840842ae7 100644 --- a/commands.go +++ b/commands.go @@ -126,6 +126,8 @@ type Cmdable interface { Command(ctx context.Context) *CommandsInfoCmd CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ClientGetName(ctx context.Context) *StringCmd + ClientNoEvictOn(ctx context.Context) *StatusCmd + ClientNoEvictOff(ctx context.Context) *StatusCmd Echo(ctx context.Context, message interface{}) *StringCmd Ping(ctx context.Context) *StatusCmd Quit(ctx context.Context) *StatusCmd @@ -562,6 +564,18 @@ func (c cmdable) ClientGetName(ctx context.Context) *StringCmd { return cmd } +func (c cmdable) ClientNoEvictOn(ctx context.Context) *StatusCmd { + cmd := NewStatusCmd(ctx, "client", "no-evict","on") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ClientNoEvictOff(ctx context.Context) *StatusCmd { + cmd := NewStatusCmd(ctx, "client", "no-evict","off") + _ = c(ctx, cmd) + return cmd +} + func (c cmdable) Echo(ctx context.Context, message interface{}) *StringCmd { cmd := NewStringCmd(ctx, "echo", message) _ = c(ctx, cmd) diff --git a/commands_test.go b/commands_test.go index 1ddb6baec..582d9ba54 100644 --- a/commands_test.go +++ b/commands_test.go @@ -188,6 +188,16 @@ var _ = Describe("Commands", func() { Expect(get.Val()).To(Equal("theclientname")) }) + It("should ClientNoEvict", func() { + result := client.ClientNoEvictOff(ctx) + Expect(result.Err()).NotTo(HaveOccurred()) + Expect(result.Val()).To(Equal("OK")) + + result = client.ClientNoEvictOn(ctx) + Expect(result.Err()).NotTo(HaveOccurred()) + Expect(result.Val()).To(Equal("OK")) + }) + It("should ConfigGet", func() { val, err := client.ConfigGet(ctx, "*").Result() Expect(err).NotTo(HaveOccurred())