mirror of https://github.com/grafana/loki
fix(deps): update module github.com/redis/go-redis/v9 to v9.8.0 (main) (#17529)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>pull/17532/head
parent
5eb340b330
commit
300c8554fa
@ -1,3 +1,34 @@ |
||||
version: "2" |
||||
run: |
||||
timeout: 5m |
||||
tests: false |
||||
linters: |
||||
settings: |
||||
staticcheck: |
||||
checks: |
||||
- all |
||||
# Incorrect or missing package comment. |
||||
# https://staticcheck.dev/docs/checks/#ST1000 |
||||
- -ST1000 |
||||
# Omit embedded fields from selector expression. |
||||
# https://staticcheck.dev/docs/checks/#QF1008 |
||||
- -QF1008 |
||||
- -ST1003 |
||||
exclusions: |
||||
generated: lax |
||||
presets: |
||||
- comments |
||||
- common-false-positives |
||||
- legacy |
||||
- std-error-handling |
||||
paths: |
||||
- third_party$ |
||||
- builtin$ |
||||
- examples$ |
||||
formatters: |
||||
exclusions: |
||||
generated: lax |
||||
paths: |
||||
- third_party$ |
||||
- builtin$ |
||||
- examples$ |
||||
|
@ -0,0 +1,106 @@ |
||||
--- |
||||
|
||||
services: |
||||
redis: |
||||
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:rs-7.4.0-v2} |
||||
platform: linux/amd64 |
||||
container_name: redis-standalone |
||||
environment: |
||||
- TLS_ENABLED=yes |
||||
- REDIS_CLUSTER=no |
||||
- PORT=6379 |
||||
- TLS_PORT=6666 |
||||
command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --tls-auth-clients optional --save ""} |
||||
ports: |
||||
- 6379:6379 |
||||
- 6666:6666 # TLS port |
||||
volumes: |
||||
- "./dockers/standalone:/redis/work" |
||||
profiles: |
||||
- standalone |
||||
- sentinel |
||||
- all-stack |
||||
- all |
||||
|
||||
osscluster: |
||||
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:rs-7.4.0-v2} |
||||
platform: linux/amd64 |
||||
container_name: redis-osscluster |
||||
environment: |
||||
- NODES=6 |
||||
- PORT=16600 |
||||
command: "--cluster-enabled yes" |
||||
ports: |
||||
- "16600-16605:16600-16605" |
||||
volumes: |
||||
- "./dockers/osscluster:/redis/work" |
||||
profiles: |
||||
- cluster |
||||
- all-stack |
||||
- all |
||||
|
||||
sentinel-cluster: |
||||
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:rs-7.4.0-v2} |
||||
platform: linux/amd64 |
||||
container_name: redis-sentinel-cluster |
||||
network_mode: "host" |
||||
environment: |
||||
- NODES=3 |
||||
- TLS_ENABLED=yes |
||||
- REDIS_CLUSTER=no |
||||
- PORT=9121 |
||||
command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --tls-auth-clients optional --save ""} |
||||
#ports: |
||||
# - "9121-9123:9121-9123" |
||||
volumes: |
||||
- "./dockers/sentinel-cluster:/redis/work" |
||||
profiles: |
||||
- sentinel |
||||
- all-stack |
||||
- all |
||||
|
||||
sentinel: |
||||
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:rs-7.4.0-v2} |
||||
platform: linux/amd64 |
||||
container_name: redis-sentinel |
||||
depends_on: |
||||
- sentinel-cluster |
||||
environment: |
||||
- NODES=3 |
||||
- REDIS_CLUSTER=no |
||||
- PORT=26379 |
||||
command: ${REDIS_EXTRA_ARGS:---sentinel} |
||||
network_mode: "host" |
||||
#ports: |
||||
# - 26379:26379 |
||||
# - 26380:26380 |
||||
# - 26381:26381 |
||||
volumes: |
||||
- "./dockers/sentinel.conf:/redis/config-default/redis.conf" |
||||
- "./dockers/sentinel:/redis/work" |
||||
profiles: |
||||
- sentinel |
||||
- all-stack |
||||
- all |
||||
|
||||
ring-cluster: |
||||
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:rs-7.4.0-v2} |
||||
platform: linux/amd64 |
||||
container_name: redis-ring-cluster |
||||
environment: |
||||
- NODES=3 |
||||
- TLS_ENABLED=yes |
||||
- REDIS_CLUSTER=no |
||||
- PORT=6390 |
||||
command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --tls-auth-clients optional --save ""} |
||||
ports: |
||||
- 6390:6390 |
||||
- 6391:6391 |
||||
- 6392:6392 |
||||
volumes: |
||||
- "./dockers/ring:/redis/work" |
||||
profiles: |
||||
- ring |
||||
- cluster |
||||
- all-stack |
||||
- all |
@ -1,149 +0,0 @@ |
||||
package redis |
||||
|
||||
import ( |
||||
"context" |
||||
"fmt" |
||||
"strings" |
||||
) |
||||
|
||||
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 |
||||
TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd |
||||
TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd |
||||
TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd |
||||
TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd |
||||
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 |
||||
} |
||||
|
||||
type TFunctionListOptions struct { |
||||
Withcode bool |
||||
Verbose int |
||||
Library string |
||||
} |
||||
|
||||
type TFCallOptions struct { |
||||
Keys []string |
||||
Arguments []string |
||||
} |
||||
|
||||
// TFunctionLoad - load a new JavaScript library into Redis.
|
||||
// For more information - https://redis.io/commands/tfunction-load/
|
||||
func (c cmdable) TFunctionLoad(ctx context.Context, lib string) *StatusCmd { |
||||
args := []interface{}{"TFUNCTION", "LOAD", lib} |
||||
cmd := NewStatusCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
func (c cmdable) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd { |
||||
args := []interface{}{"TFUNCTION", "LOAD"} |
||||
if options != nil { |
||||
if options.Replace { |
||||
args = append(args, "REPLACE") |
||||
} |
||||
if options.Config != "" { |
||||
args = append(args, "CONFIG", options.Config) |
||||
} |
||||
} |
||||
args = append(args, lib) |
||||
cmd := NewStatusCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
// TFunctionDelete - delete a JavaScript library from Redis.
|
||||
// For more information - https://redis.io/commands/tfunction-delete/
|
||||
func (c cmdable) TFunctionDelete(ctx context.Context, libName string) *StatusCmd { |
||||
args := []interface{}{"TFUNCTION", "DELETE", libName} |
||||
cmd := NewStatusCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
// TFunctionList - list the functions with additional information about each function.
|
||||
// For more information - https://redis.io/commands/tfunction-list/
|
||||
func (c cmdable) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd { |
||||
args := []interface{}{"TFUNCTION", "LIST"} |
||||
cmd := NewMapStringInterfaceSliceCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
func (c cmdable) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd { |
||||
args := []interface{}{"TFUNCTION", "LIST"} |
||||
if options != nil { |
||||
if options.Withcode { |
||||
args = append(args, "WITHCODE") |
||||
} |
||||
if options.Verbose != 0 { |
||||
v := strings.Repeat("v", options.Verbose) |
||||
args = append(args, v) |
||||
} |
||||
if options.Library != "" { |
||||
args = append(args, "LIBRARY", options.Library) |
||||
} |
||||
} |
||||
cmd := NewMapStringInterfaceSliceCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
// TFCall - invoke a function.
|
||||
// For more information - https://redis.io/commands/tfcall/
|
||||
func (c cmdable) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd { |
||||
lf := libName + "." + funcName |
||||
args := []interface{}{"TFCALL", lf, numKeys} |
||||
cmd := NewCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
func (c cmdable) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd { |
||||
lf := libName + "." + funcName |
||||
args := []interface{}{"TFCALL", lf, numKeys} |
||||
if options != nil { |
||||
for _, key := range options.Keys { |
||||
args = append(args, key) |
||||
} |
||||
for _, key := range options.Arguments { |
||||
args = append(args, key) |
||||
} |
||||
} |
||||
cmd := NewCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
// TFCallASYNC - invoke an asynchronous JavaScript function (coroutine).
|
||||
// For more information - https://redis.io/commands/TFCallASYNC/
|
||||
func (c cmdable) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd { |
||||
lf := fmt.Sprintf("%s.%s", libName, funcName) |
||||
args := []interface{}{"TFCALLASYNC", lf, numKeys} |
||||
cmd := NewCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
||||
|
||||
func (c cmdable) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd { |
||||
lf := fmt.Sprintf("%s.%s", libName, funcName) |
||||
args := []interface{}{"TFCALLASYNC", lf, numKeys} |
||||
if options != nil { |
||||
for _, key := range options.Keys { |
||||
args = append(args, key) |
||||
} |
||||
for _, key := range options.Arguments { |
||||
args = append(args, key) |
||||
} |
||||
} |
||||
cmd := NewCmd(ctx, args...) |
||||
_ = c(ctx, cmd) |
||||
return cmd |
||||
} |
Loading…
Reference in new issue