Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17985317d2 | ||
|
|
f06c0abcaa | ||
|
|
7297aab929 | ||
|
|
e392682394 | ||
|
|
c6c28112ec | ||
|
|
df839dc7d7 | ||
|
|
2fc83f6b6e | ||
|
|
b6b498e208 |
No files matched your search
+3
-23
@@ -1,23 +1,3 @@
|
||||
docker-build:
|
||||
image: docker:latest
|
||||
stage: build
|
||||
services:
|
||||
- docker:dind
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
- export VERSION=`cat .version `
|
||||
- echo $VERSION
|
||||
- echo $CI_DOCKER_FILE
|
||||
- echo $CI_REGISTRY
|
||||
script:
|
||||
- set
|
||||
- mkdir -p migrations
|
||||
- docker build -f "$CI_DOCKER_FILE" --force-rm --build-arg="version=$VERSION" --build-arg="app_name=$CI_PROJECT_NAME" --pull -t "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION" .
|
||||
- |
|
||||
docker tag "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION" "$CI_REGISTRY/$CI_PROJECT_NAME:latest"
|
||||
docker push "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION"
|
||||
docker push "$CI_REGISTRY/$CI_PROJECT_NAME:latest"
|
||||
docker rmi -f "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION"
|
||||
docker rmi -f "$CI_REGISTRY/$CI_PROJECT_NAME:latest"
|
||||
- docker logout $CI_REGISTRY
|
||||
|
||||
include:
|
||||
- project: '$CI_PROJECT_PATH'
|
||||
file: '/ci-isp-go-service.yml'
|
||||
+64
-48
@@ -1,53 +1,69 @@
|
||||
version: "2"
|
||||
run:
|
||||
allow-parallel-runners: true
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: controller #достаточное кол-во контекса на уровне контроллеров
|
||||
linters:
|
||||
- wrapcheck
|
||||
- path: transaction #транзакции прозрачны
|
||||
linters:
|
||||
- wrapcheck
|
||||
linters:
|
||||
enable-all: true
|
||||
default: all
|
||||
disable:
|
||||
- goimports #у нас собственные правила форматирования импортов
|
||||
- wsl #расставление пробелов очень индивидуально
|
||||
- varnamelen #очень индивидуально (db)
|
||||
- exhaustruct #не имеет смысла
|
||||
- contextcheck #не имеет смысла
|
||||
- gci #у нас собственные правила форматирования импортов
|
||||
- gofumpt #у нас собственные правила форматирования импортов
|
||||
- nolintlint #Goland все равно форматирует с отступом
|
||||
- nlreturn #не всегда имеет смысл
|
||||
- godot #не актуально для свагера
|
||||
- godox #не позволяет оставлять todo
|
||||
- depguard #не всегда имеет смысл
|
||||
- dupword #не имеет смысла
|
||||
- tagalign #не всегда имеет смысл
|
||||
- musttag #у нас собственные правило: не используем теги, если работаем с пакетом isp-kit/json и с внутренними структурами(между нашими сервисами), при этом теги обязательный для всех внених для нас структур
|
||||
- perfsprint #мнимая производительность в угоду читаемости
|
||||
- gomnd #устарел
|
||||
- exportloopref #устарел
|
||||
- execinquery #устарел
|
||||
linters-settings:
|
||||
funlen:
|
||||
lines: 80
|
||||
lll:
|
||||
line-length: 150
|
||||
cyclop:
|
||||
max-complexity: 15 #по умолчанию 10 мало
|
||||
revive:
|
||||
- contextcheck # не имеет смысла
|
||||
- depguard # не всегда имеет смысл
|
||||
- dupword # не имеет смысла
|
||||
- exhaustruct # не имеет смысла
|
||||
- godot # не актуально для swagger
|
||||
- godox # не позволяет оставлять todo
|
||||
- musttag # у нас собственное правило: не используем теги, если работаем с пакетом isp-kit/json и с внутренними структурами(между нашими сервисами), при этом теги обязательный для всех внешних для нас структур
|
||||
- nlreturn # не всегда имеет смысл
|
||||
- nolintlint # Goland все равно форматирует с отступом
|
||||
- perfsprint # мнимая производительность в угоду читаемости
|
||||
- tagalign # не всегда имеет смысл
|
||||
- varnamelen # очень индивидуально (db)
|
||||
- wsl # расставление пробелов очень индивидуально
|
||||
- wsl_v5 # расставление пробелов очень индивидуально
|
||||
settings:
|
||||
cyclop:
|
||||
max-complexity: 15 # по умолчанию 10 мало
|
||||
funlen:
|
||||
lines: 80
|
||||
lll:
|
||||
line-length: 150
|
||||
revive:
|
||||
rules:
|
||||
- name: var-naming # отключаем Id -> ID
|
||||
disabled: true
|
||||
staticcheck:
|
||||
checks: # отключаем Id -> ID
|
||||
- -ST1000
|
||||
- -ST1016
|
||||
- -ST1020
|
||||
- -ST1021
|
||||
- -ST1022
|
||||
testifylint:
|
||||
disable:
|
||||
- compares
|
||||
- equal-values
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
rules:
|
||||
- name: var-naming #отключаем Id -> ID
|
||||
disabled: true
|
||||
stylecheck:
|
||||
checks: #отключаем Id -> ID
|
||||
- "-ST1000"
|
||||
- "-ST1016"
|
||||
- "-ST1020"
|
||||
- "-ST1021"
|
||||
- "-ST1022"
|
||||
testifylint:
|
||||
disable:
|
||||
- compares
|
||||
- linters:
|
||||
- wrapcheck
|
||||
path: controller # достаточное кол-во контекста на уровне контроллеров
|
||||
- linters:
|
||||
- wrapcheck
|
||||
path: transaction # транзакции прозрачны
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
@@ -1,3 +1,20 @@
|
||||
# v1.8.0
|
||||
* Для метода `/rate_limit/inmem` добавлено поле `infiniteKey`, чтобы ключ не чистился из памяти
|
||||
# v1.7.0
|
||||
* Добавлена возможность использования inMemRateLimiter с RPS<1
|
||||
# v1.6.1
|
||||
* Обновлены зависимости
|
||||
# v1.6.0
|
||||
* обновлены зависимости
|
||||
* Миграция golangci-lint v2
|
||||
# v1.5.2
|
||||
* обновлены зависимости
|
||||
# v1.5.1
|
||||
* Добавлены настройки максимального и минимального времени ожидания между ретраями захвата лока
|
||||
* Изменены значения по умолчанию максимального и минимального времени ожидания между ретраями захвата лога: с 50-250 на 50-100
|
||||
# v1.5.0
|
||||
* добавлен метод `/rate_limit/inmem`
|
||||
* обновлены зависимости
|
||||
# v1.4.1
|
||||
* добавлена обработка ошибки при закрытии клиента `redis`
|
||||
# v1.4.0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FROM dockerhub.mos.ru/mosos/arbat:15.5 as builder
|
||||
RUN zypper --no-gpg-checks update -y && zypper --no-gpg-checks install -y go1.23 git
|
||||
RUN zypper --no-gpg-checks update -y && zypper --no-gpg-checks install -y go1.24 git
|
||||
WORKDIR /build
|
||||
ARG version
|
||||
ENV version_env=$version
|
||||
|
||||
+25
-10
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/txix-open/isp-kit/observability/sentry"
|
||||
"github.com/txix-open/isp-kit/rc"
|
||||
"isp-lock-service/conf"
|
||||
"isp-lock-service/repository"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/app"
|
||||
@@ -17,23 +18,29 @@ import (
|
||||
)
|
||||
|
||||
type Assembly struct {
|
||||
boot *bootstrap.Bootstrap
|
||||
server *grpc.Server
|
||||
redisCli *goredislib.Client
|
||||
logger *log.Adapter
|
||||
boot *bootstrap.Bootstrap
|
||||
server *grpc.Server
|
||||
redisCli *goredislib.Client
|
||||
logger *log.Adapter
|
||||
rateLimiterRepo *repository.RateLimiter
|
||||
}
|
||||
|
||||
func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
|
||||
server := grpc.DefaultServer()
|
||||
return &Assembly{
|
||||
boot: boot,
|
||||
server: server,
|
||||
redisCli: nil,
|
||||
logger: boot.App.Logger(),
|
||||
boot: boot,
|
||||
server: server,
|
||||
redisCli: nil,
|
||||
logger: boot.App.Logger(),
|
||||
rateLimiterRepo: nil,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (a *Assembly) ReceiveConfig(ctx context.Context, remoteConfig []byte) error {
|
||||
if a.rateLimiterRepo != nil {
|
||||
a.rateLimiterRepo.Close()
|
||||
}
|
||||
|
||||
newCfg, _, err := rc.Upgrade[conf.Remote](a.boot.RemoteConfig, remoteConfig)
|
||||
if err != nil {
|
||||
a.boot.Fatal(errors.WithMessage(err, "upgrade remote config"))
|
||||
@@ -48,8 +55,10 @@ func (a *Assembly) ReceiveConfig(ctx context.Context, remoteConfig []byte) error
|
||||
|
||||
logger := sentry.WrapErrorLogger(a.logger, a.boot.SentryHub)
|
||||
locator := NewLocator(logger, a.redisCli, newCfg)
|
||||
handler := locator.Handler()
|
||||
a.server.Upgrade(handler)
|
||||
locatorCfg := locator.Config()
|
||||
|
||||
a.rateLimiterRepo = locatorCfg.rateLimiterRepo
|
||||
a.server.Upgrade(locatorCfg.handler)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -91,6 +100,12 @@ func (a *Assembly) Closers() []app.Closer {
|
||||
}
|
||||
return nil
|
||||
}),
|
||||
app.CloserFunc(func() error {
|
||||
if a.rateLimiterRepo != nil {
|
||||
a.rateLimiterRepo.Close()
|
||||
}
|
||||
return nil
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-7
@@ -1,13 +1,15 @@
|
||||
package assembly
|
||||
|
||||
import (
|
||||
goredislib "github.com/redis/go-redis/v9"
|
||||
"github.com/txix-open/isp-kit/grpc/endpoint/grpclog"
|
||||
"isp-lock-service/conf"
|
||||
"isp-lock-service/controller"
|
||||
"isp-lock-service/repository"
|
||||
"isp-lock-service/routes"
|
||||
"isp-lock-service/service"
|
||||
|
||||
goredislib "github.com/redis/go-redis/v9"
|
||||
|
||||
"github.com/txix-open/isp-kit/grpc"
|
||||
"github.com/txix-open/isp-kit/grpc/endpoint"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
@@ -27,12 +29,17 @@ func NewLocator(logger log.Logger, redisCli goredislib.UniversalClient, cfg conf
|
||||
}
|
||||
}
|
||||
|
||||
func (l Locator) Handler() *grpc.Mux {
|
||||
lockRepo := repository.NewLocker(l.logger, l.redisCli, l.cfg.Redis)
|
||||
type locatorConfig struct {
|
||||
handler *grpc.Mux
|
||||
rateLimiterRepo *repository.RateLimiter
|
||||
}
|
||||
|
||||
func (l Locator) Config() locatorConfig {
|
||||
lockRepo := repository.NewLocker(l.logger, l.redisCli, l.cfg.Redis, l.cfg.LockSettings)
|
||||
lockerService := service.NewLocker(l.logger, lockRepo)
|
||||
lockerController := controller.NewLocker(l.logger, lockerService)
|
||||
|
||||
rateLimiterRepo := repository.NewRateLimiter(l.logger, l.redisCli, l.cfg.Redis)
|
||||
rateLimiterRepo := repository.NewRateLimiter(l.logger, l.redisCli, l.cfg)
|
||||
rateLimiterService := service.NewRateLimiter(rateLimiterRepo)
|
||||
rateLimiterController := controller.NewRateLimiter(rateLimiterService)
|
||||
|
||||
@@ -45,7 +52,10 @@ func (l Locator) Handler() *grpc.Mux {
|
||||
RateLimiter: rateLimiterController,
|
||||
DailyLimiter: dailyLimiterController,
|
||||
}
|
||||
mapper := endpoint.DefaultWrapper(l.logger, endpoint.BodyLogger(l.logger))
|
||||
handler := routes.Handler(mapper, c)
|
||||
return handler
|
||||
mapper := endpoint.DefaultWrapper(l.logger, grpclog.Log(l.logger, true))
|
||||
|
||||
return locatorConfig{
|
||||
handler: routes.Handler(mapper, c),
|
||||
rateLimiterRepo: rateLimiterRepo,
|
||||
}
|
||||
}
|
||||
@@ -5,5 +5,13 @@
|
||||
"password": "",
|
||||
"db": 0,
|
||||
"prefix": "isp-lock-service"
|
||||
},
|
||||
"inMemLimiter": {
|
||||
"lastUseThresholdInSec": 10,
|
||||
"clearPeriodInSec": 60
|
||||
},
|
||||
"lockSettings": {
|
||||
"maxLockRetryDelayMs": 100,
|
||||
"minLockRetryDelayMs": 50
|
||||
}
|
||||
}
|
||||
+14
-2
@@ -17,8 +17,10 @@ func init() {
|
||||
}
|
||||
|
||||
type Remote struct {
|
||||
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
Redis Redis `schema:"Настройки redis"`
|
||||
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
|
||||
Redis Redis `schema:"Настройки redis"`
|
||||
InMemLimiter InMemLimiter `schema:"Настройка rate limiter в оперативной памяти"`
|
||||
LockSettings LockSettings `schema:"Настройка захвата лока"`
|
||||
}
|
||||
|
||||
type Redis struct {
|
||||
@@ -37,3 +39,13 @@ type RedisSentinel struct {
|
||||
Username string `schema:"Имя пользователя в sentinel"`
|
||||
Password string `schema:"Пароль в sentinel"`
|
||||
}
|
||||
|
||||
type InMemLimiter struct {
|
||||
ClearPeriodInSec int `validate:"required,min=1" schema:"Интервал очистки неиспользуемых лимитеров в секундах"`
|
||||
LastUseThresholdInSec int `validate:"required,min=1" schema:"Пороговое значение в секундах, после которого лимитер считается неиспользуемым"`
|
||||
}
|
||||
|
||||
type LockSettings struct {
|
||||
MaxLockRetryDelayMs int `validate:"gte=0,gtefield=MinLockRetryDelayMs" schema:"Максимальное ожидание между ретраями захвата лока, по умолчанию 100"`
|
||||
MinLockRetryDelayMs int `validate:"gte=0" schema:"Минимальное ожидание между ретраями захвата лока, по умолчанию 50"`
|
||||
}
|
||||
@@ -18,6 +18,13 @@ type Locker struct {
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func NewLocker(logger log.Logger, s LockerService) Locker {
|
||||
return Locker{
|
||||
s: s,
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
// Lock
|
||||
// @Tags locker
|
||||
// @Summary выставляем лок на строку
|
||||
@@ -44,10 +51,3 @@ func (l Locker) Lock(ctx context.Context, req domain.LockRequest) (*domain.LockR
|
||||
func (l Locker) UnLock(ctx context.Context, req domain.UnLockRequest) (*domain.LockResponse, error) {
|
||||
return l.s.UnLock(ctx, req)
|
||||
}
|
||||
|
||||
func NewLocker(logger log.Logger, s LockerService) Locker {
|
||||
return Locker{
|
||||
s: s,
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
type limiterService interface {
|
||||
Limit(ctx context.Context, req domain.RateLimiterRequest) (*domain.RateLimiterResponse, error)
|
||||
LimitInMem(ctx context.Context, req domain.RateLimiterInMemRequest) (*domain.RateLimiterInMemResponse, error)
|
||||
}
|
||||
|
||||
type RateLimiter struct {
|
||||
@@ -21,3 +22,7 @@ func NewRateLimiter(svc limiterService) RateLimiter {
|
||||
func (c RateLimiter) Limit(ctx context.Context, req domain.RateLimiterRequest) (*domain.RateLimiterResponse, error) {
|
||||
return c.svc.Limit(ctx, req)
|
||||
}
|
||||
|
||||
func (c RateLimiter) LimitInMem(ctx context.Context, req domain.RateLimiterInMemRequest) (*domain.RateLimiterInMemResponse, error) {
|
||||
return c.svc.LimitInMem(ctx, req)
|
||||
}
|
||||
+2
-1
@@ -3,6 +3,7 @@ definitions:
|
||||
domain.LockResponse:
|
||||
properties:
|
||||
lockKey:
|
||||
description: 'nolint: tagliatelle'
|
||||
type: string
|
||||
type: object
|
||||
host: localhost:9000
|
||||
@@ -59,7 +60,7 @@ paths:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
description: OK
|
||||
summary: снимаем лок со строки
|
||||
tags:
|
||||
- locker
|
||||
|
||||
@@ -9,8 +9,18 @@ type RateLimiterRequest struct {
|
||||
MaxRps int `validate:"required"`
|
||||
}
|
||||
|
||||
type RateLimiterInMemRequest struct {
|
||||
Key string `validate:"required"`
|
||||
MaxRps float64 `validate:"required"`
|
||||
InfiniteKey bool
|
||||
}
|
||||
|
||||
type RateLimiterResponse struct {
|
||||
Allow bool
|
||||
Remaining int
|
||||
RetryAfter time.Duration
|
||||
}
|
||||
|
||||
type RateLimiterInMemResponse struct {
|
||||
PassAfter time.Duration
|
||||
}
|
||||
@@ -1,75 +1,81 @@
|
||||
module isp-lock-service
|
||||
|
||||
go 1.23
|
||||
go 1.25
|
||||
|
||||
require (
|
||||
github.com/go-redis/redis_rate/v10 v10.0.1
|
||||
github.com/go-redsync/redsync/v4 v4.13.0
|
||||
github.com/go-redsync/redsync/v4 v4.14.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/redis/go-redis/v9 v9.6.1
|
||||
github.com/txix-open/isp-kit v1.38.1
|
||||
github.com/txix-open/jsonschema v1.2.0
|
||||
golang.org/x/sync v0.8.0
|
||||
github.com/redis/go-redis/v9 v9.16.0
|
||||
github.com/txix-open/isp-kit v1.63.0
|
||||
github.com/txix-open/jsonschema v1.3.0
|
||||
golang.org/x/sync v0.17.0
|
||||
golang.org/x/time v0.14.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.0 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/bahlo/generic-list-go v0.2.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/coder/websocket v1.8.12 // indirect
|
||||
github.com/coder/websocket v1.8.14 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
|
||||
github.com/getsentry/sentry-go v0.29.0 // indirect
|
||||
github.com/go-faker/faker/v4 v4.4.2 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
|
||||
github.com/getsentry/sentry-go v0.35.2 // indirect
|
||||
github.com/go-faker/faker/v4 v4.6.1 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.17.9 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mailru/easyjson v0.9.1 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_golang v1.20.4 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/common v0.59.1 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
github.com/stretchr/testify v1.9.0 // indirect
|
||||
github.com/prometheus/client_golang v1.23.2 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.66.1 // indirect
|
||||
github.com/prometheus/procfs v0.17.0 // indirect
|
||||
github.com/stretchr/testify v1.11.1 // indirect
|
||||
github.com/txix-open/bellows v1.2.0 // indirect
|
||||
github.com/txix-open/etp/v3 v3.2.0 // indirect
|
||||
github.com/txix-open/validator/v10 v10.0.0-20240401163703-e83541b40f99 // indirect
|
||||
github.com/txix-open/etp/v4 v4.0.1 // indirect
|
||||
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect
|
||||
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||
go.opentelemetry.io/otel v1.30.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.30.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.30.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.30.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
go.opentelemetry.io/otel v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.38.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.8.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/crypto v0.27.0 // indirect
|
||||
golang.org/x/net v0.29.0 // indirect
|
||||
golang.org/x/sys v0.25.0 // indirect
|
||||
golang.org/x/text v0.18.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
||||
google.golang.org/grpc v1.67.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
golang.org/x/crypto v0.42.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546
|
||||
golang.org/x/net v0.44.0 // indirect
|
||||
golang.org/x/sys v0.36.0 // indirect
|
||||
golang.org/x/text v0.29.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 // indirect
|
||||
google.golang.org/grpc v1.75.1 // indirect
|
||||
google.golang.org/protobuf v1.36.9 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
@@ -10,28 +10,28 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
|
||||
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
|
||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
|
||||
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
|
||||
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
|
||||
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4=
|
||||
github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4=
|
||||
github.com/getsentry/sentry-go v0.29.0 h1:YtWluuCFg9OfcqnaujpY918N/AhCCwarIDWOYSBAjCA=
|
||||
github.com/getsentry/sentry-go v0.29.0/go.mod h1:jhPesDAL0Q0W2+2YEuVOvdWmVtdsr1+jtBrlDEVWwLY=
|
||||
github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
||||
github.com/getsentry/sentry-go v0.35.2 h1:jKuujpRwa8FFRYMIwwZpu83Xh0voll9bmvyc6310WBM=
|
||||
github.com/getsentry/sentry-go v0.35.2/go.mod h1:mdL49ixwT2yi57k5eh7mpnDyPybixPzlzEJFu0Z76QA=
|
||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
github.com/go-faker/faker/v4 v4.4.2 h1:96WeU9QKEqRUVYdjHquY2/5bAqmVM0IfGKHV5mbfqmQ=
|
||||
github.com/go-faker/faker/v4 v4.4.2/go.mod h1:4K3v4AbKXYNHMQNaREMc9/kRB9j5JJzpFo6KHRvrcIw=
|
||||
github.com/go-faker/faker/v4 v4.6.1 h1:xUyVpAjEtB04l6XFY0V/29oR332rOSPWV4lU8RwDt4k=
|
||||
github.com/go-faker/faker/v4 v4.6.1/go.mod h1:arSdxNCSt7mOhdk8tEolvHeIJ7eX4OX80wXjKKvkKBY=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
@@ -48,27 +48,30 @@ github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo=
|
||||
github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU=
|
||||
github.com/go-redsync/redsync/v4 v4.13.0 h1:49X6GJfnbLGaIpBBREM/zA4uIMDXKAh1NDkvQ1EkZKA=
|
||||
github.com/go-redsync/redsync/v4 v4.13.0/go.mod h1:HMW4Q224GZQz6x1Xc7040Yfgacukdzu7ifTDAKiyErQ=
|
||||
github.com/gomodule/redigo v1.8.9 h1:Sl3u+2BI/kk+VEatbj0scLdrFhjPmbxOc1myhDP41ws=
|
||||
github.com/gomodule/redigo v1.8.9/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/go-redsync/redsync/v4 v4.14.0 h1:zyxzFJsmQHIPBl8iBT7KFKohWsjsghgGLiP8TnFMLNc=
|
||||
github.com/go-redsync/redsync/v4 v4.14.0/go.mod h1:twMlVd19upZ/juvJyJGlQOSQxor1oeHtjs62l4pRFzo=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/gomodule/redigo v1.9.2 h1:HrutZBLhSIU8abiSfW8pj8mPhOyMYjZT/wcA4/L9L9s=
|
||||
github.com/gomodule/redigo v1.9.2/go.mod h1:KsU3hiK/Ay8U42qpaJk+kuNa3C+spxapWpM+ywhcgtw=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
|
||||
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
@@ -77,8 +80,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8=
|
||||
github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@@ -94,22 +97,24 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI=
|
||||
github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
|
||||
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||
github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0=
|
||||
github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0=
|
||||
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
||||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
|
||||
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
|
||||
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
|
||||
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
|
||||
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
|
||||
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
|
||||
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
|
||||
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
|
||||
github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4=
|
||||
github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA=
|
||||
github.com/redis/rueidis v1.0.19 h1:s65oWtotzlIFN8eMPhyYwxlwLR1lUdhza2KtWprKYSo=
|
||||
github.com/redis/rueidis v1.0.19/go.mod h1:8B+r5wdnjwK3lTFml5VtxjzGOQAC+5UmujoD12pDrEo=
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/redis/go-redis/v9 v9.16.0 h1:OotgqgLSRCmzfqChbQyG1PHC3tLNR89DG4jdOERSEP4=
|
||||
github.com/redis/go-redis/v9 v9.16.0/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370=
|
||||
github.com/redis/rueidis v1.0.64 h1:XqgbueDuNV3qFdVdQwAHJl1uNt90zUuAJuzqjH4cw6Y=
|
||||
github.com/redis/rueidis v1.0.64/go.mod h1:Lkhr2QTgcoYBhxARU7kJRO8SyVlgUuEkcJO1Y8MCluA=
|
||||
github.com/redis/rueidis/rueidiscompat v1.0.64 h1:M8JbLP4LyHQhBLBRsUQIzui8/LyTtdESNIMVveqm4RY=
|
||||
github.com/redis/rueidis/rueidiscompat v1.0.64/go.mod h1:8pJVPhEjpw0izZFSxYwDziUiEYEkEklTSw/nZzga61M=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
@@ -118,22 +123,23 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203 h1:QVqDTf3h2WHt08YuiTGPZLls0Wq99X9bWd0Q5ZSBesM=
|
||||
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8=
|
||||
github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgjeY=
|
||||
github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o=
|
||||
github.com/txix-open/etp/v3 v3.2.0 h1:EgTchT8VtCYV1iEo/y4jII3/NybrXiQDE0y6pmS350M=
|
||||
github.com/txix-open/etp/v3 v3.2.0/go.mod h1:lgen0TJmiturgBhvlxH1/PQ7iLL/OebKbxPAQYkuKI0=
|
||||
github.com/txix-open/grmq v1.6.0 h1:V4QRb0sI2CMfdMaMsFGvGvUIDGad5vr3khNU7A3LlP8=
|
||||
github.com/txix-open/grmq v1.6.0/go.mod h1:s+NNNv42+32yLpjvl2tpqtyBbMB9e7kKFee3lfa/dyo=
|
||||
github.com/txix-open/isp-kit v1.38.1 h1:IYsiW2xc06//xQsWcHX9A1GXCGTXQRXbUqotcxa6eDY=
|
||||
github.com/txix-open/isp-kit v1.38.1/go.mod h1:uVn5y71Rg8jlFjFK3+QCh9uw1O7mcK+1grCNFZRWhME=
|
||||
github.com/txix-open/jsonschema v1.2.0 h1:B8TrdSsPhDvYv67oi/LVqf7/+PuqFlMsNwUzGeHfl1s=
|
||||
github.com/txix-open/jsonschema v1.2.0/go.mod h1:l8YDZ1nvJrw6uxWowSVOxCV/ebiMJyapffW87ZEqH00=
|
||||
github.com/txix-open/validator/v10 v10.0.0-20240401163703-e83541b40f99 h1:Z0Sqf+U+Sc6hfIXtRCIZlbJprkCjwMFbS4ZbEPQ44To=
|
||||
github.com/txix-open/validator/v10 v10.0.0-20240401163703-e83541b40f99/go.mod h1:pA0NYmhL0uEkkxj55S+S7MZU4e2QIt46x9XSrzrWc3c=
|
||||
github.com/txix-open/etp/v4 v4.0.1 h1:5VSYgGsvnMz0tvUHsjVWFETI0qWBTCF1O3ARCHaCIgA=
|
||||
github.com/txix-open/etp/v4 v4.0.1/go.mod h1:FIu7TUDdwcgmtmF6tFTV1bGA2fRY/iVaPQdsGzvqYc8=
|
||||
github.com/txix-open/grmq v1.9.0 h1:ArDbJJcFX9zXKEcPf49rp9nYiRyGMJxGKJAxdbSsfaM=
|
||||
github.com/txix-open/grmq v1.9.0/go.mod h1:EyFOP17KrwEFOUjR+PH8iH3LCtiN9TSQ8t0ysyk62po=
|
||||
github.com/txix-open/isp-kit v1.63.0 h1:k2YdGsT7DWmaiCznWIvdvpGKibb5KosgZAJPbfCSVMg=
|
||||
github.com/txix-open/isp-kit v1.63.0/go.mod h1:rwqKqB3PyZxaoep6iH1PKL89LS9nzRklA6+S4II72M4=
|
||||
github.com/txix-open/jsonschema v1.3.0 h1:XGuOTg22G7PdqfKypjajM20/i5FyGfFYsJKmheebKi4=
|
||||
github.com/txix-open/jsonschema v1.3.0/go.mod h1:l8YDZ1nvJrw6uxWowSVOxCV/ebiMJyapffW87ZEqH00=
|
||||
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb h1:UJgT4u/QMv5QHKOQeJ7igShHa36c2/vIRqJiRLdDlf0=
|
||||
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb/go.mod h1:0biAFE0bgbcKeBBAwgEDhbZz6uT1vuSETCrFQlv2RiA=
|
||||
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
|
||||
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
@@ -143,44 +149,58 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts=
|
||||
go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 h1:umZgi92IyxfXd/l4kaDhnKgY8rnN/cZcF1LKc6I8OQ8=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8=
|
||||
go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w=
|
||||
go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ=
|
||||
go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE=
|
||||
go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg=
|
||||
go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc=
|
||||
go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
|
||||
go.opentelemetry.io/auto/sdk v1.2.0 h1:YpRtUFjvhSymycLS2T81lT6IGhcUP+LUPtv0iv1N8bM=
|
||||
go.opentelemetry.io/auto/sdk v1.2.0/go.mod h1:1deq2zL7rwjwC8mR7XgY2N+tlIl6pjmEUoLDENMEzwk=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4=
|
||||
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
|
||||
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
||||
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
||||
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
||||
go.opentelemetry.io/proto/otlp v1.8.0 h1:fRAZQDcAFHySxpJ1TwlA1cJ4tvcrw7nXl9xWWC8N5CE=
|
||||
go.opentelemetry.io/proto/otlp v1.8.0/go.mod h1:tIeYOeNBU4cvmPqpaji1P+KbB4Oloai8wN4rWzRrFF0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
|
||||
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
|
||||
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
|
||||
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
|
||||
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
|
||||
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
|
||||
google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw=
|
||||
google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
|
||||
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
|
||||
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
|
||||
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
|
||||
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 h1:mgKeJMpvi0yx/sU5GsxQ7p6s2wtOnGAHZWCHUM4KGzY=
|
||||
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70=
|
||||
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
|
||||
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
|
||||
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
|
||||
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
|
||||
golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
|
||||
golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
|
||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 h1:d8Nakh1G+ur7+P3GcMjpRDEkoLUcLW2iU92XVqR+XMQ=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090/go.mod h1:U8EXRNSd8sUYyDfs/It7KVWodQr+Hf9xtxyxWudSwEw=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 h1:/OQuEa4YWtDt7uQWHd3q3sUMb+QOLQUg1xa8CEsRv5w=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og=
|
||||
google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI=
|
||||
google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
|
||||
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
|
||||
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
|
||||
+46
-11
@@ -4,36 +4,71 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/go-redsync/redsync/v4"
|
||||
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
|
||||
"isp-lock-service/conf"
|
||||
"isp-lock-service/domain"
|
||||
|
||||
"github.com/go-redsync/redsync/v4"
|
||||
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
|
||||
"golang.org/x/exp/rand"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
goredislib "github.com/redis/go-redis/v9"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultMinLockRetryDelayMs = 50
|
||||
defaultMaxLockRetryDelayMs = 100
|
||||
)
|
||||
|
||||
type Locker struct {
|
||||
logger log.Logger
|
||||
cli *redsync.Redsync
|
||||
prefix string
|
||||
logger log.Logger
|
||||
cli *redsync.Redsync
|
||||
prefix string
|
||||
minLockRetryDelayMs int
|
||||
maxLockRetryDelayMs int
|
||||
}
|
||||
|
||||
func NewLocker(logger log.Logger, cli goredislib.UniversalClient, cfg conf.Redis) Locker {
|
||||
func NewLocker(
|
||||
logger log.Logger,
|
||||
cli goredislib.UniversalClient,
|
||||
cfg conf.Redis,
|
||||
lockSettings conf.LockSettings,
|
||||
) Locker {
|
||||
minLockRetryDelayMs := defaultMinLockRetryDelayMs
|
||||
if lockSettings.MinLockRetryDelayMs > 0 {
|
||||
minLockRetryDelayMs = lockSettings.MinLockRetryDelayMs
|
||||
}
|
||||
|
||||
maxLockRetryDelayMs := defaultMaxLockRetryDelayMs
|
||||
if lockSettings.MaxLockRetryDelayMs > 0 {
|
||||
maxLockRetryDelayMs = lockSettings.MaxLockRetryDelayMs
|
||||
}
|
||||
|
||||
return Locker{
|
||||
logger: logger,
|
||||
cli: redsync.New(goredis.NewPool(cli)),
|
||||
prefix: cfg.Prefix,
|
||||
logger: logger,
|
||||
cli: redsync.New(goredis.NewPool(cli)),
|
||||
prefix: cfg.Prefix,
|
||||
minLockRetryDelayMs: minLockRetryDelayMs,
|
||||
maxLockRetryDelayMs: maxLockRetryDelayMs,
|
||||
}
|
||||
}
|
||||
|
||||
func (l Locker) Lock(ctx context.Context, key string, ttl int) (*domain.LockResponse, error) {
|
||||
key = makeKey(l.prefix, key)
|
||||
|
||||
mtx := l.cli.NewMutex(key, redsync.WithExpiry(time.Duration(ttl)*time.Second))
|
||||
mtx := l.cli.NewMutex(key,
|
||||
redsync.WithExpiry(time.Duration(ttl)*time.Second),
|
||||
redsync.WithRetryDelayFunc(
|
||||
func(_ int) time.Duration {
|
||||
delay := rand.Intn(l.maxLockRetryDelayMs-l.minLockRetryDelayMs) + l.minLockRetryDelayMs
|
||||
return time.Duration(delay) * time.Millisecond
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
if err := mtx.Lock(); err != nil {
|
||||
err := mtx.Lock()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "fail lock. key=%s", key)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,30 +2,53 @@ package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"isp-lock-service/conf"
|
||||
"isp-lock-service/domain"
|
||||
|
||||
"github.com/go-redis/redis_rate/v10"
|
||||
"github.com/pkg/errors"
|
||||
goredislib "github.com/redis/go-redis/v9"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"isp-lock-service/conf"
|
||||
"isp-lock-service/domain"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
type rateLimiter struct {
|
||||
type RateLimiter struct {
|
||||
logger log.Logger
|
||||
cli *redis_rate.Limiter
|
||||
prefix string
|
||||
|
||||
inMemLimiters map[string]*limiter
|
||||
mu sync.Locker
|
||||
cancelFn context.CancelFunc
|
||||
}
|
||||
|
||||
func NewRateLimiter(logger log.Logger, cli goredislib.UniversalClient, cfg conf.Redis) rateLimiter {
|
||||
return rateLimiter{
|
||||
logger: logger,
|
||||
cli: redis_rate.NewLimiter(cli),
|
||||
prefix: cfg.Prefix + "::rate-limiter",
|
||||
type limiter struct {
|
||||
*rate.Limiter
|
||||
|
||||
lastUse time.Time
|
||||
infiniteKey bool
|
||||
}
|
||||
|
||||
func NewRateLimiter(logger log.Logger, cli goredislib.UniversalClient, cfg conf.Remote) *RateLimiter {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
limiter := &RateLimiter{
|
||||
logger: logger,
|
||||
cli: redis_rate.NewLimiter(cli),
|
||||
prefix: cfg.Redis.Prefix + "::rate-limiter",
|
||||
inMemLimiters: make(map[string]*limiter),
|
||||
mu: new(sync.Mutex),
|
||||
cancelFn: cancel,
|
||||
}
|
||||
go limiter.clearInMemLimiters(ctx, cfg.InMemLimiter)
|
||||
|
||||
return limiter
|
||||
}
|
||||
|
||||
func (r rateLimiter) Limit(ctx context.Context, key string, maxRps int) (*domain.RateLimiterResponse, error) {
|
||||
func (r *RateLimiter) Limit(ctx context.Context, key string, maxRps int) (*domain.RateLimiterResponse, error) {
|
||||
res, err := r.cli.Allow(ctx, makeKey(r.prefix, key), redis_rate.PerSecond(maxRps))
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "allow request")
|
||||
@@ -37,3 +60,70 @@ func (r rateLimiter) Limit(ctx context.Context, key string, maxRps int) (*domain
|
||||
RetryAfter: res.RetryAfter,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r *RateLimiter) LimitInMem(_ context.Context, key string, maxRps float64, infiniteKey bool) (*domain.RateLimiterInMemResponse, error) {
|
||||
key = fmt.Sprintf("%s:::%0.5f", key, maxRps)
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
|
||||
lim, ok := r.inMemLimiters[key]
|
||||
if !ok {
|
||||
lim = &limiter{
|
||||
Limiter: rate.NewLimiter(rate.Limit(maxRps), 1),
|
||||
infiniteKey: infiniteKey,
|
||||
}
|
||||
if maxRps < 1 {
|
||||
lim.ReserveN(time.Now(), 1)
|
||||
}
|
||||
r.inMemLimiters[key] = lim
|
||||
}
|
||||
lim.lastUse = time.Now()
|
||||
lim.infiniteKey = infiniteKey
|
||||
|
||||
res := lim.ReserveN(lim.lastUse, 1)
|
||||
if !res.OK() {
|
||||
return nil, errors.Errorf("can't reserve time; key='%s'", key)
|
||||
}
|
||||
|
||||
return &domain.RateLimiterInMemResponse{
|
||||
PassAfter: res.DelayFrom(lim.lastUse),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r *RateLimiter) Close() {
|
||||
r.cancelFn()
|
||||
}
|
||||
|
||||
func (r *RateLimiter) removeUnusedLimiters(lastUseThreshold time.Duration) int {
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
|
||||
limiterCount := len(r.inMemLimiters)
|
||||
for k, v := range r.inMemLimiters {
|
||||
if time.Since(v.lastUse) >= lastUseThreshold && !v.infiniteKey {
|
||||
delete(r.inMemLimiters, k)
|
||||
}
|
||||
}
|
||||
|
||||
return limiterCount - len(r.inMemLimiters)
|
||||
}
|
||||
|
||||
func (r *RateLimiter) clearInMemLimiters(ctx context.Context, cfg conf.InMemLimiter) {
|
||||
ctx = log.ToContext(ctx, log.String("worker", "limiterCleaner"))
|
||||
var (
|
||||
lastUseThreshold = time.Duration(cfg.LastUseThresholdInSec) * time.Second
|
||||
ticker = time.NewTicker(time.Duration(cfg.ClearPeriodInSec) * time.Second)
|
||||
)
|
||||
defer ticker.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
count := r.removeUnusedLimiters(lastUseThreshold)
|
||||
r.logger.Debug(ctx, fmt.Sprintf("removed %d unused limiters", count))
|
||||
case <-ctx.Done():
|
||||
r.logger.Info(ctx, errors.WithMessage(ctx.Err(), "limiter cleaner worker done"))
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,5 +57,10 @@ func endpointDescriptors(c Controllers) []cluster.EndpointDescriptor {
|
||||
Inner: true,
|
||||
UserAuthRequired: false,
|
||||
Handler: c.DailyLimiter.Get,
|
||||
}, {
|
||||
Path: "isp-lock-service/rate_limit/inmem",
|
||||
Inner: true,
|
||||
UserAuthRequired: false,
|
||||
Handler: c.RateLimiter.LimitInMem,
|
||||
}}
|
||||
}
|
||||
+7
-7
@@ -18,6 +18,13 @@ type Locker struct {
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func NewLocker(logger log.Logger, repo LockerRepo) Locker {
|
||||
return Locker{
|
||||
repo: repo,
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
func (l Locker) Lock(ctx context.Context, req domain.LockRequest) (*domain.LockResponse, error) {
|
||||
// nolint: wrapcheck
|
||||
return l.repo.Lock(ctx, req.Key, req.TTLInSec)
|
||||
@@ -27,10 +34,3 @@ func (l Locker) UnLock(ctx context.Context, req domain.UnLockRequest) (*domain.L
|
||||
// nolint: wrapcheck
|
||||
return l.repo.UnLock(ctx, req.Key, req.LockKey)
|
||||
}
|
||||
|
||||
func NewLocker(logger log.Logger, repo LockerRepo) Locker {
|
||||
return Locker{
|
||||
repo: repo,
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
type limiterRepo interface {
|
||||
Limit(ctx context.Context, key string, maxRps int) (*domain.RateLimiterResponse, error)
|
||||
LimitInMem(ctx context.Context, key string, maxRps float64, infiniteKey bool) (*domain.RateLimiterInMemResponse, error)
|
||||
}
|
||||
|
||||
type rateLimiter struct {
|
||||
@@ -21,3 +22,7 @@ func NewRateLimiter(repo limiterRepo) rateLimiter {
|
||||
func (s rateLimiter) Limit(ctx context.Context, req domain.RateLimiterRequest) (*domain.RateLimiterResponse, error) {
|
||||
return s.repo.Limit(ctx, req.Key, req.MaxRps) // nolint:wrapcheck
|
||||
}
|
||||
|
||||
func (s rateLimiter) LimitInMem(ctx context.Context, req domain.RateLimiterInMemRequest) (*domain.RateLimiterInMemResponse, error) {
|
||||
return s.repo.LimitInMem(ctx, req.Key, req.MaxRps, req.InfiniteKey) // nolint:wrapcheck
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package tests_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/txix-open/isp-kit/test"
|
||||
@@ -19,7 +18,7 @@ func TestDailyLimiter(t *testing.T) {
|
||||
redis = NewRedis(tst)
|
||||
r = repository.NewDailyLimiter(redis, conf.Redis{Prefix: "test"})
|
||||
svc = service.NewDailyLimiter(r)
|
||||
ctx = context.Background()
|
||||
ctx = t.Context()
|
||||
req = fake.It[domain.IncrementRequest]()
|
||||
)
|
||||
|
||||
|
||||
+191
-6
@@ -1,7 +1,6 @@
|
||||
package tests_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -16,14 +15,22 @@ func TestRateLimiter(t *testing.T) {
|
||||
t.Parallel()
|
||||
tst, required := test.New(t)
|
||||
redis := NewRedis(tst)
|
||||
r := repository.NewRateLimiter(tst.Logger(), redis, conf.Redis{Prefix: "test"})
|
||||
r := repository.NewRateLimiter(tst.Logger(), redis, conf.Remote{
|
||||
Redis: conf.Redis{Prefix: "test"},
|
||||
InMemLimiter: conf.InMemLimiter{
|
||||
ClearPeriodInSec: 10,
|
||||
LastUseThresholdInSec: 10,
|
||||
},
|
||||
})
|
||||
tst.T().Cleanup(r.Close)
|
||||
|
||||
var (
|
||||
maxRps = 5
|
||||
key = "key"
|
||||
ctx = t.Context()
|
||||
)
|
||||
for i := range maxRps {
|
||||
resp, err := r.Limit(context.Background(), key, maxRps)
|
||||
resp, err := r.Limit(ctx, key, maxRps)
|
||||
required.NoError(err)
|
||||
exp := &domain.RateLimiterResponse{
|
||||
Allow: true,
|
||||
@@ -33,7 +40,7 @@ func TestRateLimiter(t *testing.T) {
|
||||
required.EqualValues(exp, resp)
|
||||
}
|
||||
|
||||
resp, err := r.Limit(context.Background(), key, maxRps)
|
||||
resp, err := r.Limit(ctx, key, maxRps)
|
||||
required.NoError(err)
|
||||
exp := &domain.RateLimiterResponse{
|
||||
Allow: false,
|
||||
@@ -44,7 +51,7 @@ func TestRateLimiter(t *testing.T) {
|
||||
required.EqualValues(exp, resp)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
resp, err = r.Limit(context.Background(), key, maxRps)
|
||||
resp, err = r.Limit(ctx, key, maxRps)
|
||||
required.NoError(err)
|
||||
exp = &domain.RateLimiterResponse{
|
||||
Allow: true,
|
||||
@@ -55,7 +62,7 @@ func TestRateLimiter(t *testing.T) {
|
||||
|
||||
for range 1000 {
|
||||
key := fake.It[string]()
|
||||
resp, err := r.Limit(context.Background(), key, 1)
|
||||
resp, err := r.Limit(ctx, key, 1)
|
||||
required.NoError(err)
|
||||
exp := &domain.RateLimiterResponse{
|
||||
Allow: true,
|
||||
@@ -65,3 +72,181 @@ func TestRateLimiter(t *testing.T) {
|
||||
required.EqualValues(exp, resp)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRateLimiterInMem(t *testing.T) {
|
||||
t.Parallel()
|
||||
tst, required := test.New(t)
|
||||
r := repository.NewRateLimiter(tst.Logger(), nil, conf.Remote{
|
||||
InMemLimiter: conf.InMemLimiter{
|
||||
ClearPeriodInSec: 10,
|
||||
LastUseThresholdInSec: 10,
|
||||
},
|
||||
})
|
||||
tst.T().Cleanup(r.Close)
|
||||
|
||||
var (
|
||||
maxRps = 5
|
||||
reqInterval = time.Second / time.Duration(maxRps)
|
||||
key = "key"
|
||||
ctx = t.Context()
|
||||
)
|
||||
for i := range 2 * maxRps {
|
||||
resp, err := r.LimitInMem(ctx, key, float64(maxRps), false)
|
||||
required.NoError(err)
|
||||
expPassAfter := reqInterval * time.Duration(i)
|
||||
required.True(resp.PassAfter <= expPassAfter)
|
||||
}
|
||||
|
||||
for range 1000 {
|
||||
key := fake.It[string]()
|
||||
resp, err := r.LimitInMem(ctx, key, 1, false)
|
||||
required.NoError(err)
|
||||
required.True(resp.PassAfter <= 0)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRateLimiterInMemInfiniteKey(t *testing.T) {
|
||||
t.Parallel()
|
||||
tst, required := test.New(t)
|
||||
r := repository.NewRateLimiter(tst.Logger(), nil, conf.Remote{
|
||||
InMemLimiter: conf.InMemLimiter{
|
||||
ClearPeriodInSec: 2,
|
||||
LastUseThresholdInSec: 1,
|
||||
},
|
||||
})
|
||||
tst.T().Cleanup(r.Close)
|
||||
|
||||
var (
|
||||
maxRps = 1
|
||||
reqInterval = time.Second / time.Duration(maxRps)
|
||||
key = "key"
|
||||
ctx = t.Context()
|
||||
)
|
||||
for i := range 2 * maxRps {
|
||||
resp, err := r.LimitInMem(ctx, key, float64(maxRps), true)
|
||||
required.NoError(err)
|
||||
expPassAfter := reqInterval * time.Duration(i)
|
||||
required.True(resp.PassAfter <= expPassAfter)
|
||||
}
|
||||
|
||||
for range 1000 {
|
||||
_, err := r.LimitInMem(ctx, key, 1, true)
|
||||
required.NoError(err)
|
||||
}
|
||||
<-time.After(time.Second * 4)
|
||||
|
||||
resp, err := r.LimitInMem(ctx, key, 1, true)
|
||||
required.NoError(err)
|
||||
required.True(resp.PassAfter > 0)
|
||||
}
|
||||
|
||||
func TestRateLimiterInMemLowRPSCase(t *testing.T) {
|
||||
t.Parallel()
|
||||
tst, required := test.New(t)
|
||||
r := repository.NewRateLimiter(tst.Logger(), nil, conf.Remote{
|
||||
InMemLimiter: conf.InMemLimiter{
|
||||
ClearPeriodInSec: 10,
|
||||
LastUseThresholdInSec: 10,
|
||||
},
|
||||
})
|
||||
tst.T().Cleanup(r.Close)
|
||||
|
||||
var (
|
||||
maxRps = 0.5
|
||||
reqInterval = time.Duration(float64(time.Second) / maxRps)
|
||||
key = "key"
|
||||
ctx = t.Context()
|
||||
)
|
||||
for i := range 3 {
|
||||
resp, err := r.LimitInMem(ctx, key, maxRps, false)
|
||||
required.NoError(err)
|
||||
expPassAfter := reqInterval * time.Duration(i+1)
|
||||
required.True(resp.PassAfter <= expPassAfter)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkRateLimiter(b *testing.B) {
|
||||
tst, _ := test.New(new(testing.T))
|
||||
redis := NewRedis(tst)
|
||||
r := repository.NewRateLimiter(tst.Logger(), redis, conf.Remote{
|
||||
Redis: conf.Redis{Prefix: "test"},
|
||||
InMemLimiter: conf.InMemLimiter{
|
||||
ClearPeriodInSec: 10,
|
||||
LastUseThresholdInSec: 10,
|
||||
},
|
||||
})
|
||||
b.Cleanup(r.Close)
|
||||
|
||||
var (
|
||||
maxRps = 10
|
||||
key = fake.It[string]()
|
||||
ctx = b.Context()
|
||||
)
|
||||
b.ResetTimer()
|
||||
|
||||
b.Run("Limit", func(b *testing.B) {
|
||||
for range b.N {
|
||||
_, err := r.Limit(ctx, key, maxRps)
|
||||
if err != nil {
|
||||
b.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
b.Run("LimitInMem", func(b *testing.B) {
|
||||
for range b.N {
|
||||
_, err := r.LimitInMem(ctx, key, float64(maxRps), false)
|
||||
if err != nil {
|
||||
b.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// nolint:gocognit
|
||||
func BenchmarkRateLimiter2(b *testing.B) {
|
||||
tst, _ := test.New(new(testing.T))
|
||||
redis := NewRedis(tst)
|
||||
r := repository.NewRateLimiter(tst.Logger(), redis, conf.Remote{
|
||||
Redis: conf.Redis{Prefix: "test"},
|
||||
InMemLimiter: conf.InMemLimiter{
|
||||
ClearPeriodInSec: 10,
|
||||
LastUseThresholdInSec: 10,
|
||||
},
|
||||
})
|
||||
b.Cleanup(r.Close)
|
||||
|
||||
var (
|
||||
keys = fake.It[[]string](fake.MinSliceSize(100), fake.MaxSliceSize(100))
|
||||
ctx = b.Context()
|
||||
)
|
||||
b.ResetTimer()
|
||||
|
||||
b.Run("Limit", func(b *testing.B) {
|
||||
for range b.N {
|
||||
for i := range 100 {
|
||||
maxRps := i + 1
|
||||
for _, key := range keys {
|
||||
_, err := r.Limit(ctx, key, maxRps)
|
||||
if err != nil {
|
||||
b.Fatalf("unexpected error for maxRps %d and key %s: %v", maxRps, key, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
b.Run("LimitInMem", func(b *testing.B) {
|
||||
for range b.N {
|
||||
for i := range 100 {
|
||||
maxRps := i + 1
|
||||
for _, key := range keys {
|
||||
_, err := r.LimitInMem(ctx, key, float64(maxRps), false)
|
||||
if err != nil {
|
||||
b.Fatalf("unexpected error for maxRps %d and key %s: %v", maxRps, key, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
+7
-7
@@ -1,16 +1,16 @@
|
||||
package tests_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"isp-lock-service/conf"
|
||||
"isp-lock-service/repository"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/txix-open/isp-kit/test"
|
||||
)
|
||||
|
||||
@@ -26,9 +26,9 @@ func TestOne(t *testing.T) {
|
||||
|
||||
tst, required := test.New(t)
|
||||
rcli := NewRedis(tst)
|
||||
ctx := context.Background()
|
||||
ctx := t.Context()
|
||||
|
||||
r := repository.NewLocker(tst.Logger(), rcli, conf.Redis{Prefix: "testPrefix"})
|
||||
r := repository.NewLocker(tst.Logger(), rcli, conf.Redis{Prefix: "testPrefix"}, conf.LockSettings{})
|
||||
|
||||
// success story
|
||||
key := time.Now().String()
|
||||
@@ -70,9 +70,9 @@ func TestConcurrency(t *testing.T) {
|
||||
tst, required := test.New(t)
|
||||
redis := NewRedis(tst)
|
||||
|
||||
r := repository.NewLocker(tst.Logger(), redis, conf.Redis{Prefix: "testPrefix"})
|
||||
r := repository.NewLocker(tst.Logger(), redis, conf.Redis{Prefix: "testPrefix"}, conf.LockSettings{})
|
||||
|
||||
group, ctx := errgroup.WithContext(context.Background())
|
||||
group, ctx := errgroup.WithContext(t.Context())
|
||||
group.SetLimit(32)
|
||||
for range 10000 {
|
||||
group.Go(func() error {
|
||||
|
||||
Reference in new issue
Block a user