@@ -341,7 +341,7 @@ type CoreCmdable interface {
341
341
Shutdown (ctx context.Context ) * StatusCmd
342
342
ShutdownSave (ctx context.Context ) * StatusCmd
343
343
ShutdownNoSave (ctx context.Context ) * StatusCmd
344
- // TODO SlaveOf(ctx context.Context, host, port string) *StatusCmd
344
+ SlaveOf (ctx context.Context , host , port string ) * StatusCmd
345
345
// TODO SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
346
346
Time (ctx context.Context ) * TimeCmd
347
347
DebugObject (ctx context.Context , key string ) * StringCmd
@@ -379,7 +379,7 @@ type CoreCmdable interface {
379
379
PubSubShardChannels (ctx context.Context , pattern string ) * StringSliceCmd
380
380
PubSubShardNumSub (ctx context.Context , channels ... string ) * StringIntMapCmd
381
381
382
- // TODO ClusterMyShardID(ctx context.Context) *StringCmd
382
+ ClusterMyShardID (ctx context.Context ) * StringCmd
383
383
ClusterSlots (ctx context.Context ) * ClusterSlotsCmd
384
384
ClusterShards (ctx context.Context ) * ClusterShardsCmd
385
385
// TODO ClusterLinks(ctx context.Context) *ClusterLinksCmd
@@ -401,8 +401,6 @@ type CoreCmdable interface {
401
401
ClusterFailover (ctx context.Context ) * StatusCmd
402
402
ClusterAddSlots (ctx context.Context , slots ... int64 ) * StatusCmd
403
403
ClusterAddSlotsRange (ctx context.Context , min , max int64 ) * StatusCmd
404
- // TODO ReadOnly(ctx context.Context) *StatusCmd
405
- // TODO ReadWrite(ctx context.Context) *StatusCmd
406
404
407
405
GeoAdd (ctx context.Context , key string , geoLocation ... GeoLocation ) * IntCmd
408
406
GeoPos (ctx context.Context , key string , members ... string ) * GeoPosCmd
@@ -420,7 +418,7 @@ type CoreCmdable interface {
420
418
// TODO ACLLog(ctx context.Context, count int64) *ACLLogCmd
421
419
// TODO ACLLogReset(ctx context.Context) *StatusCmd
422
420
423
- // TODO ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
421
+ ModuleLoadex (ctx context.Context , conf * ModuleLoadexConfig ) * StringCmd
424
422
GearsCmdable
425
423
ProbabilisticCmdable
426
424
TimeseriesCmdable
@@ -2733,6 +2731,12 @@ func (c *Compat) ShutdownNoSave(ctx context.Context) *StatusCmd {
2733
2731
})
2734
2732
}
2735
2733
2734
+ func (c * Compat ) SlaveOf (ctx context.Context , host , port string ) * StatusCmd {
2735
+ cmd := c .client .B ().Arbitrary ("SLAVEOF" ).Args (host , port ).Build ()
2736
+ resp := c .client .Do (ctx , cmd )
2737
+ return newStatusCmd (resp )
2738
+ }
2739
+
2736
2740
func (c * Compat ) Time (ctx context.Context ) * TimeCmd {
2737
2741
cmd := c .client .B ().Time ().Build ()
2738
2742
resp := c .client .Do (ctx , cmd )
@@ -2940,6 +2944,12 @@ func (c *Compat) PubSubShardNumSub(ctx context.Context, channels ...string) *Str
2940
2944
return newStringIntMapCmd (resp )
2941
2945
}
2942
2946
2947
+ func (c * Compat ) ClusterMyShardID (ctx context.Context ) * StringCmd {
2948
+ cmd := c .client .B ().ClusterMyshardid ().Build ()
2949
+ resp := c .client .Do (ctx , cmd )
2950
+ return newStringCmd (resp )
2951
+ }
2952
+
2943
2953
func (c * Compat ) ClusterSlots (ctx context.Context ) * ClusterSlotsCmd {
2944
2954
cmd := c .client .B ().ClusterSlots ().Build ()
2945
2955
resp := c .client .Do (ctx , cmd )
@@ -5640,6 +5650,20 @@ func (c *Compat) FTTagVals(ctx context.Context, index string, field string) *Str
5640
5650
return newStringSliceCmd (c .client .Do (ctx , cmd ))
5641
5651
}
5642
5652
5653
+ func (c * Compat ) ModuleLoadex (ctx context.Context , conf * ModuleLoadexConfig ) * StringCmd {
5654
+ cmd := c .client .B ().ModuleLoadex ().Path (conf .Path ).Config ()
5655
+ for k , v := range conf .Conf {
5656
+ cmd = cmd .Config (k , str (v ))
5657
+ }
5658
+ var resp rueidis.RedisResult
5659
+ if len (conf .Args ) > 0 {
5660
+ resp = c .client .Do (ctx , cmd .Args (argsToSlice (conf .Args )... ).Build ())
5661
+ } else {
5662
+ resp = c .client .Do (ctx , cmd .Build ())
5663
+ }
5664
+ return newStringCmd (resp )
5665
+ }
5666
+
5643
5667
func (c CacheCompat ) BitCount (ctx context.Context , key string , bitCount * BitCount ) * IntCmd {
5644
5668
var resp rueidis.RedisResult
5645
5669
if bitCount == nil {
0 commit comments