From ccdd6eaf82e0a93f229966c7723fc6aa07ec1c1c Mon Sep 17 00:00:00 2001 From: Tiago Peczenyj Date: Sat, 9 Sep 2023 15:57:37 +0200 Subject: [PATCH] make public probabilistic and redis gears interfaces --- commands.go | 4 ++-- probabilistic.go | 2 +- redis_gears.go | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/commands.go b/commands.go index 07c8e2c88..94f359c2f 100644 --- a/commands.go +++ b/commands.go @@ -505,8 +505,8 @@ type Cmdable interface { ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd - gearsCmdable - probabilisticCmdable + GearsCmdable + ProbabilisticCmdable } type StatefulCmdable interface { diff --git a/probabilistic.go b/probabilistic.go index 8e32bca98..df351bfda 100644 --- a/probabilistic.go +++ b/probabilistic.go @@ -7,7 +7,7 @@ import ( "github.com/redis/go-redis/v9/internal/proto" ) -type probabilisticCmdable interface { +type ProbabilisticCmdable interface { BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd BFCard(ctx context.Context, key string) *IntCmd BFExists(ctx context.Context, key string, element interface{}) *BoolCmd diff --git a/redis_gears.go b/redis_gears.go index 5fafea403..76b76b59c 100644 --- a/redis_gears.go +++ b/redis_gears.go @@ -6,7 +6,7 @@ import ( "strings" ) -type gearsCmdable interface { +type GearsCmdable interface { TFunctionLoad(ctx context.Context, lib string) *StatusCmd TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd TFunctionDelete(ctx context.Context, libName string) *StatusCmd @@ -17,6 +17,7 @@ type gearsCmdable interface { TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd } + type TFunctionLoadOptions struct { Replace bool Config string