Compare commits
380
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6257560563 | ||
|
|
48ccd130b2 | ||
|
|
7eb341856d | ||
|
|
38fe10f3a1 | ||
|
|
fa327ecf5c | ||
|
|
6c3e8a632e | ||
|
|
03fcb26473 | ||
|
|
7f4a1c8131 | ||
|
|
416f9307c3 | ||
|
|
1273869b07 | ||
|
|
1839a18bb4 | ||
|
|
34d7fabf61 | ||
|
|
c295bda53b | ||
|
|
f97795bd90 | ||
|
|
f7931b1d83 | ||
|
|
245cf8852d | ||
|
|
7b09eb3a07 | ||
|
|
e45900fbaa | ||
|
|
b0330e80f3 | ||
|
|
9a2cdd0662 | ||
|
|
9b577e96b1 | ||
|
|
7873c57c8e | ||
|
|
38fdb65ec2 | ||
|
|
9ebf03a15a | ||
|
|
8101f9a8c8 | ||
|
|
924d1cf6fe | ||
|
|
de3e456617 | ||
|
|
fc5a21d6bb | ||
|
|
4763d88628 | ||
|
|
a6d72ec1a4 | ||
|
|
99d4aaca45 | ||
|
|
2f614a5c75 | ||
|
|
960b87d86d | ||
|
|
35e15b7ae1 | ||
|
|
392e5f5cff | ||
|
|
451d277644 | ||
|
|
2caed6b3f0 | ||
|
|
a349df7b05 | ||
|
|
efed09bb92 | ||
|
|
a2c222dfd9 | ||
|
|
129ce7c2c6 | ||
|
|
cde261cf5d | ||
|
|
8ef12f8b11 | ||
|
|
99782ef3bb | ||
|
|
6a36603b5d | ||
|
|
5a3d4fffea | ||
|
|
7a585711f6 | ||
|
|
d024e038c2 | ||
|
|
7b329a8c73 | ||
|
|
e62089f019 | ||
|
|
c3ed4a0e27 | ||
|
|
846129b1af | ||
|
|
66edb03aa4 | ||
|
|
d56d6613bb | ||
|
|
5a67d0cc4f | ||
|
|
803b067278 | ||
|
|
78eeee0bc6 | ||
|
|
c6f2c3a813 | ||
|
|
441702a180 | ||
|
|
de85ffa726 | ||
|
|
1482636ad8 | ||
|
|
b62b0eef8b | ||
|
|
37f85f56fa | ||
|
|
4c131093b1 | ||
|
|
22bfe6f2a1 | ||
|
|
fd5ce55c4c | ||
|
|
e5494e2849 | ||
|
|
eb79974760 | ||
|
|
350d22ae75 | ||
|
|
3e7f235876 | ||
|
|
778e194d1d | ||
|
|
bfe9764707 | ||
|
|
5877176645 | ||
|
|
10e74db016 | ||
|
|
82f6d624ba | ||
|
|
22e76538c4 | ||
|
|
11a5477bcb | ||
|
|
aefc14ece9 | ||
|
|
0e6b5dec52 | ||
|
|
2a424699d7 | ||
|
|
3c19a8d532 | ||
|
|
28be68322c | ||
|
|
867fd98bce | ||
|
|
1d3bacd22c | ||
|
|
a483722e1d | ||
|
|
6ab012444f | ||
|
|
57f58e7fb7 | ||
|
|
a51aae9b69 | ||
|
|
4214bd3f20 | ||
|
|
a0b2a75c9d | ||
|
|
159db8114e | ||
|
|
a7b203bcd0 | ||
|
|
d0b55947c5 | ||
|
|
a3c65a1434 | ||
|
|
29c1a4deeb | ||
|
|
ee44e68af9 | ||
|
|
7a426b647b | ||
|
|
9d299beaf6 | ||
|
|
7a1d882248 | ||
|
|
ab95da7242 | ||
|
|
f63bf4a9f1 | ||
|
|
a9d4b96305 | ||
|
|
cedb376a91 | ||
|
|
93d09a779d | ||
|
|
41fa496052 | ||
|
|
398d537d8a | ||
|
|
c501354be1 | ||
|
|
7852772e9d | ||
|
|
efc4a4ee38 | ||
|
|
25c07ef016 | ||
|
|
b3511f018a | ||
|
|
46ba9541eb | ||
|
|
ecf2d06cfa | ||
|
|
d6a8f77610 | ||
|
|
be0dea3702 | ||
|
|
148327c74e | ||
|
|
eed94a4920 | ||
|
|
e47646c953 | ||
|
|
69567c4869 | ||
|
|
7a00dd1794 | ||
|
|
5fbfe1b039 | ||
|
|
8f9dc2048f | ||
|
|
ca70e4a038 | ||
|
|
16d2701e26 | ||
|
|
005510e0a5 | ||
|
|
5ba6913d5f | ||
|
|
c3400ab6cd | ||
|
|
83355f8bbc | ||
|
|
93f2a5ed50 | ||
|
|
120abaf6dd | ||
|
|
2db855d360 | ||
|
|
7aa2805f4c | ||
|
|
1342f0dcf2 | ||
|
|
4f4fb5e6c7 | ||
|
|
68c8681a9b | ||
|
|
cb8c66849a | ||
|
|
3f60267bdc | ||
|
|
43a1a206d5 | ||
|
|
d4badbb8db | ||
|
|
5346030323 | ||
|
|
c32c9d5eba | ||
|
|
000a5aacdf | ||
|
|
62815a7691 | ||
|
|
e52c0f760c | ||
|
|
bfe2a7f817 | ||
|
|
99c0e1b17d | ||
|
|
e1547dbb94 | ||
|
|
38c4295d0b | ||
|
|
3a9e163c9e | ||
|
|
0065c7c5a7 | ||
|
|
fb21d43425 | ||
|
|
13c5ed92f4 | ||
|
|
c3d626f074 | ||
|
|
a6fa3eee8a | ||
|
|
bf024474d1 | ||
|
|
2228e02770 | ||
|
|
d7d17e7f13 | ||
|
|
9bc9655c3d | ||
|
|
0320131d57 | ||
|
|
8275c01d21 | ||
|
|
125013ba0a | ||
|
|
3b34468842 | ||
|
|
cddd3383e8 | ||
|
|
c6148a1c1c | ||
|
|
b2e34c00a4 | ||
|
|
80a99c425b | ||
|
|
f90063cb03 | ||
|
|
c4abdaa54b | ||
|
|
8a2a65d8ed | ||
|
|
2e23e882bb | ||
|
|
4e96b7a930 | ||
|
|
5e72ec3864 | ||
|
|
05eb762273 | ||
|
|
e2419e2c4b | ||
|
|
72afc94782 | ||
|
|
02070b1db1 | ||
|
|
2fc6c7ba91 | ||
|
|
c706d7932d | ||
|
|
62714cdfe1 | ||
|
|
a2c49ac39f | ||
|
|
de55ea643c | ||
|
|
5fb60e14b8 | ||
|
|
02603cb018 | ||
|
|
ffbff595d1 | ||
|
|
989429824e | ||
|
|
a31e6080e2 | ||
|
|
90e05dfb4b | ||
|
|
2af27ddb68 | ||
|
|
d004faa9e0 | ||
|
|
45a4a23112 | ||
|
|
1bb50f8175 | ||
|
|
0cbfcab3f9 | ||
|
|
d4125963b2 | ||
|
|
2e33c2275c | ||
|
|
a5b21198e0 | ||
|
|
e765cda3f9 | ||
|
|
5a91184d6c | ||
|
|
e2094296f4 | ||
|
|
777e856d00 | ||
|
|
c3f419bbc5 | ||
|
|
52705f6982 | ||
|
|
a5134181be | ||
|
|
79c801d493 | ||
|
|
f9823d5303 | ||
|
|
8339591b27 | ||
|
|
17a6e3186d | ||
|
|
213bad9722 | ||
|
|
ef33bd9fd2 | ||
|
|
123de3d452 | ||
|
|
6591bff728 | ||
|
|
88c0779aa2 | ||
|
|
95adcb117c | ||
|
|
372636f43b | ||
|
|
54dae1ab2b | ||
|
|
f0f50a8507 | ||
|
|
c3d0d5be4c | ||
|
|
929132743c | ||
|
|
6643e8937c | ||
|
|
08b4ee461e | ||
|
|
ae501969bf | ||
|
|
c29ed6d41e | ||
|
|
1c28c895b5 | ||
|
|
d9c32437c9 | ||
|
|
0429bed9e3 | ||
|
|
8bdc36a302 | ||
|
|
a3576cc3f4 | ||
|
|
713db0aa4c | ||
|
|
95aae06a41 | ||
|
|
31a4a6f5b8 | ||
|
|
1c66729974 | ||
|
|
6387947b22 | ||
|
|
3a8469c5a9 | ||
|
|
44715591ef | ||
|
|
ceb9d71a1a | ||
|
|
15ad05277b | ||
|
|
14c5b0a678 | ||
|
|
c95964fa3c | ||
|
|
a46f2cee34 | ||
|
|
1764ce9a30 | ||
|
|
384fa0417a | ||
|
|
97ba1050a7 | ||
|
|
628c506e85 | ||
|
|
9226796463 | ||
|
|
83176ba878 | ||
|
|
94cb067214 | ||
|
|
b56b6e0e42 | ||
|
|
28aa3eae33 | ||
|
|
96dee8dee3 | ||
|
|
400410c449 | ||
|
|
ab08abb3f6 | ||
|
|
01e32537a8 | ||
|
|
652d1c8c4f | ||
|
|
64e7792778 | ||
|
|
bfb03c6d1e | ||
|
|
1fa20f9cda | ||
|
|
9d61ec49c3 | ||
|
|
9dc598feff | ||
|
|
49fde946ac | ||
|
|
c4ded39e7c | ||
|
|
c8518e9f35 | ||
|
|
97d3a38ed8 | ||
|
|
e840b53978 | ||
|
|
c43e52e9ad | ||
|
|
2a2bd99fcf | ||
|
|
c4f9fc4585 | ||
|
|
0222dfd865 | ||
|
|
11f91b67a8 | ||
|
|
6e2d485b90 | ||
|
|
e336a57e13 | ||
|
|
29e7c119bd | ||
|
|
882228558d | ||
|
|
51360e802f | ||
|
|
7a06660597 | ||
|
|
4553cd0261 | ||
|
|
2bbc426bef | ||
|
|
b22a22cac9 | ||
|
|
cc7b931e0a | ||
|
|
d4a44b0d72 | ||
|
|
284a9bb444 | ||
|
|
ef4dc0e972 | ||
|
|
def031958b | ||
|
|
00c1936683 | ||
|
|
cc3aab1e7b | ||
|
|
c14de6d198 | ||
|
|
f9f8186451 | ||
|
|
0259cf84ce | ||
|
|
04ceb5f4fa | ||
|
|
6efcbe7c70 | ||
|
|
e0ce92a9f3 | ||
|
|
28e08e108a | ||
|
|
4e68903251 | ||
|
|
73515e5179 | ||
|
|
f752770788 | ||
|
|
6eb6efe844 | ||
|
|
837b8755a0 | ||
|
|
e3b5e867b1 | ||
|
|
362efd9546 | ||
|
|
a958874731 | ||
|
|
0d5094cfb5 | ||
|
|
74b32e064e | ||
|
|
3ad5dfe030 | ||
|
|
95242965da | ||
|
|
8c15105087 | ||
|
|
db68505cca | ||
|
|
795aee86d1 | ||
|
|
33621ff523 | ||
|
|
415a694228 | ||
|
|
1fe8b7f78d | ||
|
|
c2fc3c54da | ||
|
|
652c2d95b8 | ||
|
|
da1b6caf67 | ||
|
|
deafdfb7ab | ||
|
|
f9feaeab0b | ||
|
|
330c160122 | ||
|
|
238c7b3a44 | ||
|
|
1317696cb7 | ||
|
|
23108f2224 | ||
|
|
6b14252577 | ||
|
|
8386cd7503 | ||
|
|
c6225eeb3a | ||
|
|
a12c2fd120 | ||
|
|
9e503ab31f | ||
|
|
c31abb84c9 | ||
|
|
b1a0bc252f | ||
|
|
599b1639e7 | ||
|
|
1199f9ae8e | ||
|
|
cb8ae318c4 | ||
|
|
fec8a759bc | ||
|
|
5d4b54c39c | ||
|
|
4ebab3a967 | ||
|
|
73315e6671 | ||
|
|
db03a888fb | ||
|
|
7d4a5c4c6c | ||
|
|
94397ea4c7 | ||
|
|
e05319432e | ||
|
|
f1bce695fb | ||
|
|
7aad2697f7 | ||
|
|
848a2d74d6 | ||
|
|
a2a470ad93 | ||
|
|
78150b2661 | ||
|
|
ed2e1a0936 | ||
|
|
445389b7d8 | ||
|
|
1bb8cbf3ab | ||
|
|
ca6fe7b86e | ||
|
|
0b351ea3a2 | ||
|
|
05c5db53bd | ||
|
|
7632e07f4e | ||
|
|
1ddbe43618 | ||
|
|
79f83e245c | ||
|
|
d678f28909 | ||
|
|
c3e95fa98c | ||
|
|
e32e55df15 | ||
|
|
48eaf48797 | ||
|
|
ead505d40c | ||
|
|
a39a53561e | ||
|
|
ebf715c368 | ||
|
|
87f2c360c5 | ||
|
|
b0584b4ead | ||
|
|
1575a4cc34 | ||
|
|
1bc12d7a33 | ||
|
|
89707ff412 | ||
|
|
33b9e220d3 | ||
|
|
d3e39f66a2 | ||
|
|
48a991e11b | ||
|
|
3ef79e51ca | ||
|
|
d945add7a0 | ||
|
|
2e0e25de42 | ||
|
|
334043947a | ||
|
|
e5e8f2b962 | ||
|
|
a16ecbc8a9 | ||
|
|
3c6e9c75a9 | ||
|
|
980bcb2eb5 | ||
|
|
3b73722bca | ||
|
|
15f7a970b1 | ||
|
|
e6083dbe81 | ||
|
|
54a77441fd | ||
|
|
353cf671da | ||
|
|
02c280009b | ||
|
|
379db84504 | ||
|
|
bd56df8ed8 |
No files matched your search
+1
-1
@@ -67,8 +67,8 @@ fabric.properties
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
/node_modules/
|
||||
/vendor/
|
||||
/node_modules/
|
||||
package.json
|
||||
yarn.lock
|
||||
|
||||
|
||||
+23
-3
@@ -1,3 +1,23 @@
|
||||
include:
|
||||
- project: '$CI_PROJECT_PATH'
|
||||
file: '/ci-isp-go-service.yml'
|
||||
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 Dockerfile.dit --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
|
||||
|
||||
+9
-2
@@ -10,7 +10,6 @@ linters:
|
||||
- exhaustruct # не имеет смысла
|
||||
- godot # не актуально для swagger
|
||||
- godox # не позволяет оставлять todo
|
||||
- gomoddirectives
|
||||
- musttag # у нас собственное правило: не используем теги, если работаем с пакетом isp-kit/json и с внутренними структурами(между нашими сервисами), при этом теги обязательный для всех внешних для нас структур
|
||||
- nlreturn # не всегда имеет смысл
|
||||
- nolintlint # Goland все равно форматирует с отступом
|
||||
@@ -18,6 +17,10 @@ linters:
|
||||
- tagalign # не всегда имеет смысл
|
||||
- varnamelen # очень индивидуально (db)
|
||||
- wsl # расставление пробелов очень индивидуально
|
||||
- wsl_v5 # расставление пробелов очень индивидуально
|
||||
- godoclint # ругается на // nolint, не удобно
|
||||
- prealloc # слишком аггресивный, в большинстве случаев не требуется
|
||||
- gomoddirectives # в проекте осознанно захардкожены версии зависимостей
|
||||
settings:
|
||||
cyclop:
|
||||
max-complexity: 15 # по умолчанию 10 мало
|
||||
@@ -54,6 +57,10 @@ linters:
|
||||
- linters:
|
||||
- wrapcheck
|
||||
path: transaction # транзакции прозрачны
|
||||
- linters:
|
||||
- unqueryvet
|
||||
- prealloc
|
||||
path: ".*_test\\.go$"
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
@@ -66,4 +73,4 @@ formatters:
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
- examples$
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.24-alpine as builder
|
||||
FROM golang:1.26-alpine as builder
|
||||
WORKDIR /build
|
||||
ARG version
|
||||
ENV version_env=$version
|
||||
@@ -10,7 +10,7 @@ RUN go build -ldflags="-X 'main.version=$version_env'" -o /main .
|
||||
WORKDIR cmd/migrate
|
||||
RUN CGO_ENABLED=1 go build -o /migrate .
|
||||
|
||||
FROM alpine:3.21
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN apk add --no-cache tzdata
|
||||
RUN cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime
|
||||
|
||||
+12
-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.24 git
|
||||
RUN zypper --no-gpg-checks update -y && zypper --no-gpg-checks install -y go1.26 git
|
||||
WORKDIR /build
|
||||
ARG version
|
||||
ENV version_env=$version
|
||||
@@ -8,12 +8,18 @@ ENV app_name_env=$app_name
|
||||
COPY . .
|
||||
ENV GOPROXY=https://repo-mirror.mos.ru/repository/go-public
|
||||
RUN go build -ldflags="-X 'main.version=$version_env'" -o /main .
|
||||
WORKDIR cmd/migrate
|
||||
RUN CGO_ENABLED=1 go build -o /migrate .
|
||||
|
||||
FROM dockerhub.mos.ru/mosos/arbat:15.5
|
||||
|
||||
RUN cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime
|
||||
RUN echo "Europe/Moscow" > /etc/timezone
|
||||
|
||||
COPY --from=builder migrate /migrate/migrate
|
||||
COPY cmd/migrate/config.yml /migrate/config.yml
|
||||
RUN chmod 666 /migrate/config.yml
|
||||
|
||||
ARG UID=10001
|
||||
RUN useradd \
|
||||
--home "/nonexistent" \
|
||||
@@ -34,6 +40,11 @@ WORKDIR /app
|
||||
ARG app_name
|
||||
ENV app_name_env=$app_name
|
||||
COPY --from=builder main /app/$app_name_env
|
||||
COPY /conf/config.yml /app/config.yml
|
||||
COPY /conf/default_remote_config.json* /app/default_remote_config.json
|
||||
COPY /migrations /app/migrations
|
||||
ENTRYPOINT /app/$app_name_env
|
||||
|
||||
COPY /conf/config.yml /app/config.yml
|
||||
COPY /conf/default_remote_config.json* /app/default_remote_config.json
|
||||
COPY /migrations /app/migrations
|
||||
|
||||
+25
-10
@@ -7,17 +7,13 @@ import (
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
httpEndpoint "github.com/txix-open/isp-kit/http/endpoint"
|
||||
"github.com/txix-open/isp-kit/http/endpoint/httplog"
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/service/module/backend"
|
||||
"isp-config-service/service/variable"
|
||||
|
||||
"github.com/txix-open/etp/v4"
|
||||
"github.com/txix-open/isp-kit/grpc"
|
||||
"github.com/txix-open/isp-kit/grpc/endpoint"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"github.com/txix-open/isp-kit/worker"
|
||||
httpEndpoint "github.com/txix-open/isp-kit/http/endpoint"
|
||||
"github.com/txix-open/isp-kit/http/endpoint/httplog"
|
||||
|
||||
"isp-config-service/controller"
|
||||
"isp-config-service/controller/api"
|
||||
"isp-config-service/repository"
|
||||
@@ -28,6 +24,12 @@ import (
|
||||
"isp-config-service/service/module"
|
||||
"isp-config-service/service/rqlite/db"
|
||||
"isp-config-service/service/subscription"
|
||||
|
||||
"github.com/txix-open/etp/v4"
|
||||
"github.com/txix-open/isp-kit/grpc"
|
||||
"github.com/txix-open/isp-kit/grpc/endpoint"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"github.com/txix-open/isp-kit/worker"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -80,6 +82,7 @@ type Config struct {
|
||||
HandleEventWorker *worker.Worker
|
||||
CleanEventWorker *worker.Worker
|
||||
CleanPhantomBackendWorker *worker.Worker
|
||||
CleanBackupsWorker *worker.Worker
|
||||
OwnBackendsCleaner OwnBackendsCleaner
|
||||
}
|
||||
|
||||
@@ -135,7 +138,8 @@ func (l Locator) Config() *Config {
|
||||
)
|
||||
moduleController := controller.NewModule(moduleService, l.logger)
|
||||
|
||||
configHistoryApiService := apisvs.NewConfigHistory(configRepo, configHistoryRepo, l.cfg.Local.KeepConfigVersions, l.logger)
|
||||
configHistoryApiService := apisvs.NewConfigHistory(configRepo, moduleRepo, configHistoryRepo,
|
||||
l.cfg.Local.KeepConfigVersions, l.logger)
|
||||
configHistoryController := api.NewConfigHistory(configHistoryApiService)
|
||||
|
||||
moduleApiService := apisvs.NewModule(moduleRepo, backendRepo, configSchemaRepo)
|
||||
@@ -152,7 +156,7 @@ func (l Locator) Config() *Config {
|
||||
)
|
||||
configApiController := api.NewConfig(configApiService)
|
||||
|
||||
configSchemaApiService := apisvs.NewConfigSchema(configSchemaRepo)
|
||||
configSchemaApiService := apisvs.NewConfigSchema(configSchemaRepo, moduleRepo)
|
||||
configSchemaController := api.NewConfigSchema(configSchemaApiService)
|
||||
|
||||
controllers := routes.Controllers{
|
||||
@@ -173,7 +177,14 @@ func (l Locator) Config() *Config {
|
||||
panic(err)
|
||||
}
|
||||
rqliteProxy := httputil.NewSingleHostReverseProxy(rqliteUrl)
|
||||
httpMux := routes.HttpHandler(etpSrv, l.cfg.Local, rqliteProxy)
|
||||
|
||||
rqliteBackupUrl, err := url.Parse(l.cfg.RqliteAddress + "/db/backup")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
rqliteBackupProxy := httputil.NewSingleHostReverseProxy(rqliteBackupUrl)
|
||||
|
||||
httpMux := routes.HttpHandler(etpSrv, l.cfg.Local, rqliteProxy, rqliteBackupProxy)
|
||||
|
||||
eventHandler := event.NewHandler(subscriptionService, l.logger)
|
||||
handleEventJob := event.NewWorker(eventRepo, eventHandler, l.logger)
|
||||
@@ -182,6 +193,9 @@ func (l Locator) Config() *Config {
|
||||
cleanerJob := event.NewCleaner(eventRepo, l.leaderChecker, eventTtl, l.logger)
|
||||
cleanEventWorker := worker.New(cleanerJob, worker.WithInterval(cleanEventInterval))
|
||||
|
||||
cleanBackupsJob := event.NewBackupCleaner(l.leaderChecker, l.cfg.Local.Backup, l.logger)
|
||||
cleanBackupsWorker := worker.New(cleanBackupsJob, worker.WithInterval(l.cfg.Local.Backup.ClearInterval))
|
||||
|
||||
metricsSvc := metrics.New(backendRepo)
|
||||
metricsController := controller.NewMetrics(metricsSvc)
|
||||
httpWrapper := httpEndpoint.DefaultWrapper(l.logger, httplog.Log(l.logger, false))
|
||||
@@ -194,6 +208,7 @@ func (l Locator) Config() *Config {
|
||||
HandleEventWorker: handleEventWorker,
|
||||
CleanEventWorker: cleanEventWorker,
|
||||
CleanPhantomBackendWorker: cleanPhantomBackendWorker,
|
||||
CleanBackupsWorker: cleanBackupsWorker,
|
||||
OwnBackendsCleaner: backendService,
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,31 @@
|
||||
### v3.9.1
|
||||
* Версия go 1.26
|
||||
* Добавлен эндпоинт `/module/get_required_modules` для получения списка модулей, от которых зависит модуль, отправивший запрос
|
||||
### v3.9.0
|
||||
* Обновлены зависимости
|
||||
* Добавлено поле `transport` в таблицу `isp_config_service__backend`
|
||||
* Расширен ответ по `/routing/get_routes` и `/module/get_modules_info`:
|
||||
* Добавлено поле `httpMethod` в `domain.EndpointDescriptor`
|
||||
* Добавлено поле `transport` в `domain.Connection`
|
||||
### v3.8.1
|
||||
* исправлена миграция для `config-history`
|
||||
### v3.8.0
|
||||
* Добавлен новый endpoint `config/schema/update_by_module_name` для обновления схемы модуля по его названию
|
||||
## v3.7.0
|
||||
* добавлены rqlite-автобэкапы и прокси-эндпоинт `/backup` для создания резервных копий
|
||||
* изменен таймаут ожидания лидера с 30 до 180 секунд
|
||||
* исправлены потенциальные race conditions
|
||||
* добавлен параметр периодической оптимизации sqlite `AutoOptimizeInterval: 23h`
|
||||
* обновлены зависимости
|
||||
## v3.6.0
|
||||
* добавлен новый эндпоинт `config/config/purge_versions` для удаления старых версий всех конфигураций модуля, за исключением n последних
|
||||
* обновлены зависимости
|
||||
## v3.5.0
|
||||
* обновлены зависимости
|
||||
## v3.4.1
|
||||
* исправлена проблема при которой не отвязывалась единственная переменная от конфигурации
|
||||
* исправлена проблема при которой версия конфига сохраняется с некорректным временем (бралось текущее время, а не время обновления конфига)
|
||||
* обновлены зависимости
|
||||
## v3.4.0
|
||||
* добавлено поле `metrics_autodiscovery` в таблицу `isp_config_service__backend`
|
||||
* реализован внутренний метод `/internal/metrics/autodiscovery`, формирующий конфигурацию для `HTTP-based service discovery` механизма `Prometheus`
|
||||
|
||||
+33
-32
@@ -1,35 +1,35 @@
|
||||
module isp-config-service/migrate
|
||||
|
||||
go 1.24
|
||||
go 1.26
|
||||
|
||||
replace isp-config-service => ../..
|
||||
|
||||
require (
|
||||
github.com/jmoiron/sqlx v1.4.0
|
||||
github.com/mattn/go-sqlite3 v1.14.28
|
||||
github.com/mattn/go-sqlite3 v1.14.42
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pressly/goose/v3 v3.24.3
|
||||
github.com/txix-open/isp-kit v1.52.0
|
||||
github.com/pressly/goose/v3 v3.27.0
|
||||
github.com/txix-open/isp-kit v1.67.0
|
||||
isp-config-service v0.0.0-00010101000000-000000000000
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/Masterminds/squirrel v1.5.4 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/coder/websocket v1.8.13 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
||||
github.com/coder/websocket v1.8.14 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 // 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.26.3 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect
|
||||
github.com/iancoleman/strcase v0.3.0 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
||||
github.com/jackc/pgx/v5 v5.7.5 // indirect
|
||||
github.com/jackc/pgx/v5 v5.9.2 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||
@@ -40,37 +40,38 @@ require (
|
||||
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/prometheus/client_golang v1.22.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.64.0 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/prometheus/common v0.67.5 // indirect
|
||||
github.com/prometheus/procfs v0.20.1 // indirect
|
||||
github.com/sethvargo/go-retry v0.3.0 // indirect
|
||||
github.com/tidwall/gjson v1.18.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/match v1.2.0 // indirect
|
||||
github.com/tidwall/pretty v1.2.1 // indirect
|
||||
github.com/txix-open/bellows v1.2.0 // indirect
|
||||
github.com/txix-open/etp/v4 v4.0.1 // indirect
|
||||
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 // indirect
|
||||
go.opentelemetry.io/otel v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.36.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 // indirect
|
||||
go.opentelemetry.io/otel v1.43.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.43.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.43.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/crypto v0.39.0 // indirect
|
||||
golang.org/x/net v0.41.0 // indirect
|
||||
golang.org/x/sync v0.15.0 // indirect
|
||||
golang.org/x/sys v0.33.0 // indirect
|
||||
golang.org/x/text v0.26.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
|
||||
google.golang.org/grpc v1.73.0 // indirect
|
||||
google.golang.org/protobuf v1.36.6 // indirect
|
||||
go.uber.org/zap v1.27.1 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.4 // indirect
|
||||
golang.org/x/crypto v0.50.0 // indirect
|
||||
golang.org/x/net v0.53.0 // indirect
|
||||
golang.org/x/sync v0.20.0 // indirect
|
||||
golang.org/x/sys v0.43.0 // indirect
|
||||
golang.org/x/text v0.36.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 // indirect
|
||||
google.golang.org/grpc v1.80.0 // indirect
|
||||
google.golang.org/protobuf v1.36.11 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
+159
-83
@@ -8,23 +8,26 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
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.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
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.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE=
|
||||
github.com/coder/websocket v1.8.13/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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY=
|
||||
github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok=
|
||||
github.com/getsentry/sentry-go v0.33.0 h1:YWyDii0KGVov3xOaamOnF0mjOrqSjBqwv48UEzn7QFg=
|
||||
github.com/getsentry/sentry-go v0.33.0/go.mod h1:C55omcY9ChRQIUcVcGcs+Zdy4ZpQGvNJ7JYHIoSWOtE=
|
||||
github.com/gabriel-vasile/mimetype v1.4.11 h1:AQvxbp830wPhHTqc1u7nzoLT+ZFxGY7emj5DR5DYFik=
|
||||
github.com/gabriel-vasile/mimetype v1.4.11/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM=
|
||||
github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
||||
github.com/getsentry/sentry-go v0.38.0 h1:S8Xui7gLeAvXINVLMOaX94HnsDf1GexnfXGSNC4+KQs=
|
||||
github.com/getsentry/sentry-go v0.38.0/go.mod h1:eRXCoh3uvmjQLY6qu63BjUZnaBu5L5WhMV1RwYO8W5s=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
@@ -39,8 +42,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
|
||||
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
|
||||
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
|
||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/go-sql-driver/mysql v1.9.2 h1:4cNKDYQ1I84SXslGddlsrMhc8k4LeDVj6Ad6WRjiHuU=
|
||||
github.com/go-sql-driver/mysql v1.9.2/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
|
||||
github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo=
|
||||
github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
@@ -48,16 +51,22 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
|
||||
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.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs=
|
||||
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
|
||||
github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||
github.com/jackc/pgx/v5 v5.7.5 h1:JHGfMnQY+IEtGM63d+NGMjoRpysB2JBwDr5fsngwmJs=
|
||||
github.com/jackc/pgx/v5 v5.7.5/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M=
|
||||
github.com/jackc/pgx/v5 v5.7.6 h1:rWQc5FwZSPX58r1OQmkuaNicxdmExaEz5A2DO2hUuTk=
|
||||
github.com/jackc/pgx/v5 v5.7.6/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M=
|
||||
github.com/jackc/pgx/v5 v5.8.0/go.mod h1:QVeDInX2m9VyzvNeiCJVjCkNFqzsNb43204HshNSZKw=
|
||||
github.com/jackc/pgx/v5 v5.9.2 h1:3ZhOzMWnR4yJ+RW1XImIPsD1aNSz4T4fyP7zlQb56hw=
|
||||
github.com/jackc/pgx/v5 v5.9.2/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4=
|
||||
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
|
||||
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
|
||||
@@ -66,8 +75,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
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/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co=
|
||||
github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0=
|
||||
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=
|
||||
@@ -85,8 +94,10 @@ github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A=
|
||||
github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.32 h1:JD12Ag3oLy1zQA+BNn74xRgaBbdhbNIDYvQUEuuErjs=
|
||||
github.com/mattn/go-sqlite3 v1.14.32/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.42 h1:MigqEP4ZmHw3aIdIT7T+9TLa90Z6smwcthx+Azv4Cgo=
|
||||
github.com/mattn/go-sqlite3 v1.14.42/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
|
||||
github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
|
||||
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
@@ -102,18 +113,25 @@ github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdh
|
||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
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/pressly/goose/v3 v3.24.3 h1:DSWWNwwggVUsYZ0X2VitiAa9sKuqtBfe+Jr9zFGwWlM=
|
||||
github.com/pressly/goose/v3 v3.24.3/go.mod h1:v9zYL4xdViLHCUUJh/mhjnm6JrK7Eul8AS93IxiZM4E=
|
||||
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
|
||||
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM=
|
||||
github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY=
|
||||
github.com/pressly/goose/v3 v3.27.0 h1:/D30gVTuQhu0WsNZYbJi4DMOsx1lNq+6SkLe+Wp59BM=
|
||||
github.com/pressly/goose/v3 v3.27.0/go.mod h1:3ZBeCXqzkgIRvrEMDkYh1guvtoJTU5oMMuDdkutoM78=
|
||||
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.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4=
|
||||
github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
||||
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
||||
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
||||
github.com/prometheus/common v0.67.3 h1:shd26MlnwTw5jksTDhC7rTQIteBxy+ZZDr3t7F2xN2Q=
|
||||
github.com/prometheus/common v0.67.3/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI=
|
||||
github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4=
|
||||
github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw=
|
||||
github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws=
|
||||
github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw=
|
||||
github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc=
|
||||
github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
@@ -131,12 +149,13 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
||||
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/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.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/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
|
||||
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
|
||||
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||
github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM=
|
||||
github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
|
||||
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||
@@ -144,58 +163,115 @@ github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgj
|
||||
github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o=
|
||||
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/isp-kit v1.52.0 h1:+3zce6PHrOT2fC6QNR8HXTsg9KrxLa8/lTdpC2tVRNU=
|
||||
github.com/txix-open/isp-kit v1.52.0/go.mod h1:OkscabRkpFGjUOFrbPM7yTKD/Br2/iv5/PWr/T2Jtd4=
|
||||
github.com/txix-open/isp-kit v1.64.11 h1:K7RILD1of3iUYRFVCMw+S0epxo4CnL6KoYo8lNUi4Tk=
|
||||
github.com/txix-open/isp-kit v1.64.11/go.mod h1:GvBsX5p2U3/ugK6PuWANYzSy/4YgawROm3eAKb35G6o=
|
||||
github.com/txix-open/isp-kit v1.67.0 h1:mApQ8JEE/iIY537cKobIHpAxChoLxgczb+Ux2Svuiy4=
|
||||
github.com/txix-open/isp-kit v1.67.0/go.mod h1:TAqW1YLfSgQeCurE1LNrru5LEHCjAyaxeAvRvrSFHTM=
|
||||
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=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 h1:lREC4C0ilyP4WibDhQ7Gg2ygAQFP8oR07Fst/5cafwI=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0/go.mod h1:HfvuU0kW9HewH14VCOLImqKvUgONodURG7Alj/IrnGI=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q=
|
||||
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
|
||||
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 h1:dNzwXjZKpMpE2JhmO+9HsPl42NIXFIFSUSSs0fiqra0=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0/go.mod h1:90PoxvaEB5n6AOdZvi+yWJQoE95U8Dhhw2bSyRqnTD0=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 h1:nRVXXvf78e00EwY6Wp0YII8ww2JVWshZ20HfTlE11AM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0/go.mod h1:r49hO7CgrxY9Voaj3Xe8pANWtr0Oq916d0XAmOoCZAQ=
|
||||
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
|
||||
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
|
||||
go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os=
|
||||
go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||
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/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0/go.mod h1:gO9smoZe9KnZcJCqcB0lMmQ4Z5VEifYmjMTpnwtTSuQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 h1:cuXaPAfIoJKsYjBjPSb2nKZEmgM43zVr25l37IxhKME=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0/go.mod h1:BuzhPofpCzlDi/Q/Xjg54M4/3oWqqyDe2Zeq7A2I0QE=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||
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 v1.42.0/go.mod h1:lJNsdRMxCUIWuMlVJWzecSMuNjE7dOYyWlqOXWkdqCc=
|
||||
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
|
||||
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
|
||||
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 v1.42.0/go.mod h1:J2pvYM5NGHofZ2/Ru6zw/TNWnEQp5crgyDeSrYpXkAw=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A=
|
||||
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/exporters/otlp/otlptrace/otlptracehttp v1.42.0/go.mod h1:v0Tj04armyT59mnURNUJf7RCKcKzq+lgJs6QSjHjaTc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 h1:3iZJKlCZufyRzPzlQhUIWVmfltrXuGyfjREgGP3UUjc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0/go.mod h1:/G+nUPfhq2e+qiXMGxMwumDrP5jtzU+mWN7/sjT2rak=
|
||||
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/metric v1.42.0/go.mod h1:RlUN/7vTU7Ao/diDkEpQpnz3/92J9ko05BIwxYa2SSI=
|
||||
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
|
||||
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
|
||||
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 v1.42.0/go.mod h1:rGHCAxd9DAph0joO4W6OPwxjNTYWghRWmkHuGbayMts=
|
||||
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
|
||||
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
|
||||
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/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc=
|
||||
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
|
||||
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
|
||||
go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A=
|
||||
go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4=
|
||||
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
|
||||
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
|
||||
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.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
|
||||
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
|
||||
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
|
||||
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
|
||||
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
||||
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
|
||||
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
|
||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
|
||||
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
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=
|
||||
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
|
||||
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
|
||||
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
|
||||
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
|
||||
golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA=
|
||||
golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI=
|
||||
golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q=
|
||||
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
|
||||
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw=
|
||||
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
|
||||
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
|
||||
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA=
|
||||
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
||||
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
|
||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba h1:B14OtaXuMaCQsl2deSvNkyPKIzq3BjfxQp8d00QyWx4=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:G5IanEx8/PgI9w6CFcYQf7jMtHQhZruvfM1i3qOqk5U=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260311181403-84a4fc48630c/go.mod h1:X2gu9Qwng7Nn009s/r3RUxqkzQNqOrAy79bluY7ojIg=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529 h1:zUWMZsvo/IJcD1t6MNCPO/azZTwz0TvwCBqr5aifoVY=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529/go.mod h1:a5OGAgyRr4lqco7AG9hQM9Fwh0N2ZV4grR0eXFEsXQg=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846 h1:Wgl1rcDNThT+Zn47YyCXOXyX/COgMTIdhJ717F0l4xk=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260311181403-84a4fc48630c/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 h1:XF8+t6QQiS0o9ArVan/HW8Q7cycNPGsJf6GA2nXxYAg=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM=
|
||||
google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig=
|
||||
google.golang.org/grpc v1.79.2/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
|
||||
google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM=
|
||||
google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4=
|
||||
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
|
||||
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
||||
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
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=
|
||||
@@ -204,11 +280,11 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
modernc.org/libc v1.65.0 h1:e183gLDnAp9VJh6gWKdTy0CThL9Pt7MfcR/0bgb7Y1Y=
|
||||
modernc.org/libc v1.65.0/go.mod h1:7m9VzGq7APssBTydds2zBcxGREwvIGpuUBaKTXdm2Qs=
|
||||
modernc.org/libc v1.66.3 h1:cfCbjTUcdsKyyZZfEUKfoHcP3S0Wkvz3jgSzByEWVCQ=
|
||||
modernc.org/libc v1.66.3/go.mod h1:XD9zO8kt59cANKvHPXpx7yS2ELPheAey0vjIuZOhOU8=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.10.0 h1:fzumd51yQ1DxcOxSO+S6X7+QTuVU+n8/Aj7swYjFfC4=
|
||||
modernc.org/memory v1.10.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.37.0 h1:s1TMe7T3Q3ovQiK2Ouz4Jwh7dw4ZDqbebSDTlSJdfjI=
|
||||
modernc.org/sqlite v1.37.0/go.mod h1:5YiWv+YviqGMuGw4V+PNplcyaJ5v+vQd7TQOgkACoJM=
|
||||
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
|
||||
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.38.2 h1:Aclu7+tgjgcQVShZqim41Bbw9Cho0y/7WzYptXqkEek=
|
||||
modernc.org/sqlite v1.38.2/go.mod h1:cPTJYSlgg3Sfg046yBShXENNtPrWrDX8bsbAQBzgQ5E=
|
||||
+2
-2
@@ -167,7 +167,7 @@ func main() {
|
||||
AdminId: 0,
|
||||
CreatedAt: xtypes.Time(history.CreatedAt),
|
||||
}
|
||||
err := configHistoryRepo.Insert(ctx, result)
|
||||
err := configHistoryRepo.InsertV2(ctx, result)
|
||||
if err != nil {
|
||||
panic(errors.WithMessagef(err, "err inserting config_history: %s", history.Id))
|
||||
}
|
||||
@@ -194,7 +194,7 @@ func main() {
|
||||
Header("Content-Type", "application/octet-stream").
|
||||
RequestBody(sqliteFile).
|
||||
StatusCodeToError().
|
||||
Timeout(60 * time.Second).
|
||||
Timeout(120 * time.Second).
|
||||
DoWithoutResponse(ctx)
|
||||
if err != nil {
|
||||
panic(errors.WithMessage(err, "load sqlite file"))
|
||||
|
||||
@@ -35,7 +35,17 @@ rqlite:
|
||||
JoinAddrs: "127.0.0.1:9008"
|
||||
FKConstraints: true
|
||||
AutoVacInterval: 12h
|
||||
AutoOptimizeInterval: 23h
|
||||
JoinAs: default
|
||||
|
||||
backup:
|
||||
Enable: true
|
||||
Amount: 5
|
||||
Interval: "24h"
|
||||
ClearInterval: "168h"
|
||||
Sub:
|
||||
Dir: "/app/data/backups/rqlite"
|
||||
Name: "backup.sqlite.gz"
|
||||
|
||||
metricsAutodiscovery:
|
||||
enable: true
|
||||
+4
-1
@@ -1,7 +1,9 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/rqlite/rqlite/v8/auth"
|
||||
"isp-config-service/service/rqlite"
|
||||
|
||||
"github.com/rqlite/rqlite/v9/auth"
|
||||
"github.com/txix-open/isp-kit/bootstrap"
|
||||
)
|
||||
|
||||
@@ -12,6 +14,7 @@ type Local struct {
|
||||
KeepConfigVersions int `validate:"required"`
|
||||
InternalClientCredential string `validate:"required"`
|
||||
Rqlite Rqlite
|
||||
Backup rqlite.Backup
|
||||
}
|
||||
|
||||
type Rqlite struct {
|
||||
|
||||
@@ -3,15 +3,17 @@ package api
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/grpc/apierrors"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/entity"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/grpc/apierrors"
|
||||
)
|
||||
|
||||
type ConfigHistoryService interface {
|
||||
GetAllVersions(ctx context.Context, configId string) ([]domain.ConfigVersion, error)
|
||||
Delete(ctx context.Context, id string) error
|
||||
Purge(ctx context.Context, moduleName string, keepVersions int) (map[string]int, error)
|
||||
}
|
||||
|
||||
type ConfigHistory struct {
|
||||
@@ -71,3 +73,30 @@ func (c ConfigHistory) DeleteConfigVersion(ctx context.Context, req domain.IdReq
|
||||
Deleted: 1,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// PurgeConfigVersions
|
||||
// @Summary Метод удаления старых версий всех конфигураций модуля, оставляет keepVersions последних версий каждой конфигурации
|
||||
// @Description Возвращает количество удаленных версий каждой конфигурации
|
||||
// @Tags Конфигурация
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body domain.PurgeConfigVersionsRequest true "Название модуля, количество оставленных версий конфигурации"
|
||||
// @Success 200 {object} map[string]int
|
||||
// @Failure 400 {object} apierrors.Error "`errorCode: 2001` - модуль не найден"
|
||||
// @Failure 500 {object} apierrors.Error
|
||||
// @Router /config/purge_versions [POST]
|
||||
func (c ConfigHistory) PurgeConfigVersions(ctx context.Context, req domain.PurgeConfigVersionsRequest) (map[string]int, error) {
|
||||
result, err := c.service.Purge(ctx, req.ModuleName, req.KeepVersions)
|
||||
switch {
|
||||
case errors.Is(err, entity.ErrModuleNotFound):
|
||||
return nil, apierrors.NewBusinessError(
|
||||
domain.ErrorCodeModuleNotFound,
|
||||
"module not found",
|
||||
err,
|
||||
)
|
||||
case err != nil:
|
||||
return nil, apierrors.NewInternalServiceError(err)
|
||||
default:
|
||||
return result, nil
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,16 @@ package api
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/grpc/apierrors"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/entity"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/grpc/apierrors"
|
||||
)
|
||||
|
||||
type ConfigSchemaService interface {
|
||||
SchemaByModuleId(ctx context.Context, moduleId string) (*domain.ConfigSchema, error)
|
||||
UpdateSchemaByModuleName(ctx context.Context, request domain.UpdateSchemaRequest) error
|
||||
}
|
||||
|
||||
type ConfigSchema struct {
|
||||
@@ -49,3 +51,30 @@ func (c ConfigSchema) SchemaByModuleId(ctx context.Context, request domain.GetBy
|
||||
return schema, nil
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateSchemaByModuleName
|
||||
// @Summary Метод обновления схемы конфигурации модуля
|
||||
// @Description Меняет схему конфигурации модуля на переданную
|
||||
// @Tags Схема
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body domain.UpdateSchemaRequest true "название модуля и схема конфига"
|
||||
// @Success 200 {object} any
|
||||
// @Failure 400 {object} apierrors.Error "`errorCode: 2001` - модуль не найден"
|
||||
// @Failure 500 {object} apierrors.Error
|
||||
// @Router /schema/update_by_module_name [POST]
|
||||
func (c ConfigSchema) UpdateSchemaByModuleName(ctx context.Context, request domain.UpdateSchemaRequest) error {
|
||||
err := c.service.UpdateSchemaByModuleName(ctx, request)
|
||||
switch {
|
||||
case errors.Is(err, entity.ErrModuleNotFound):
|
||||
return apierrors.NewBusinessError(
|
||||
domain.ErrorCodeModuleNotFound,
|
||||
"module not found",
|
||||
err,
|
||||
)
|
||||
case err != nil:
|
||||
return apierrors.NewInternalServiceError(err)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ type ModuleService interface {
|
||||
Status(ctx context.Context) ([]domain.ModuleInfo, error)
|
||||
Delete(ctx context.Context, id string) error
|
||||
Connections(ctx context.Context) ([]domain.Connection, error)
|
||||
RequiredModules(ctx context.Context) ([]domain.ModuleRelation, error)
|
||||
}
|
||||
|
||||
type Module struct {
|
||||
@@ -65,6 +66,23 @@ func (c Module) DeleteModule(ctx context.Context, identities []string) (*domain.
|
||||
}, nil
|
||||
}
|
||||
|
||||
// RequiredModules
|
||||
// @Summary Метод для получения зависимостей модулей
|
||||
// @Description Возвращает список модулей с их зависимостями
|
||||
// @Tags Модули
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {array} domain.ModuleRelation
|
||||
// @Failure 500 {object} apierrors.Error
|
||||
// @Router /module/get_required_modules [POST]
|
||||
func (c Module) RequiredModules(ctx context.Context) ([]domain.ModuleRelation, error) {
|
||||
relations, err := c.service.RequiredModules(ctx)
|
||||
if err != nil {
|
||||
return nil, apierrors.NewInternalServiceError(err)
|
||||
}
|
||||
return relations, nil
|
||||
}
|
||||
|
||||
// Connections
|
||||
// @Summary Метод получения маршрутов
|
||||
// @Description Возвращает все доступные роуты
|
||||
|
||||
@@ -72,6 +72,8 @@ definitions:
|
||||
type: string
|
||||
moduleName:
|
||||
type: string
|
||||
transport:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
type: object
|
||||
@@ -141,6 +143,8 @@ definitions:
|
||||
type: object
|
||||
domain.EndpointDescriptor:
|
||||
properties:
|
||||
httpMethod:
|
||||
type: string
|
||||
inner:
|
||||
type: boolean
|
||||
path:
|
||||
@@ -197,6 +201,17 @@ definitions:
|
||||
$ref: '#/definitions/domain.Connection'
|
||||
type: array
|
||||
type: object
|
||||
domain.ModuleRelation:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
requiredModules:
|
||||
items:
|
||||
$ref: '#/definitions/domain.RequiredModuleType'
|
||||
type: array
|
||||
type: object
|
||||
domain.PrometheusTargets:
|
||||
properties:
|
||||
labels:
|
||||
@@ -208,6 +223,23 @@ definitions:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
domain.PurgeConfigVersionsRequest:
|
||||
properties:
|
||||
keepVersions:
|
||||
type: integer
|
||||
moduleName:
|
||||
type: string
|
||||
required:
|
||||
- keepVersions
|
||||
- moduleName
|
||||
type: object
|
||||
domain.RequiredModuleType:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
domain.SyncConfigRequest:
|
||||
properties:
|
||||
moduleName:
|
||||
@@ -225,6 +257,16 @@ definitions:
|
||||
- id
|
||||
- newConfigName
|
||||
type: object
|
||||
domain.UpdateSchemaRequest:
|
||||
properties:
|
||||
moduleName:
|
||||
type: string
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- moduleName
|
||||
- schema
|
||||
type: object
|
||||
domain.UpdateVariableRequest:
|
||||
properties:
|
||||
description:
|
||||
@@ -559,6 +601,39 @@ paths:
|
||||
summary: Метод активации конфигурации для модуля
|
||||
tags:
|
||||
- Конфигурация
|
||||
/config/purge_versions:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает количество удаленных версий каждой конфигурации
|
||||
parameters:
|
||||
- description: Название модуля, количество оставленных версий конфигурации
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/domain.PurgeConfigVersionsRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: integer
|
||||
type: object
|
||||
"400":
|
||||
description: '`errorCode: 2001` - модуль не найден'
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
|
||||
summary: Метод удаления старых версий всех конфигураций модуля, оставляет keepVersions
|
||||
последних версий каждой конфигурации
|
||||
tags:
|
||||
- Конфигурация
|
||||
/config/sync_config:
|
||||
post:
|
||||
consumes:
|
||||
@@ -690,6 +765,27 @@ paths:
|
||||
summary: Метод полчения полной информации о состоянии модулей
|
||||
tags:
|
||||
- Модули
|
||||
/module/get_required_modules:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Возвращает список модулей с их зависимостями
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/domain.ModuleRelation'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
|
||||
summary: Метод для получения зависимостей модулей
|
||||
tags:
|
||||
- Модули
|
||||
/routing/get_routes:
|
||||
post:
|
||||
consumes:
|
||||
@@ -741,6 +837,35 @@ paths:
|
||||
summary: Метод получения схемы конфигурации модуля
|
||||
tags:
|
||||
- Схема
|
||||
/schema/update_by_module_name:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Меняет схему конфигурации модуля на переданную
|
||||
parameters:
|
||||
- description: название модуля и схема конфига
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/domain.UpdateSchemaRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema: {}
|
||||
"400":
|
||||
description: '`errorCode: 2001` - модуль не найден'
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
|
||||
summary: Метод обновления схемы конфигурации модуля
|
||||
tags:
|
||||
- Схема
|
||||
/variable/all:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
@@ -8,6 +8,11 @@ type IdRequest struct {
|
||||
Id string `validate:"required"`
|
||||
}
|
||||
|
||||
type PurgeConfigVersionsRequest struct {
|
||||
ModuleName string `validate:"required"`
|
||||
KeepVersions int `validate:"required"`
|
||||
}
|
||||
|
||||
type GetByModuleIdRequest struct {
|
||||
ModuleId string `validate:"required"`
|
||||
}
|
||||
@@ -16,6 +21,11 @@ type GetByModuleNameRequest struct {
|
||||
ModuleName string `validate:"required"`
|
||||
}
|
||||
|
||||
type UpdateSchemaRequest struct {
|
||||
ModuleName string `validate:"required"`
|
||||
Schema json.RawMessage `validate:"required" swaggertype:"object"`
|
||||
}
|
||||
|
||||
type CreateUpdateConfigRequest struct {
|
||||
Id string
|
||||
Name string `validate:"required"`
|
||||
|
||||
+17
-3
@@ -11,8 +11,9 @@ type DeleteResponse struct {
|
||||
}
|
||||
|
||||
type CreateUpdateConfigResponse struct {
|
||||
IsChanged bool
|
||||
Config
|
||||
|
||||
IsChanged bool
|
||||
}
|
||||
|
||||
type ModuleInfo struct {
|
||||
@@ -32,6 +33,7 @@ type Connection struct {
|
||||
LibVersion string
|
||||
Version string
|
||||
Address Address
|
||||
Transport string
|
||||
Endpoints []EndpointDescriptor
|
||||
EstablishedAt time.Time
|
||||
}
|
||||
@@ -42,8 +44,9 @@ type Address struct {
|
||||
}
|
||||
|
||||
type EndpointDescriptor struct {
|
||||
Path string
|
||||
Inner bool
|
||||
HttpMethod string
|
||||
Path string
|
||||
Inner bool
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
@@ -74,3 +77,14 @@ type ConfigSchema struct {
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type ModuleRelation struct {
|
||||
Id string
|
||||
Name string
|
||||
RequiredModules []RequiredModuleType
|
||||
}
|
||||
|
||||
type RequiredModuleType struct {
|
||||
Id string
|
||||
Name string
|
||||
}
|
||||
@@ -13,6 +13,7 @@ type Backend struct {
|
||||
Version string `json:"version"`
|
||||
LibVersion string `json:"lib_version"`
|
||||
ModuleName string `json:"module_name"`
|
||||
Transport string `json:"transport"`
|
||||
ConfigServiceNodeId string `json:"config_service_node_id"`
|
||||
Endpoints xtypes.Json[[]cluster.EndpointDescriptor] `json:"endpoints"`
|
||||
RequiredModules xtypes.Json[[]cluster.ModuleDependency] `json:"required_modules"`
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
module isp-config-service
|
||||
|
||||
go 1.24
|
||||
go 1.26
|
||||
|
||||
replace (
|
||||
github.com/armon/go-metrics => github.com/hashicorp/go-metrics v0.5.1
|
||||
github.com/mattn/go-sqlite3 => github.com/rqlite/go-sqlite3 v1.42.0
|
||||
golang.org/x/text => golang.org/x/text v0.3.8
|
||||
)
|
||||
|
||||
@@ -11,67 +12,88 @@ require (
|
||||
github.com/Masterminds/squirrel v1.5.4
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pressly/goose/v3 v3.24.3
|
||||
github.com/prometheus/client_golang v1.22.0
|
||||
github.com/rqlite/gorqlite v0.0.0-20250607124847-f4d0f06a3f50
|
||||
github.com/pressly/goose/v3 v3.27.0
|
||||
github.com/prometheus/client_golang v1.23.2
|
||||
github.com/rqlite/gorqlite v0.0.0-20250609141355-ac86a4a1c9a8
|
||||
github.com/rqlite/rqlite-disco-clients v0.0.0-20250205044118-8ada2b350099
|
||||
github.com/rqlite/rqlite/v8 v8.37.4
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/rqlite/rqlite/v9 v9.3.2
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/tidwall/gjson v1.18.0
|
||||
github.com/txix-open/etp/v4 v4.0.1
|
||||
github.com/txix-open/go-cmp v0.0.0-20240401171944-16b203530f60
|
||||
github.com/txix-open/isp-kit v1.52.0
|
||||
github.com/txix-open/isp-kit v1.67.0
|
||||
github.com/xeipuuv/gojsonschema v1.2.0
|
||||
golang.org/x/sync v0.15.0
|
||||
google.golang.org/grpc v1.73.0
|
||||
golang.org/x/sync v0.20.0
|
||||
google.golang.org/grpc v1.79.2
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/armon/go-metrics v0.5.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.40.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.9 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.91.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/signin v1.0.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.30.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.41.1 // indirect
|
||||
github.com/aws/smithy-go v1.23.2 // indirect
|
||||
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/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/coder/websocket v1.8.13 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/coder/websocket v1.8.14 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
||||
github.com/getsentry/sentry-go v0.33.0 // indirect
|
||||
github.com/go-faker/faker/v4 v4.6.1 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
|
||||
github.com/getsentry/sentry-go v0.43.0 // indirect
|
||||
github.com/go-faker/faker/v4 v4.7.0 // 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/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
|
||||
github.com/hashicorp/go-hclog v1.6.3 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-metrics v0.5.4 // indirect
|
||||
github.com/hashicorp/go-msgpack v1.1.5 // indirect
|
||||
github.com/hashicorp/go-msgpack/v2 v2.1.3 // indirect
|
||||
github.com/hashicorp/go-msgpack/v2 v2.1.5 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
||||
github.com/hashicorp/raft v1.7.3 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mailru/easyjson v0.9.0 // indirect
|
||||
github.com/mailru/easyjson v0.9.1 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.32 // indirect
|
||||
github.com/mfridman/interpolate v0.0.2 // 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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.64.0 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/rqlite/go-sqlite3 v1.38.0 // indirect
|
||||
github.com/prometheus/common v0.67.5 // indirect
|
||||
github.com/prometheus/procfs v0.20.1 // indirect
|
||||
github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48 // indirect
|
||||
github.com/rqlite/sql v0.0.0-20250607152030-b0dd329faf9b // indirect
|
||||
github.com/rqlite/sql v0.0.0-20251114131613-ef07423e7137 // indirect
|
||||
github.com/sethvargo/go-retry v0.3.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/match v1.2.0 // indirect
|
||||
github.com/tidwall/pretty v1.2.1 // indirect
|
||||
github.com/txix-open/bellows v1.2.0 // indirect
|
||||
github.com/txix-open/jsonschema v1.3.0 // indirect
|
||||
@@ -79,25 +101,26 @@ require (
|
||||
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
|
||||
go.etcd.io/bbolt v1.4.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 // indirect
|
||||
go.opentelemetry.io/otel v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.36.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
|
||||
go.etcd.io/bbolt v1.4.3 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 // indirect
|
||||
go.opentelemetry.io/otel v1.42.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.42.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.42.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.42.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.42.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/crypto v0.39.0 // indirect
|
||||
golang.org/x/net v0.41.0 // indirect
|
||||
golang.org/x/sys v0.33.0 // indirect
|
||||
golang.org/x/text v0.26.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
|
||||
google.golang.org/protobuf v1.36.6 // indirect
|
||||
go.uber.org/zap v1.27.1 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.4 // indirect
|
||||
golang.org/x/crypto v0.49.0 // indirect
|
||||
golang.org/x/net v0.52.0 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/text v0.35.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260311181403-84a4fc48630c // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260311181403-84a4fc48630c // indirect
|
||||
google.golang.org/protobuf v1.36.11 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
@@ -9,6 +9,46 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/aws/aws-sdk-go-v2 v1.40.0 h1:/WMUA0kjhZExjOQN2z3oLALDREea1A7TobfuiBrKlwc=
|
||||
github.com/aws/aws-sdk-go-v2 v1.40.0/go.mod h1:c9pm7VwuW0UPxAEYGyTmyurVcNrbF6Rt/wixFqDhcjE=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 h1:DHctwEM8P8iTXFxC/QK0MRjwEpWQeM9yzidCRjldUz0=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3/go.mod h1:xdCzcZEtnSTKVDOmUZs4l/j3pSV6rpo1WXl5ugNsL8Y=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.0 h1:T5WWJYnam9SzBLbsVYDu2HscLDe+GU1AUJtfcDAc/vA=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.0/go.mod h1:pSRm/+D3TxBixGMXlgtX4+MPO9VNtEEtiFmNpxksoxw=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.0 h1:7zm+ez+qEqLaNsCSRaistkvJRJv8sByDOVuCnyHbP7M=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.0/go.mod h1:pHKPblrT7hqFGkNLxqoS3FlGoPrQg4hMIa+4asZzBfs=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 h1:WZVR5DbDgxzA0BJeudId89Kmgy6DIU4ORpxwsVHz0qA=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14/go.mod h1:Dadl9QO0kHgbrH1GRqGiZdYtW5w+IXXaBNCHTIaheM4=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.9 h1:luPCleinMpiPLuC73psYTKmrIVpQ9NhmyNxNGIPkcUE=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.9/go.mod h1:szPVaB6mJ+FuNpHH8LTG32DP6Abr+aGEMdDAyFl5klE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 h1:PZHqQACxYb8mYgms4RZbhZG0a7dPW06xOjmaH0EJC/I=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14/go.mod h1:VymhrMJUWs69D8u0/lZ7jSB6WgaG/NqHi3gX0aYf6U0=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 h1:bOS19y6zlJwagBfHxs0ESzr1XCOU2KXJCWcq3E2vfjY=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14/go.mod h1:1ipeGBMAxZ0xcTm6y6paC2C/J6f6OO7LBODV9afuAyM=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 h1:ITi7qiDSv/mSGDSWNpZ4k4Ve0DQR6Ug2SJQ8zEHoDXg=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14/go.mod h1:k1xtME53H1b6YpZt74YmwlONMWf4ecM+lut1WQLAF/U=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 h1:x2Ibm/Af8Fi+BH+Hsn9TXGdT+hKbDd5XOTZxTMxDk7o=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3/go.mod h1:IW1jwyrQgMdhisceG8fQLmQIydcT/jWY21rFhzgaKwo=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 h1:Hjkh7kE6D81PgrHlE/m9gx+4TyyeLHuY8xJs7yXN5C4=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5/go.mod h1:nPRXgyCfAurhyaTMoBMwRBYBhaHI4lNPAnJmjM0Tslc=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 h1:FIouAnCE46kyYqyhs0XEBDFFSREtdnr8HQuLPQPLCrY=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14/go.mod h1:UTwDc5COa5+guonQU8qBikJo1ZJ4ln2r1MkF7Dqag1E=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 h1:FzQE21lNtUor0Fb7QNgnEyiRCBlolLTX/Z1j65S7teM=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14/go.mod h1:s1ydyWG9pm3ZwmmYN21HKyG9WzAZhYVW85wMHs5FV6w=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.91.1 h1:f3CVT98cvySOZslMZHusyQHTMY8Xt+F1i0YaR6oEJ4s=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.91.1/go.mod h1:wYNqY3L02Z3IgRYxOBPH9I1zD9Cjh9hI5QOy/eOjQvw=
|
||||
github.com/aws/aws-sdk-go-v2/service/signin v1.0.1 h1:BDgIUYGEo5TkayOWv/oBLPphWwNm/A91AebUjAu5L5g=
|
||||
github.com/aws/aws-sdk-go-v2/service/signin v1.0.1/go.mod h1:iS6EPmNeqCsGo+xQmXv0jIMjyYtQfnwg36zl2FwEouk=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.30.4 h1:U//SlnkE1wOQiIImxzdY5PXat4Wq+8rlfVEw4Y7J8as=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.30.4/go.mod h1:av+ArJpoYf3pgyrj6tcehSFW+y9/QvAY8kMooR9bZCw=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.8 h1:MvlNs/f+9eM0mOjD9JzBUbf5jghyTk3p+O9yHMXX94Y=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.8/go.mod h1:/j67Z5XBVDx8nZVp9EuFM9/BS5dvBznbqILGuu73hug=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.41.1 h1:GdGmKtG+/Krag7VfyOXV17xjTCz0i9NT+JnqLTOI5nA=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.41.1/go.mod h1:6TxbXoDSgBQ225Qd8Q+MbxUxUh6TtNKwbRt/EPS9xso=
|
||||
github.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM=
|
||||
github.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
|
||||
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
|
||||
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
@@ -18,20 +58,19 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
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.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
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.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
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/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
|
||||
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
|
||||
github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE=
|
||||
github.com/coder/websocket v1.8.13/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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
@@ -39,14 +78,14 @@ github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY=
|
||||
github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok=
|
||||
github.com/getsentry/sentry-go v0.33.0 h1:YWyDii0KGVov3xOaamOnF0mjOrqSjBqwv48UEzn7QFg=
|
||||
github.com/getsentry/sentry-go v0.33.0/go.mod h1:C55omcY9ChRQIUcVcGcs+Zdy4ZpQGvNJ7JYHIoSWOtE=
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM=
|
||||
github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
||||
github.com/getsentry/sentry-go v0.43.0 h1:XbXLpFicpo8HmBDaInk7dum18G9KSLcjZiyUKS+hLW4=
|
||||
github.com/getsentry/sentry-go v0.43.0/go.mod h1:XDotiNZbgf5U8bPDUAfvcFmOnMQQceESxyKaObSssW0=
|
||||
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.6.1 h1:xUyVpAjEtB04l6XFY0V/29oR332rOSPWV4lU8RwDt4k=
|
||||
github.com/go-faker/faker/v4 v4.6.1/go.mod h1:arSdxNCSt7mOhdk8tEolvHeIJ7eX4OX80wXjKKvkKBY=
|
||||
github.com/go-faker/faker/v4 v4.7.0 h1:VboC02cXHl/NuQh5lM2W8b87yp4iFXIu59x4w0RZi4E=
|
||||
github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
@@ -64,8 +103,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
|
||||
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
|
||||
github.com/go-resty/resty/v2 v2.17.2 h1:FQW5oHYcIlkCNrMD2lloGScxcHJ0gkjshV3qcQAyHQk=
|
||||
github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
|
||||
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
|
||||
@@ -92,8 +131,8 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
|
||||
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.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
|
||||
@@ -108,11 +147,12 @@ github.com/hashicorp/go-metrics v0.5.4/go.mod h1:CG5yz4NZ/AI/aQt9Ucm/vdBnbh7fvmv
|
||||
github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs=
|
||||
github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4=
|
||||
github.com/hashicorp/go-msgpack/v2 v2.1.3 h1:cB1w4Zrk0O3jQBTcFMKqYQWRFfsSQ/TYKNyUUVyCP2c=
|
||||
github.com/hashicorp/go-msgpack/v2 v2.1.3/go.mod h1:SjlwKKFnwBXvxD/I1bEcfJIBbEJ+MCUn39TxymNR5ZU=
|
||||
github.com/hashicorp/go-msgpack/v2 v2.1.5 h1:Ue879bPnutj/hXfmUk6s/jtIK90XxgiUIcXRl656T44=
|
||||
github.com/hashicorp/go-msgpack/v2 v2.1.5/go.mod h1:bjCsRXpZ7NsJdk45PoCQnzRGDaK8TKm5ZnDI/9y3J4M=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
|
||||
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
|
||||
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
@@ -130,8 +170,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
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/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
|
||||
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
@@ -150,8 +190,8 @@ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhR
|
||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
|
||||
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.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
|
||||
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
|
||||
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/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||
@@ -176,8 +216,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
|
||||
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
|
||||
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
|
||||
@@ -186,17 +226,18 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
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/pressly/goose/v3 v3.24.3 h1:DSWWNwwggVUsYZ0X2VitiAa9sKuqtBfe+Jr9zFGwWlM=
|
||||
github.com/pressly/goose/v3 v3.24.3/go.mod h1:v9zYL4xdViLHCUUJh/mhjnm6JrK7Eul8AS93IxiZM4E=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pressly/goose/v3 v3.27.0 h1:/D30gVTuQhu0WsNZYbJi4DMOsx1lNq+6SkLe+Wp59BM=
|
||||
github.com/pressly/goose/v3 v3.27.0/go.mod h1:3ZBeCXqzkgIRvrEMDkYh1guvtoJTU5oMMuDdkutoM78=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
||||
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
|
||||
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
|
||||
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.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
@@ -206,33 +247,33 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
|
||||
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
||||
github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4=
|
||||
github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
||||
github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4=
|
||||
github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
||||
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
||||
github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc=
|
||||
github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo=
|
||||
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/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
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/rqlite/go-sqlite3 v1.38.0 h1:o3qTaVEHRzPsvTabUpPGPyNqnCyxEW3ccxHuPeUW/YI=
|
||||
github.com/rqlite/go-sqlite3 v1.38.0/go.mod h1:R9H7CatgYBt3c+fSV/5yo2vLh4ZjCB0aMHdkv69fP4A=
|
||||
github.com/rqlite/gorqlite v0.0.0-20250607124847-f4d0f06a3f50 h1:HuIA6fZR7DfQT+lqDCZfnh2VCs5N9IzX4utNwy8eAqo=
|
||||
github.com/rqlite/gorqlite v0.0.0-20250607124847-f4d0f06a3f50/go.mod h1:xF/KoXmrRyahPfo5L7Szb5cAAUl53dMWBh9cMruGEZg=
|
||||
github.com/rqlite/go-sqlite3 v1.42.0 h1:xfOaauBRqJyww/6g2z910/p3gyw/vjb2GgQYKfrZSrU=
|
||||
github.com/rqlite/go-sqlite3 v1.42.0/go.mod h1:R9H7CatgYBt3c+fSV/5yo2vLh4ZjCB0aMHdkv69fP4A=
|
||||
github.com/rqlite/gorqlite v0.0.0-20250609141355-ac86a4a1c9a8 h1:BoxiqWvhprOB2isgM59s8wkgKwAoyQH66Twfmof41oE=
|
||||
github.com/rqlite/gorqlite v0.0.0-20250609141355-ac86a4a1c9a8/go.mod h1:xF/KoXmrRyahPfo5L7Szb5cAAUl53dMWBh9cMruGEZg=
|
||||
github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48 h1:NZ62M+kT0JqhyFUMc8I4SMmfmD4NGJxhb2ePJQXjryc=
|
||||
github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48/go.mod h1:CRnsxgy5G8fAf5J+AM0yrsSdxXHKkIYOaq2sm+Q4DYc=
|
||||
github.com/rqlite/rqlite-disco-clients v0.0.0-20250205044118-8ada2b350099 h1:5cqkVLdl6sGJSY3kiF2dqaA3bD+8OS5FUdZqO0BxXLU=
|
||||
github.com/rqlite/rqlite-disco-clients v0.0.0-20250205044118-8ada2b350099/go.mod h1:6SVI8KegsW9Fyu2UQ+uvw0JI5CAILRYRyiQ/OFSJPrs=
|
||||
github.com/rqlite/rqlite/v8 v8.37.4 h1:PRroQ6uYQpg3x2N7pKdbDctjRvrc2x2UiRDr1NmEjNI=
|
||||
github.com/rqlite/rqlite/v8 v8.37.4/go.mod h1:4Laf7ESUjFp2EVewYkUVEGkw8BGDOcks+gvhUsC7mjA=
|
||||
github.com/rqlite/sql v0.0.0-20250607152030-b0dd329faf9b h1:usSxlq+oR5Y8HZ6DTj04wLjc/17MFxYcslhFGHS41Lg=
|
||||
github.com/rqlite/sql v0.0.0-20250607152030-b0dd329faf9b/go.mod h1:ib9zVtNgRKiGuoMyUqqL5aNpk+r+++YlyiVIkclVqPg=
|
||||
github.com/rqlite/rqlite/v9 v9.3.2 h1:/gpsmjbKqRTb4LEF0G5ik0g3jxKFmvMKK3L11Rk6UYE=
|
||||
github.com/rqlite/rqlite/v9 v9.3.2/go.mod h1:2TBF943qiqoJI+4/o46Rfgec2il/IL6hjlqHXvj0uII=
|
||||
github.com/rqlite/sql v0.0.0-20251114131613-ef07423e7137 h1:OG5MfYAA0yaWgllfPdOq9Xa2bo1vpurCNx1LWz7+Zh0=
|
||||
github.com/rqlite/sql v0.0.0-20251114131613-ef07423e7137/go.mod h1:ib9zVtNgRKiGuoMyUqqL5aNpk+r+++YlyiVIkclVqPg=
|
||||
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
|
||||
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
@@ -251,12 +292,13 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
|
||||
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/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.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/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
|
||||
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
|
||||
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||
github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM=
|
||||
github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
|
||||
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||
@@ -267,10 +309,10 @@ github.com/txix-open/etp/v4 v4.0.1 h1:5VSYgGsvnMz0tvUHsjVWFETI0qWBTCF1O3ARCHaCIg
|
||||
github.com/txix-open/etp/v4 v4.0.1/go.mod h1:FIu7TUDdwcgmtmF6tFTV1bGA2fRY/iVaPQdsGzvqYc8=
|
||||
github.com/txix-open/go-cmp v0.0.0-20240401171944-16b203530f60 h1:7SZ72lNU69g8eiT5rcRh1ubATZPs/J05NEIN7E47TYM=
|
||||
github.com/txix-open/go-cmp v0.0.0-20240401171944-16b203530f60/go.mod h1:jzpq0uwcdGq0OSNXZ6vv6UJkCOU/fLPgeoz+KkGDYgo=
|
||||
github.com/txix-open/grmq v1.8.1 h1:bcPLuYZXJ+1h9D3w7JYzUTypnQsw9XAT0Ftl/Fu+cZA=
|
||||
github.com/txix-open/grmq v1.8.1/go.mod h1:EyFOP17KrwEFOUjR+PH8iH3LCtiN9TSQ8t0ysyk62po=
|
||||
github.com/txix-open/isp-kit v1.52.0 h1:+3zce6PHrOT2fC6QNR8HXTsg9KrxLa8/lTdpC2tVRNU=
|
||||
github.com/txix-open/isp-kit v1.52.0/go.mod h1:OkscabRkpFGjUOFrbPM7yTKD/Br2/iv5/PWr/T2Jtd4=
|
||||
github.com/txix-open/grmq v1.11.0 h1:MJX10Sbspv21tKKYv9AqnSF1yMBrTa1UcwSDdoi19K0=
|
||||
github.com/txix-open/grmq v1.11.0/go.mod h1:6m9CCTQao/HAFalu5rFOZGJ5KLEP6WzzIwj80Ml3KGE=
|
||||
github.com/txix-open/isp-kit v1.67.0 h1:mApQ8JEE/iIY537cKobIHpAxChoLxgczb+Ux2Svuiy4=
|
||||
github.com/txix-open/isp-kit v1.67.0/go.mod h1:TAqW1YLfSgQeCurE1LNrru5LEHCjAyaxeAvRvrSFHTM=
|
||||
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=
|
||||
@@ -286,44 +328,46 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
go.etcd.io/bbolt v1.4.0 h1:TU77id3TnN/zKr7CO/uk+fBCwF2jGcMuw2B/FMAzYIk=
|
||||
go.etcd.io/bbolt v1.4.0/go.mod h1:AsD+OCi/qPN1giOX1aiLAha3o1U8rAz65bvN4j0sRuk=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 h1:lREC4C0ilyP4WibDhQ7Gg2ygAQFP8oR07Fst/5cafwI=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0/go.mod h1:HfvuU0kW9HewH14VCOLImqKvUgONodURG7Alj/IrnGI=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q=
|
||||
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
|
||||
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 h1:dNzwXjZKpMpE2JhmO+9HsPl42NIXFIFSUSSs0fiqra0=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0/go.mod h1:90PoxvaEB5n6AOdZvi+yWJQoE95U8Dhhw2bSyRqnTD0=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 h1:nRVXXvf78e00EwY6Wp0YII8ww2JVWshZ20HfTlE11AM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0/go.mod h1:r49hO7CgrxY9Voaj3Xe8pANWtr0Oq916d0XAmOoCZAQ=
|
||||
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
|
||||
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
|
||||
go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os=
|
||||
go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo=
|
||||
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
|
||||
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 h1:c9r/G1CSw4dPI1jaNNG9RnQP+q4SvZnHciDQJVIvchU=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0/go.mod h1:gO9smoZe9KnZcJCqcB0lMmQ4Z5VEifYmjMTpnwtTSuQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg=
|
||||
go.opentelemetry.io/otel v1.42.0 h1:lSQGzTgVR3+sgJDAU/7/ZMjN9Z+vUip7leaqBKy4sho=
|
||||
go.opentelemetry.io/otel v1.42.0/go.mod h1:lJNsdRMxCUIWuMlVJWzecSMuNjE7dOYyWlqOXWkdqCc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 h1:THuZiwpQZuHPul65w4WcwEnkX2QIuMT+UFoOrygtoJw=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0/go.mod h1:J2pvYM5NGHofZ2/Ru6zw/TNWnEQp5crgyDeSrYpXkAw=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.42.0 h1:uLXP+3mghfMf7XmV4PkGfFhFKuNWoCvvx5wP/wOXo0o=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.42.0/go.mod h1:v0Tj04armyT59mnURNUJf7RCKcKzq+lgJs6QSjHjaTc=
|
||||
go.opentelemetry.io/otel/metric v1.42.0 h1:2jXG+3oZLNXEPfNmnpxKDeZsFI5o4J+nz6xUlaFdF/4=
|
||||
go.opentelemetry.io/otel/metric v1.42.0/go.mod h1:RlUN/7vTU7Ao/diDkEpQpnz3/92J9ko05BIwxYa2SSI=
|
||||
go.opentelemetry.io/otel/sdk v1.42.0 h1:LyC8+jqk6UJwdrI/8VydAq/hvkFKNHZVIWuslJXYsDo=
|
||||
go.opentelemetry.io/otel/sdk v1.42.0/go.mod h1:rGHCAxd9DAph0joO4W6OPwxjNTYWghRWmkHuGbayMts=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.42.0 h1:D/1QR46Clz6ajyZ3G8SgNlTJKBdGp84q9RKCAZ3YGuA=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.42.0/go.mod h1:Ua6AAlDKdZ7tdvaQKfSmnFTdHx37+J4ba8MwVCYM5hc=
|
||||
go.opentelemetry.io/otel/trace v1.42.0 h1:OUCgIPt+mzOnaUTpOQcBiM/PLQ/Op7oq6g4LenLmOYY=
|
||||
go.opentelemetry.io/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc=
|
||||
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
|
||||
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
|
||||
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=
|
||||
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
|
||||
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
|
||||
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
|
||||
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
|
||||
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
|
||||
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
|
||||
golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4=
|
||||
golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA=
|
||||
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa h1:Zt3DZoOFFYkKhDT3v7Lm9FDMEV06GpzjG2jrqW+QTE0=
|
||||
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -335,8 +379,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||
golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0=
|
||||
golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -344,8 +388,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -369,8 +413,8 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
|
||||
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
|
||||
@@ -380,13 +424,15 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
||||
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
|
||||
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260311181403-84a4fc48630c h1:OyQPd6I3pN/9gDxz6L13kYGJgqkpdrAohJRBeXyxlgI=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260311181403-84a4fc48630c/go.mod h1:X2gu9Qwng7Nn009s/r3RUxqkzQNqOrAy79bluY7ojIg=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260311181403-84a4fc48630c h1:xgCzyF2LFIO/0X2UAoVRiXKU5Xg6VjToG4i2/ecSswk=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260311181403-84a4fc48630c/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/grpc v1.79.2 h1:fRMD94s2tITpyJGtBBn7MkMseNpOZU8ZxgC3MMBaXRU=
|
||||
google.golang.org/grpc v1.79.2/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
@@ -394,8 +440,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
||||
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@@ -411,11 +457,11 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
modernc.org/libc v1.65.0 h1:e183gLDnAp9VJh6gWKdTy0CThL9Pt7MfcR/0bgb7Y1Y=
|
||||
modernc.org/libc v1.65.0/go.mod h1:7m9VzGq7APssBTydds2zBcxGREwvIGpuUBaKTXdm2Qs=
|
||||
modernc.org/libc v1.68.0 h1:PJ5ikFOV5pwpW+VqCK1hKJuEWsonkIJhhIXyuF/91pQ=
|
||||
modernc.org/libc v1.68.0/go.mod h1:NnKCYeoYgsEqnY3PgvNgAeaJnso968ygU8Z0DxjoEc0=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.10.0 h1:fzumd51yQ1DxcOxSO+S6X7+QTuVU+n8/Aj7swYjFfC4=
|
||||
modernc.org/memory v1.10.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.37.0 h1:s1TMe7T3Q3ovQiK2Ouz4Jwh7dw4ZDqbebSDTlSJdfjI=
|
||||
modernc.org/sqlite v1.37.0/go.mod h1:5YiWv+YviqGMuGw4V+PNplcyaJ5v+vQd7TQOgkACoJM=
|
||||
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
|
||||
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.46.1 h1:eFJ2ShBLIEnUWlLy12raN0Z1plqmFX9Qe3rjQTKt6sU=
|
||||
modernc.org/sqlite v1.46.1/go.mod h1:CzbrU2lSB1DKUusvwGz7rqEKIq+NUd8GWuBBZDs9/nA=
|
||||
@@ -1,11 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/txix-open/isp-kit/bootstrap"
|
||||
"github.com/txix-open/isp-kit/shutdown"
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/routes"
|
||||
"isp-config-service/service/startup"
|
||||
|
||||
"github.com/txix-open/isp-kit/bootstrap"
|
||||
"github.com/txix-open/isp-kit/cluster"
|
||||
"github.com/txix-open/isp-kit/shutdown"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -24,7 +26,7 @@ var (
|
||||
//go:generate swag init --parseDependency
|
||||
//go:generate rm -f docs/swagger.json docs/docs.go
|
||||
func main() {
|
||||
boot := bootstrap.New(version, conf.Remote{}, routes.EndpointDescriptors())
|
||||
boot := bootstrap.New(version, conf.Remote{}, routes.EndpointDescriptors(), cluster.GrpcTransport)
|
||||
app := boot.App
|
||||
logger := app.Logger()
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
-- +goose Up
|
||||
-- +goose NO TRANSACTION
|
||||
alter table isp_config_service__backend add column transport text;
|
||||
|
||||
-- +goose Down
|
||||
alter table isp_config_service__backend drop column transport;
|
||||
+19
-6
@@ -26,11 +26,13 @@ func (r Backend) Insert(ctx context.Context, backend entity.Backend) error {
|
||||
|
||||
query, args, err := squirrel.Insert(Table("backend")).
|
||||
Columns("ws_connection_id", "module_id", "address",
|
||||
"version", "lib_version", "module_name", "config_service_node_id",
|
||||
"endpoints", "required_modules", "metrics_autodiscovery").
|
||||
"version", "lib_version", "module_name", "transport",
|
||||
"config_service_node_id", "endpoints", "required_modules",
|
||||
"metrics_autodiscovery").
|
||||
Values(backend.WsConnectionId, backend.ModuleId, backend.Address,
|
||||
backend.Version, backend.LibVersion, backend.ModuleName, backend.ConfigServiceNodeId,
|
||||
backend.Endpoints, backend.RequiredModules, backend.MetricsAutodiscovery,
|
||||
backend.Version, backend.LibVersion, backend.ModuleName, backend.Transport,
|
||||
backend.ConfigServiceNodeId, backend.Endpoints, backend.RequiredModules,
|
||||
backend.MetricsAutodiscovery,
|
||||
).
|
||||
ToSql()
|
||||
if err != nil {
|
||||
@@ -91,6 +93,7 @@ func (r Backend) DeleteByConfigServiceNodeId(ctx context.Context, configServiceN
|
||||
func (r Backend) GetByConfigServiceNodeId(ctx context.Context, configServiceNodeId string) ([]entity.Backend, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.GetByConfigServiceNodeId")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("backend")).
|
||||
Where(squirrel.Eq{
|
||||
@@ -114,8 +117,17 @@ func (r Backend) All(ctx context.Context) ([]entity.Backend, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.All")
|
||||
|
||||
result := make([]entity.Backend, 0)
|
||||
query := fmt.Sprintf("SELECT * FROM %s order by created_at desc", Table("backend"))
|
||||
err := r.db.Select(ctx, &result, query)
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("backend")).
|
||||
OrderBy("created_at desc").
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
err = r.db.Select(ctx, &result, query, args...)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "select: %s", query)
|
||||
}
|
||||
@@ -125,6 +137,7 @@ func (r Backend) All(ctx context.Context) ([]entity.Backend, error) {
|
||||
func (r Backend) GetByModuleId(ctx context.Context, moduleId string) ([]entity.Backend, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.GetByModuleId")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("backend")).
|
||||
Where(squirrel.Eq{
|
||||
|
||||
@@ -46,6 +46,7 @@ func (r Config) Insert(ctx context.Context, cfg entity.Config) error {
|
||||
func (r Config) GetActive(ctx context.Context, moduleId string) (*entity.Config, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Config.GetActive")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("config")).
|
||||
Where(squirrel.Eq{
|
||||
@@ -64,6 +65,7 @@ func (r Config) GetActive(ctx context.Context, moduleId string) (*entity.Config,
|
||||
func (r Config) GetByModuleId(ctx context.Context, moduleId string) ([]entity.Config, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Config.GetByModuleId")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("config")).
|
||||
Where(squirrel.Eq{
|
||||
@@ -86,6 +88,7 @@ func (r Config) GetByModuleId(ctx context.Context, moduleId string) ([]entity.Co
|
||||
func (r Config) GetById(ctx context.Context, id string) (*entity.Config, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Config.GetById")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("config")).
|
||||
Where(squirrel.Eq{
|
||||
|
||||
@@ -24,12 +24,23 @@ func NewConfigHistory(db db.DB) ConfigHistory {
|
||||
func (r ConfigHistory) GetByConfigId(ctx context.Context, configId string) ([]entity.ConfigHistory, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigHistory.GetByConfigId")
|
||||
|
||||
query := fmt.Sprintf(`select * from %s where config_id = ? order by version desc`, Table("config_history"))
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("config_history")).
|
||||
Where(squirrel.Eq{
|
||||
"config_id": configId,
|
||||
}).OrderBy("version desc").
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
result := make([]entity.ConfigHistory, 0)
|
||||
err := r.db.Select(ctx, &result, query, configId)
|
||||
err = r.db.Select(ctx, &result, query, args...)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "select: %s", query)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
@@ -44,8 +55,8 @@ func (r ConfigHistory) Delete(ctx context.Context, id string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r ConfigHistory) Insert(ctx context.Context, history entity.ConfigHistory) error {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigHistory.Insert")
|
||||
func (r ConfigHistory) InsertV2(ctx context.Context, history entity.ConfigHistory) error {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigHistory.InsertV2")
|
||||
|
||||
query, args, err := squirrel.Insert(Table("config_history")).
|
||||
Columns("id", "config_id", "data", "version", "admin_id").
|
||||
@@ -63,6 +74,25 @@ func (r ConfigHistory) Insert(ctx context.Context, history entity.ConfigHistory)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r ConfigHistory) Insert(ctx context.Context, history entity.ConfigHistory) error {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigHistory.Insert")
|
||||
|
||||
query, args, err := squirrel.Insert(Table("config_history")).
|
||||
Columns("id", "config_id", "data", "version", "admin_id", "created_at").
|
||||
Values(history.Id, history.ConfigId, history.Data, history.Version, history.AdminId, history.CreatedAt).
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
_, err = r.db.Exec(ctx, query, args...)
|
||||
if err != nil {
|
||||
return errors.WithMessagef(err, "exec: %s", query)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r ConfigHistory) DeleteOld(ctx context.Context, configId string, keepVersions int) (int, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigHistory.DeleteOld")
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package repository
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/Masterminds/squirrel"
|
||||
"github.com/pkg/errors"
|
||||
@@ -46,18 +45,28 @@ func (r ConfigSchema) Upsert(ctx context.Context, schema entity.ConfigSchema) er
|
||||
func (r ConfigSchema) All(ctx context.Context) ([]entity.ConfigSchema, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigSchema.All")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("config_schema")).
|
||||
OrderBy("created_at").
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
result := make([]entity.ConfigSchema, 0)
|
||||
query := fmt.Sprintf("select * from %s order by created_at", Table("config_schema"))
|
||||
err := r.db.Select(ctx, &result, query)
|
||||
err = r.db.Select(ctx, &result, query, args...)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "select: %s", query)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (r ConfigSchema) GetByModuleId(ctx context.Context, moduleId string) (*entity.ConfigSchema, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigSchema.GetByModuleId")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("config_schema")).
|
||||
Where(squirrel.Eq{"module_id": moduleId}).
|
||||
@@ -69,8 +78,26 @@ func (r ConfigSchema) GetByModuleId(ctx context.Context, moduleId string) (*enti
|
||||
return selectRow[entity.ConfigSchema](ctx, r.db, query, args...)
|
||||
}
|
||||
|
||||
func (r ConfigSchema) UpdateByModuleId(ctx context.Context, moduleId string, data []byte) error {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigSchema.UpdateByModuleId")
|
||||
query, args, err := squirrel.Update(Table("config_schema")).
|
||||
Set("data", data).
|
||||
Set("updated_at", squirrel.Expr("unixepoch()")).
|
||||
Where(squirrel.Eq{"module_id": moduleId}).
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
_, err = r.db.Exec(ctx, query, args...)
|
||||
if err != nil {
|
||||
return errors.WithMessagef(err, "exec: %s", query)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//nolint:nilnil
|
||||
func selectRow[T any](ctx context.Context, db db.DB, query string, args ...interface{}) (*T, error) {
|
||||
func selectRow[T any](ctx context.Context, db db.DB, query string, args ...any) (*T, error) {
|
||||
var result T
|
||||
err := db.SelectRow(ctx, &result, query, args...)
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
|
||||
+16
-2
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/Masterminds/squirrel"
|
||||
"github.com/pkg/errors"
|
||||
"isp-config-service/entity"
|
||||
"isp-config-service/entity/xtypes"
|
||||
@@ -35,12 +36,25 @@ func (r Event) Insert(ctx context.Context, event entity.Event) error {
|
||||
func (r Event) Get(ctx context.Context, lastEventId int, limit int) ([]entity.Event, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Event.Get")
|
||||
|
||||
query := fmt.Sprintf("select * from %s where id > ? order by id limit ?", Table("event"))
|
||||
// nolint:unqueryvet,gosec
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("event")).
|
||||
Where(squirrel.Gt{
|
||||
"id": lastEventId,
|
||||
}).
|
||||
OrderBy("id").
|
||||
Limit(uint64(limit)).
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
result := make([]entity.Event, 0)
|
||||
err := r.db.Select(ctx, &result, query, lastEventId, limit)
|
||||
err = r.db.Select(ctx, &result, query, args...)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "select: %s", query)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
||||
+24
-4
@@ -66,6 +66,7 @@ func (r Module) SetDisconnectedAtNow(
|
||||
func (r Module) GetByNames(ctx context.Context, names []string) ([]entity.Module, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Module.GetByNames")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("module")).
|
||||
Where(squirrel.Eq{
|
||||
@@ -88,19 +89,38 @@ func (r Module) GetByNames(ctx context.Context, names []string) ([]entity.Module
|
||||
func (r Module) GetById(ctx context.Context, id string) (*entity.Module, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Module.GetById")
|
||||
|
||||
query := fmt.Sprintf("select * from %s where id = ?", Table("module"))
|
||||
return selectRow[entity.Module](ctx, r.db, query, id)
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("module")).
|
||||
Where(squirrel.Eq{
|
||||
"id": id,
|
||||
}).
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
return selectRow[entity.Module](ctx, r.db, query, args...)
|
||||
}
|
||||
|
||||
func (r Module) All(ctx context.Context) ([]entity.Module, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Module.All")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("module")).
|
||||
OrderBy("name").
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
result := make([]entity.Module, 0)
|
||||
query := fmt.Sprintf("select * from %s order by name", Table("module"))
|
||||
err := r.db.Select(ctx, &result, query)
|
||||
err = r.db.Select(ctx, &result, query, args...)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "select: %s", query)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
||||
+13
-3
@@ -3,7 +3,6 @@ package repository
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/Masterminds/squirrel"
|
||||
@@ -26,18 +25,28 @@ func NewVariable(db db.DB) Variable {
|
||||
func (r Variable) All(ctx context.Context) ([]entity.Variable, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Variable.All")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("variable")).
|
||||
OrderBy("created_at desc").
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "build query")
|
||||
}
|
||||
|
||||
result := make([]entity.Variable, 0)
|
||||
query := fmt.Sprintf("SELECT * FROM %s order by created_at desc", Table("variable"))
|
||||
err := r.db.Select(ctx, &result, query)
|
||||
err = r.db.Select(ctx, &result, query, args...)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "select: %s", query)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (r Variable) GetByName(ctx context.Context, name string) (*entity.Variable, error) {
|
||||
ctx = sql_metrics.OperationLabelToContext(ctx, "Variable.GetByName")
|
||||
|
||||
// nolint:unqueryvet
|
||||
query, args, err := squirrel.Select("*").
|
||||
From(Table("variable")).
|
||||
Where(squirrel.Eq{"name": name}).
|
||||
@@ -146,6 +155,7 @@ func (r Variable) UpsertLinks(ctx context.Context, configId string, links []enti
|
||||
requests := [][]any{
|
||||
db.Request(deleteQuery, args...),
|
||||
}
|
||||
|
||||
for _, variable := range links {
|
||||
query, args, err := squirrel.Insert(Table("config_has_variable")).
|
||||
Columns("config_id", "variable_name").
|
||||
|
||||
+20
-5
@@ -3,16 +3,18 @@ package routes
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/txix-open/etp/v4"
|
||||
"isp-config-service/conf"
|
||||
|
||||
"github.com/txix-open/etp/v4"
|
||||
|
||||
"isp-config-service/controller"
|
||||
"isp-config-service/controller/api"
|
||||
mws "isp-config-service/middlewares"
|
||||
|
||||
"github.com/txix-open/isp-kit/cluster"
|
||||
"github.com/txix-open/isp-kit/grpc"
|
||||
"github.com/txix-open/isp-kit/grpc/endpoint"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"isp-config-service/controller"
|
||||
"isp-config-service/controller/api"
|
||||
mws "isp-config-service/middlewares"
|
||||
)
|
||||
|
||||
type Controllers struct {
|
||||
@@ -54,12 +56,13 @@ func BindEtp(etpSrv *etp.Server, c Controllers, logger log.Logger) {
|
||||
etpSrv.On(cluster.ModuleReady, onModuleReady)
|
||||
}
|
||||
|
||||
func HttpHandler(etpSrv *etp.Server, conf conf.Local, rqliteProxy http.Handler) http.Handler {
|
||||
func HttpHandler(etpSrv *etp.Server, conf conf.Local, rqliteProxy, rqliteBackupProxy http.Handler) http.Handler {
|
||||
httpMux := http.NewServeMux()
|
||||
if conf.MaintenanceMode {
|
||||
httpMux.Handle("/", rqliteProxy)
|
||||
} else {
|
||||
httpMux.Handle("/isp-etp/", etpSrv)
|
||||
httpMux.Handle("/backup", rqliteBackupProxy)
|
||||
}
|
||||
return httpMux
|
||||
}
|
||||
@@ -80,6 +83,10 @@ func endpointDescriptors(c Controllers) []cluster.EndpointDescriptor {
|
||||
Path: "config/routing/get_routes",
|
||||
Inner: true,
|
||||
Handler: c.ModuleApi.Connections,
|
||||
}, {
|
||||
Path: "config/module/get_required_modules",
|
||||
Inner: true,
|
||||
Handler: c.ModuleApi.RequiredModules,
|
||||
},
|
||||
// configs
|
||||
{
|
||||
@@ -122,10 +129,18 @@ func endpointDescriptors(c Controllers) []cluster.EndpointDescriptor {
|
||||
Path: "config/config/delete_version",
|
||||
Inner: true,
|
||||
Handler: c.ConfigHistoryApi.DeleteConfigVersion,
|
||||
}, {
|
||||
Path: "config/config/purge_versions",
|
||||
Inner: true,
|
||||
Handler: c.ConfigHistoryApi.PurgeConfigVersions,
|
||||
}, {
|
||||
Path: "config/schema/get_by_module_id",
|
||||
Inner: true,
|
||||
Handler: c.ConfigSchemaApi.SchemaByModuleId,
|
||||
}, {
|
||||
Path: "config/schema/update_by_module_name",
|
||||
Inner: true,
|
||||
Handler: c.ConfigSchemaApi.UpdateSchemaByModuleName,
|
||||
},
|
||||
// variables
|
||||
{
|
||||
|
||||
@@ -87,8 +87,7 @@ func (c Config) GetActiveConfigByModuleName(ctx context.Context, moduleName stri
|
||||
return nil, entity.ErrConfigNotFound
|
||||
}
|
||||
|
||||
result := configToDto(*config, nil)
|
||||
return &result, nil
|
||||
return new(configToDto(*config, nil)), nil
|
||||
}
|
||||
|
||||
func (c Config) GetConfigsByModuleId(ctx context.Context, moduleId string) ([]domain.Config, error) {
|
||||
@@ -209,8 +208,7 @@ func (c Config) GetConfigById(ctx context.Context, configId string) (*domain.Con
|
||||
return nil, entity.ErrConfigNotFound
|
||||
}
|
||||
|
||||
result := configToDto(*config, nil)
|
||||
return &result, nil
|
||||
return new(configToDto(*config, nil)), nil
|
||||
}
|
||||
|
||||
func (c Config) MarkConfigAsActive(ctx context.Context, configId string) error {
|
||||
|
||||
@@ -8,9 +8,10 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/entity"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type ConfigHistoryRepo interface {
|
||||
@@ -22,6 +23,7 @@ type ConfigHistoryRepo interface {
|
||||
|
||||
type ConfigHistory struct {
|
||||
configRepo ConfigRepo
|
||||
moduleRepo ModuleRepo
|
||||
repo ConfigHistoryRepo
|
||||
keepVersions int
|
||||
logger log.Logger
|
||||
@@ -29,12 +31,14 @@ type ConfigHistory struct {
|
||||
|
||||
func NewConfigHistory(
|
||||
configRepo ConfigRepo,
|
||||
moduleRepo ModuleRepo,
|
||||
repo ConfigHistoryRepo,
|
||||
keepVersions int,
|
||||
logger log.Logger,
|
||||
) ConfigHistory {
|
||||
return ConfigHistory{
|
||||
repo: repo,
|
||||
moduleRepo: moduleRepo,
|
||||
configRepo: configRepo,
|
||||
keepVersions: keepVersions,
|
||||
logger: logger,
|
||||
@@ -84,6 +88,34 @@ func (s ConfigHistory) Delete(ctx context.Context, id string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s ConfigHistory) Purge(ctx context.Context, moduleName string, keepVersions int) (map[string]int, error) {
|
||||
modules, err := s.moduleRepo.GetByNames(ctx, []string{moduleName})
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "get config by module name")
|
||||
}
|
||||
if len(modules) == 0 {
|
||||
return nil, entity.ErrModuleNotFound
|
||||
}
|
||||
|
||||
configs, err := s.configRepo.GetByModuleId(ctx, modules[0].Id)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "get configs by module id")
|
||||
}
|
||||
|
||||
result := make(map[string]int)
|
||||
for _, config := range configs {
|
||||
deletedCount, err := s.repo.DeleteOld(ctx, config.Id, keepVersions)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "delete old config")
|
||||
}
|
||||
s.logger.Debug(ctx, fmt.Sprintf("delete '%d' old version of config '%s'", deletedCount, config.Id))
|
||||
|
||||
result[config.Id] = deletedCount
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (s ConfigHistory) OnUpdateConfig(ctx context.Context, oldConfig entity.Config) error {
|
||||
history := entity.ConfigHistory{
|
||||
Id: uuid.NewString(),
|
||||
@@ -102,6 +134,7 @@ func (s ConfigHistory) OnUpdateConfig(ctx context.Context, oldConfig entity.Conf
|
||||
return nil
|
||||
}
|
||||
|
||||
// nolint:gosec
|
||||
go func() {
|
||||
deletedCount, err := s.repo.DeleteOld(context.Background(), oldConfig.Id, s.keepVersions)
|
||||
if err != nil {
|
||||
|
||||
@@ -4,18 +4,21 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/entity"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type ConfigSchema struct {
|
||||
schemaRepo SchemaRepo
|
||||
moduleRepo ModuleRepo
|
||||
}
|
||||
|
||||
func NewConfigSchema(schemaRepo SchemaRepo) ConfigSchema {
|
||||
func NewConfigSchema(schemaRepo SchemaRepo, moduleRepo ModuleRepo) ConfigSchema {
|
||||
return ConfigSchema{
|
||||
schemaRepo: schemaRepo,
|
||||
moduleRepo: moduleRepo,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,3 +42,20 @@ func (s ConfigSchema) SchemaByModuleId(ctx context.Context, moduleId string) (*d
|
||||
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
func (s ConfigSchema) UpdateSchemaByModuleName(ctx context.Context, request domain.UpdateSchemaRequest) error {
|
||||
modules, err := s.moduleRepo.GetByNames(ctx, []string{request.ModuleName})
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "get modules by name")
|
||||
}
|
||||
if len(modules) == 0 {
|
||||
return entity.ErrModuleNotFound
|
||||
}
|
||||
|
||||
err = s.schemaRepo.UpdateByModuleId(ctx, modules[0].Id, request.Schema)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "update schema by module id")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
+85
-3
@@ -27,6 +27,7 @@ type BackendsRepo interface {
|
||||
type SchemaRepo interface {
|
||||
All(ctx context.Context) ([]entity.ConfigSchema, error)
|
||||
GetByModuleId(ctx context.Context, moduleId string) (*entity.ConfigSchema, error)
|
||||
UpdateByModuleId(ctx context.Context, moduleId string, data []byte) error
|
||||
}
|
||||
|
||||
type Module struct {
|
||||
@@ -106,6 +107,46 @@ func (s Module) Status(ctx context.Context) ([]domain.ModuleInfo, error) {
|
||||
return moduleInfos, nil
|
||||
}
|
||||
|
||||
func (s Module) RequiredModules(ctx context.Context) ([]domain.ModuleRelation, error) {
|
||||
var (
|
||||
modules []entity.Module
|
||||
backends []entity.Backend
|
||||
)
|
||||
group, groupCtx := errgroup.WithContext(ctx)
|
||||
group.Go(func() error {
|
||||
var err error
|
||||
modules, err = s.moduleRepo.All(groupCtx)
|
||||
return errors.WithMessage(err, "get all modules")
|
||||
})
|
||||
group.Go(func() error {
|
||||
var err error
|
||||
backends, err = s.backendsRepo.All(groupCtx)
|
||||
return errors.WithMessage(err, "get all backends")
|
||||
})
|
||||
err := group.Wait()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "wait")
|
||||
}
|
||||
|
||||
moduleIdsByName := make(map[string]string, len(modules))
|
||||
for _, module := range modules {
|
||||
moduleIdsByName[module.Name] = module.Id
|
||||
}
|
||||
|
||||
requiredNamesByModuleId := requiredModuleNamesByModuleId(backends)
|
||||
|
||||
result := make([]domain.ModuleRelation, 0, len(modules))
|
||||
for _, module := range modules {
|
||||
result = append(result, domain.ModuleRelation{
|
||||
Id: module.Id,
|
||||
Name: module.Name,
|
||||
RequiredModules: toRequiredModuleTypes(requiredNamesByModuleId[module.Id], moduleIdsByName),
|
||||
})
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (s Module) Delete(ctx context.Context, id string) error {
|
||||
err := s.moduleRepo.Delete(ctx, id)
|
||||
if err != nil {
|
||||
@@ -141,12 +182,17 @@ func (s Module) backendToDto(backend entity.Backend) (domain.Connection, error)
|
||||
endpointsDescriptors := make([]domain.EndpointDescriptor, 0)
|
||||
for _, desc := range backend.Endpoints.Value {
|
||||
endpointsDescriptors = append(endpointsDescriptors, domain.EndpointDescriptor{
|
||||
Path: desc.Path,
|
||||
Inner: desc.Inner,
|
||||
HttpMethod: desc.HttpMethod,
|
||||
Path: desc.Path,
|
||||
Inner: desc.Inner,
|
||||
})
|
||||
}
|
||||
slices.SortFunc(endpointsDescriptors, func(a, b domain.EndpointDescriptor) int {
|
||||
return cmp.Compare(a.Path, b.Path)
|
||||
c := cmp.Compare(a.Path, b.Path)
|
||||
if c != 0 {
|
||||
return c
|
||||
}
|
||||
return cmp.Compare(a.HttpMethod, b.HttpMethod)
|
||||
})
|
||||
|
||||
conn := domain.Connection{
|
||||
@@ -154,6 +200,7 @@ func (s Module) backendToDto(backend entity.Backend) (domain.Connection, error)
|
||||
ModuleName: backend.ModuleName,
|
||||
LibVersion: backend.LibVersion,
|
||||
Version: backend.Version,
|
||||
Transport: backend.Transport,
|
||||
Address: domain.Address{
|
||||
Ip: addr.IP,
|
||||
Port: addr.Port,
|
||||
@@ -164,3 +211,38 @@ func (s Module) backendToDto(backend entity.Backend) (domain.Connection, error)
|
||||
|
||||
return conn, nil
|
||||
}
|
||||
|
||||
func requiredModuleNamesByModuleId(backends []entity.Backend) map[string]map[string]struct{} {
|
||||
result := make(map[string]map[string]struct{})
|
||||
for _, backend := range backends {
|
||||
_, ok := result[backend.ModuleId]
|
||||
if !ok {
|
||||
result[backend.ModuleId] = make(map[string]struct{})
|
||||
}
|
||||
|
||||
for _, dep := range backend.RequiredModules.Value {
|
||||
result[backend.ModuleId][dep.Name] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
func toRequiredModuleTypes(requiredNames map[string]struct{}, moduleIdsByName map[string]string) []domain.RequiredModuleType {
|
||||
requiredModules := make([]domain.RequiredModuleType, 0, len(requiredNames))
|
||||
|
||||
for requiredName := range requiredNames {
|
||||
requiredModules = append(
|
||||
requiredModules,
|
||||
domain.RequiredModuleType{
|
||||
Id: moduleIdsByName[requiredName],
|
||||
Name: requiredName,
|
||||
})
|
||||
}
|
||||
|
||||
slices.SortFunc(requiredModules, func(a, b domain.RequiredModuleType) int {
|
||||
return cmp.Compare(a.Name, b.Name)
|
||||
})
|
||||
|
||||
return requiredModules
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package event
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"isp-config-service/service/rqlite"
|
||||
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
)
|
||||
|
||||
type BackupCleaner struct {
|
||||
leaderChecker LeaderChecker
|
||||
cfg rqlite.Backup
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func NewBackupCleaner(
|
||||
leaderChecker LeaderChecker,
|
||||
cfg rqlite.Backup,
|
||||
logger log.Logger,
|
||||
) BackupCleaner {
|
||||
return BackupCleaner{
|
||||
leaderChecker: leaderChecker,
|
||||
cfg: cfg,
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
func (c BackupCleaner) Do(ctx context.Context) {
|
||||
ctx = log.ToContext(ctx, log.String("worker", "backupCleaner"))
|
||||
if !c.leaderChecker.IsLeader() {
|
||||
c.logger.Debug(ctx, "is not a leader, skip work")
|
||||
return
|
||||
}
|
||||
|
||||
files, err := os.ReadDir(c.cfg.Sub.Dir)
|
||||
if err != nil {
|
||||
c.logger.Error(ctx, fmt.Sprintf("failed to read files from %s: %s", c.cfg.Sub.Dir, err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
backups := make([]os.DirEntry, 0)
|
||||
for _, file := range files {
|
||||
if !strings.Contains(file.Name(), "backup") {
|
||||
continue
|
||||
}
|
||||
|
||||
backups = append(backups, file)
|
||||
}
|
||||
|
||||
if len(backups) <= c.cfg.Amount {
|
||||
return
|
||||
}
|
||||
|
||||
deleteAmount := len(backups) - c.cfg.Amount
|
||||
deleted := 0
|
||||
|
||||
for i := range deleteAmount {
|
||||
err = os.Remove(c.cfg.Sub.Dir + "/" + backups[i].Name())
|
||||
if err != nil {
|
||||
c.logger.Error(ctx, fmt.Sprintf("failed to remove %s: %s", backups[i].Name(), err.Error()))
|
||||
continue
|
||||
}
|
||||
|
||||
deleted++
|
||||
}
|
||||
|
||||
c.logger.Debug(ctx, fmt.Sprintf("delete %d old backups", deleted))
|
||||
}
|
||||
@@ -3,13 +3,15 @@ package backend
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"isp-config-service/entity"
|
||||
"isp-config-service/entity/xtypes"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/etp/v4"
|
||||
"github.com/txix-open/isp-kit/cluster"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"isp-config-service/entity"
|
||||
"isp-config-service/entity/xtypes"
|
||||
)
|
||||
|
||||
type Repo interface {
|
||||
@@ -58,6 +60,17 @@ func (s Backend) Connect(
|
||||
metricsAd = &xtypes.Json[cluster.MetricsAutodiscovery]{Value: *declaration.MetricsAutodiscovery}
|
||||
}
|
||||
|
||||
if declaration.Transport == "" {
|
||||
declaration.Transport = cluster.GrpcTransport
|
||||
}
|
||||
if declaration.Transport == cluster.GrpcTransport {
|
||||
for i := range declaration.Endpoints {
|
||||
if declaration.Endpoints[i].HttpMethod == "" {
|
||||
declaration.Endpoints[i].HttpMethod = http.MethodPost
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
backend := entity.Backend{
|
||||
WsConnectionId: connId,
|
||||
ModuleId: moduleId,
|
||||
@@ -65,6 +78,7 @@ func (s Backend) Connect(
|
||||
Version: declaration.Version,
|
||||
LibVersion: declaration.LibVersion,
|
||||
ModuleName: declaration.ModuleName,
|
||||
Transport: declaration.Transport,
|
||||
ConfigServiceNodeId: s.nodeId,
|
||||
Endpoints: xtypes.Json[[]cluster.EndpointDescriptor]{Value: declaration.Endpoints},
|
||||
RequiredModules: xtypes.Json[[]cluster.ModuleDependency]{Value: declaration.RequiredModules},
|
||||
|
||||
@@ -0,0 +1,492 @@
|
||||
// nolint
|
||||
package rqlite
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Config represents the configuration as set by command-line flags.
|
||||
// All variables will be set, unless explicit noted.
|
||||
type Config struct {
|
||||
// DataPath is path to node data. Always set.
|
||||
DataPath string
|
||||
|
||||
// ExtensionPaths is a comma-delimited list of path to SQLite extensions to be loaded.
|
||||
// Each element may be a directory path, zipfile, or tar.gz file. May not be set.
|
||||
ExtensionPaths StringSliceValue
|
||||
|
||||
// HTTPAddr is the bind network address for the HTTP Server.
|
||||
// It never includes a trailing HTTP or HTTPS.
|
||||
HTTPAddr string
|
||||
|
||||
// HTTPAdv is the advertised HTTP server network.
|
||||
HTTPAdv string
|
||||
|
||||
// HTTPAllowOrigin is the value to set for Access-Control-Allow-Origin HTTP header.
|
||||
HTTPAllowOrigin string
|
||||
|
||||
// AuthFile is the path to the authentication file. May not be set.
|
||||
AuthFile string `filepath:"true"`
|
||||
|
||||
// AutoBackupFile is the path to the auto-backup file. May not be set.
|
||||
AutoBackupFile string `filepath:"true"`
|
||||
|
||||
// AutoRestoreFile is the path to the auto-restore file. May not be set.
|
||||
AutoRestoreFile string `filepath:"true"`
|
||||
|
||||
// HTTPx509CACert is the path to the CA certificate file for when this node verifies
|
||||
// other certificates for any HTTP communications. May not be set.
|
||||
HTTPx509CACert string `filepath:"true"`
|
||||
|
||||
// HTTPx509Cert is the path to the X509 cert for the HTTP server. May not be set.
|
||||
HTTPx509Cert string `filepath:"true"`
|
||||
|
||||
// HTTPx509Key is the path to the private key for the HTTP server. May not be set.
|
||||
HTTPx509Key string `filepath:"true"`
|
||||
|
||||
// HTTPVerifyClient indicates whether the HTTP server should verify client certificates.
|
||||
HTTPVerifyClient bool
|
||||
|
||||
// NodeX509CACert is the path to the CA certificate file for when this node verifies
|
||||
// other certificates for any inter-node communications. May not be set.
|
||||
NodeX509CACert string `filepath:"true"`
|
||||
|
||||
// NodeX509Cert is the path to the X509 cert for the Raft server. May not be set.
|
||||
NodeX509Cert string `filepath:"true"`
|
||||
|
||||
// NodeX509Key is the path to the X509 key for the Raft server. May not be set.
|
||||
NodeX509Key string `filepath:"true"`
|
||||
|
||||
// NoNodeVerify disables checking other nodes' Node X509 certs for validity.
|
||||
NoNodeVerify bool
|
||||
|
||||
// NodeVerifyClient enable mutual TLS for node-to-node communication.
|
||||
NodeVerifyClient bool
|
||||
|
||||
// NodeVerifyServerName is the hostname to verify on the certificates returned by nodes.
|
||||
// If NoNodeVerify is true this field is ignored.
|
||||
NodeVerifyServerName string
|
||||
|
||||
// NodeID is the Raft ID for the node.
|
||||
NodeID string
|
||||
|
||||
// RaftAddr is the bind network address for the Raft server.
|
||||
RaftAddr string
|
||||
|
||||
// RaftAdv is the advertised Raft server address.
|
||||
RaftAdv string
|
||||
|
||||
// JoinAddrs is the list of Raft addresses to use for a join attempt.
|
||||
JoinAddrs string
|
||||
|
||||
// JoinAttempts is the number of times a node should attempt to join using a
|
||||
// given address.
|
||||
JoinAttempts int
|
||||
|
||||
// JoinInterval is the time between retrying failed join operations.
|
||||
JoinInterval time.Duration
|
||||
|
||||
// JoinAs sets the user join attempts should be performed as. May not be set.
|
||||
JoinAs string
|
||||
|
||||
// BootstrapExpect is the minimum number of nodes required for a bootstrap.
|
||||
BootstrapExpect int
|
||||
|
||||
// BootstrapExpectTimeout is the maximum time a bootstrap operation can take.
|
||||
BootstrapExpectTimeout time.Duration
|
||||
|
||||
// DiscoMode sets the discovery mode. May not be set.
|
||||
DiscoMode string
|
||||
|
||||
// DiscoKey sets the discovery prefix key.
|
||||
DiscoKey string
|
||||
|
||||
// DiscoConfig sets the path to any discovery configuration file. May not be set.
|
||||
DiscoConfig string
|
||||
|
||||
// OnDiskPath sets the path to the SQLite file. May not be set.
|
||||
OnDiskPath string
|
||||
|
||||
// FKConstraints enables SQLite foreign key constraints.
|
||||
FKConstraints bool
|
||||
|
||||
// AutoVacInterval sets the automatic VACUUM interval. Use 0s to disable.
|
||||
AutoVacInterval time.Duration
|
||||
|
||||
// AutoOptimizeInterval sets the automatic optimization interval. Use 0s to disable.
|
||||
AutoOptimizeInterval time.Duration
|
||||
|
||||
// RaftLogLevel sets the minimum logging level for the Raft subsystem.
|
||||
RaftLogLevel string
|
||||
|
||||
// RaftNonVoter controls whether this node is a voting, read-only node.
|
||||
RaftNonVoter bool
|
||||
|
||||
// RaftSnapThreshold is the number of outstanding log entries that trigger snapshot.
|
||||
RaftSnapThreshold uint64
|
||||
|
||||
// RaftSnapThreshold is the size of a SQLite WAL file which will trigger a snapshot.
|
||||
RaftSnapThresholdWALSize uint64
|
||||
|
||||
// RaftSnapInterval sets the threshold check interval.
|
||||
RaftSnapInterval time.Duration
|
||||
|
||||
// RaftLeaderLeaseTimeout sets the leader lease timeout.
|
||||
RaftLeaderLeaseTimeout time.Duration
|
||||
|
||||
// RaftHeartbeatTimeout specifies the time in follower state without contact
|
||||
// from a Leader before the node attempts an election.
|
||||
RaftHeartbeatTimeout time.Duration
|
||||
|
||||
// RaftElectionTimeout specifies the time in candidate state without contact
|
||||
// from a Leader before the node attempts an election.
|
||||
RaftElectionTimeout time.Duration
|
||||
|
||||
// RaftApplyTimeout sets the Log-apply timeout.
|
||||
RaftApplyTimeout time.Duration
|
||||
|
||||
// RaftShutdownOnRemove sets whether Raft should be shutdown if the node is removed
|
||||
RaftShutdownOnRemove bool
|
||||
|
||||
// RaftClusterRemoveOnShutdown sets whether the node should remove itself from the cluster on shutdown
|
||||
RaftClusterRemoveOnShutdown bool
|
||||
|
||||
// RaftStepdownOnShutdown sets whether Leadership should be relinquished on shutdown
|
||||
RaftStepdownOnShutdown bool
|
||||
|
||||
// RaftReapNodeTimeout sets the duration after which a non-reachable voting node is
|
||||
// reaped i.e. removed from the cluster.
|
||||
RaftReapNodeTimeout time.Duration
|
||||
|
||||
// RaftReapReadOnlyNodeTimeout sets the duration after which a non-reachable non-voting node is
|
||||
// reaped i.e. removed from the cluster.
|
||||
RaftReapReadOnlyNodeTimeout time.Duration
|
||||
|
||||
// ClusterConnectTimeout sets the timeout when initially connecting to another node in
|
||||
// the cluster, for non-Raft communications.
|
||||
ClusterConnectTimeout time.Duration
|
||||
|
||||
// WriteQueueCap is the default capacity of Execute queues
|
||||
WriteQueueCap int
|
||||
|
||||
// WriteQueueBatchSz is the default batch size for Execute queues
|
||||
WriteQueueBatchSz int
|
||||
|
||||
// WriteQueueTimeout is the default time after which any data will be sent on
|
||||
// Execute queues, if a batch size has not been reached.
|
||||
WriteQueueTimeout time.Duration
|
||||
|
||||
// WriteQueueTx controls whether writes from the queue are done within a transaction.
|
||||
WriteQueueTx bool
|
||||
|
||||
// CPUProfile enables CPU profiling.
|
||||
CPUProfile string
|
||||
|
||||
// MemProfile enables memory profiling.
|
||||
MemProfile string
|
||||
|
||||
// TraceProfile enables trace profiling.
|
||||
TraceProfile string
|
||||
}
|
||||
|
||||
type Backup struct {
|
||||
Enable bool
|
||||
Amount int
|
||||
Version int
|
||||
Type string
|
||||
Interval string
|
||||
ClearInterval time.Duration
|
||||
Timestamp bool
|
||||
Vacuum bool
|
||||
Sub Sub
|
||||
}
|
||||
|
||||
type Sub struct {
|
||||
Dir string
|
||||
Name string
|
||||
}
|
||||
|
||||
func (b *Backup) SetParams() {
|
||||
b.Version = 1
|
||||
b.Type = "file"
|
||||
b.Timestamp = true
|
||||
}
|
||||
|
||||
// Validate checks the configuration for internal consistency, and activates
|
||||
// important rqlite policies. It must be called at least once on a Config
|
||||
// object before the Config object is used. It is OK to call more than
|
||||
// once.
|
||||
func (c *Config) Validate() error {
|
||||
dataPath, err := filepath.Abs(c.DataPath)
|
||||
if err != nil {
|
||||
return errors.Errorf("failed to determine absolute data path: %s", err.Error())
|
||||
}
|
||||
c.DataPath = dataPath
|
||||
|
||||
err = c.CheckFilePaths()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = c.CheckDirPaths()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(c.ExtensionPaths) > 0 {
|
||||
for _, p := range c.ExtensionPaths {
|
||||
if !fileExists(p) {
|
||||
return errors.Errorf("extension path does not exist: %s", p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !bothUnsetSet(c.HTTPx509Cert, c.HTTPx509Key) {
|
||||
return errors.Errorf("either both -%s and -%s must be set, or neither", HTTPx509CertFlag, HTTPx509KeyFlag)
|
||||
}
|
||||
if !bothUnsetSet(c.NodeX509Cert, c.NodeX509Key) {
|
||||
return errors.Errorf("either both -%s and -%s must be set, or neither", NodeX509CertFlag, NodeX509KeyFlag)
|
||||
|
||||
}
|
||||
|
||||
if c.RaftAddr == c.HTTPAddr {
|
||||
return errors.New("HTTP and Raft addresses must differ")
|
||||
}
|
||||
|
||||
// Enforce policies regarding addresses
|
||||
if c.RaftAdv == "" {
|
||||
c.RaftAdv = c.RaftAddr
|
||||
}
|
||||
if c.HTTPAdv == "" {
|
||||
c.HTTPAdv = c.HTTPAddr
|
||||
}
|
||||
|
||||
// Node ID policy
|
||||
if c.NodeID == "" {
|
||||
c.NodeID = c.RaftAdv
|
||||
}
|
||||
|
||||
// Perform some address validity checks.
|
||||
if strings.HasPrefix(strings.ToLower(c.HTTPAddr), "http") ||
|
||||
strings.HasPrefix(strings.ToLower(c.HTTPAdv), "http") {
|
||||
return errors.New("HTTP options should not include protocol (http:// or https://)")
|
||||
}
|
||||
if _, _, err := net.SplitHostPort(c.HTTPAddr); err != nil {
|
||||
return errors.New("HTTP bind address not valid")
|
||||
}
|
||||
|
||||
hadv, _, err := net.SplitHostPort(c.HTTPAdv)
|
||||
if err != nil {
|
||||
return errors.New("HTTP advertised HTTP address not valid")
|
||||
}
|
||||
if addr := net.ParseIP(hadv); addr != nil && addr.IsUnspecified() {
|
||||
return errors.Errorf("advertised HTTP address is not routable (%s), specify it via -%s or -%s",
|
||||
hadv, HTTPAddrFlag, HTTPAdvAddrFlag)
|
||||
}
|
||||
|
||||
if _, rp, err := net.SplitHostPort(c.RaftAddr); err != nil {
|
||||
return errors.New("raft bind address not valid")
|
||||
} else if _, err := strconv.Atoi(rp); err != nil {
|
||||
return errors.New("raft bind port not valid")
|
||||
}
|
||||
|
||||
radv, rp, err := net.SplitHostPort(c.RaftAdv)
|
||||
if err != nil {
|
||||
return errors.New("raft advertised address not valid")
|
||||
}
|
||||
if addr := net.ParseIP(radv); addr != nil && addr.IsUnspecified() {
|
||||
return errors.Errorf("advertised Raft address is not routable (%s), specify it via -%s or -%s",
|
||||
radv, RaftAddrFlag, RaftAdvAddrFlag)
|
||||
}
|
||||
if _, err := strconv.Atoi(rp); err != nil {
|
||||
return errors.New("raft advertised port is not valid")
|
||||
}
|
||||
|
||||
if c.RaftAdv == c.HTTPAdv {
|
||||
return errors.New("advertised HTTP and Raft addresses must differ")
|
||||
}
|
||||
|
||||
// Enforce bootstrapping policies
|
||||
if c.BootstrapExpect > 0 && c.RaftNonVoter {
|
||||
return errors.New("bootstrapping only applicable to voting nodes")
|
||||
}
|
||||
|
||||
// Join parameters OK?
|
||||
if c.JoinAddrs != "" {
|
||||
addrs := strings.Split(c.JoinAddrs, ",")
|
||||
for i := range addrs {
|
||||
if _, _, err := net.SplitHostPort(addrs[i]); err != nil {
|
||||
return errors.Errorf("%s is an invalid join address", addrs[i])
|
||||
}
|
||||
|
||||
if c.BootstrapExpect == 0 {
|
||||
if addrs[i] == c.RaftAdv || addrs[i] == c.RaftAddr {
|
||||
return errors.New("node cannot join with itself unless bootstrapping")
|
||||
}
|
||||
if c.AutoRestoreFile != "" {
|
||||
return errors.New("auto-restoring cannot be used when joining a cluster")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if c.DiscoMode != "" {
|
||||
return errors.New("disco mode cannot be used when also explicitly joining a cluster")
|
||||
}
|
||||
}
|
||||
|
||||
// Valid disco mode?
|
||||
switch c.DiscoMode {
|
||||
case "":
|
||||
case DiscoModeEtcdKV, DiscoModeConsulKV:
|
||||
if c.BootstrapExpect > 0 {
|
||||
return errors.Errorf("bootstrapping not applicable when using %s", c.DiscoMode)
|
||||
}
|
||||
case DiscoModeDNS, DiscoModeDNSSRV:
|
||||
if c.BootstrapExpect == 0 && !c.RaftNonVoter {
|
||||
return errors.Errorf("bootstrap-expect value required when using %s with a voting node", c.DiscoMode)
|
||||
}
|
||||
default:
|
||||
return errors.Errorf("disco mode must be one of %s, %s, %s, or %s",
|
||||
DiscoModeConsulKV, DiscoModeEtcdKV, DiscoModeDNS, DiscoModeDNSSRV)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// JoinAddresses returns the join addresses set at the command line. Returns nil
|
||||
// if no join addresses were set.
|
||||
func (c *Config) JoinAddresses() []string {
|
||||
if c.JoinAddrs == "" {
|
||||
return nil
|
||||
}
|
||||
return strings.Split(c.JoinAddrs, ",")
|
||||
}
|
||||
|
||||
// HTTPURL returns the fully-formed, advertised HTTP API address for this config, including
|
||||
// protocol, host and port.
|
||||
func (c *Config) HTTPURL() string {
|
||||
apiProto := "http"
|
||||
if c.HTTPx509Cert != "" {
|
||||
apiProto = "https"
|
||||
}
|
||||
return fmt.Sprintf("%s://%s", apiProto, c.HTTPAdv)
|
||||
}
|
||||
|
||||
// RaftPort returns the port on which the Raft system is listening. Validate must
|
||||
// have been called before calling this method.
|
||||
func (c *Config) RaftPort() int {
|
||||
_, port, err := net.SplitHostPort(c.RaftAddr)
|
||||
if err != nil {
|
||||
panic("RaftAddr not valid")
|
||||
}
|
||||
p, err := strconv.Atoi(port)
|
||||
if err != nil {
|
||||
panic("RaftAddr port not valid")
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
// DiscoConfigReader returns a ReadCloser providing access to the Disco config.
|
||||
// The caller must call close on the ReadCloser when finished with it. If no
|
||||
// config was supplied, it returns nil.
|
||||
func (c *Config) DiscoConfigReader() io.ReadCloser {
|
||||
var rc io.ReadCloser
|
||||
if c.DiscoConfig == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Open config file. If opening fails, assume string is the literal config.
|
||||
cfgFile, err := os.Open(c.DiscoConfig)
|
||||
if err != nil {
|
||||
rc = io.NopCloser(bytes.NewReader([]byte(c.DiscoConfig)))
|
||||
} else {
|
||||
rc = cfgFile
|
||||
}
|
||||
return rc
|
||||
}
|
||||
|
||||
// CheckFilePaths checks that all file paths in the config exist.
|
||||
// Empty filepaths are ignored.
|
||||
func (c *Config) CheckFilePaths() error {
|
||||
v := reflect.ValueOf(c).Elem()
|
||||
|
||||
// Iterate through the fields of the struct
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
field := v.Type().Field(i)
|
||||
fieldValue := v.Field(i)
|
||||
|
||||
if fieldValue.Kind() != reflect.String {
|
||||
continue
|
||||
}
|
||||
|
||||
if tagValue, ok := field.Tag.Lookup("filepath"); ok && tagValue == "true" {
|
||||
filePath := fieldValue.String()
|
||||
if filePath == "" {
|
||||
continue
|
||||
}
|
||||
if !fileExists(filePath) {
|
||||
return errors.Errorf("%s does not exist", filePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// CheckDirPaths checks that all directory paths in the config exist and are directories.
|
||||
// Empty directory paths are ignored.
|
||||
func (c *Config) CheckDirPaths() error {
|
||||
v := reflect.ValueOf(c).Elem()
|
||||
|
||||
// Iterate through the fields of the struct
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
field := v.Type().Field(i)
|
||||
fieldValue := v.Field(i)
|
||||
|
||||
if fieldValue.Kind() != reflect.String {
|
||||
continue
|
||||
}
|
||||
|
||||
if tagValue, ok := field.Tag.Lookup("dirpath"); ok && tagValue == "true" {
|
||||
dirPath := fieldValue.String()
|
||||
if dirPath == "" {
|
||||
continue
|
||||
}
|
||||
if !fileExists(dirPath) {
|
||||
return errors.Errorf("%s does not exist", dirPath)
|
||||
}
|
||||
if !isDir(dirPath) {
|
||||
return errors.Errorf("%s is not a directory", dirPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// bothUnsetSet returns true if both a and b are unset, or both are set.
|
||||
func bothUnsetSet(a, b string) bool {
|
||||
return (a == "" && b == "") || (a != "" && b != "")
|
||||
}
|
||||
|
||||
func fileExists(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func isDir(path string) bool {
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return fi.IsDir()
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rqlite/rqlite/v8/auth"
|
||||
"github.com/rqlite/rqlite/v9/auth"
|
||||
"github.com/txix-open/isp-kit/json"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,17 +2,10 @@
|
||||
package rqlite
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@@ -56,440 +49,6 @@ func (s *StringSliceValue) Set(value string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Config represents the configuration as set by command-line flags.
|
||||
// All variables will be set, unless explicit noted.
|
||||
type Config struct {
|
||||
// DataPath is path to node data. Always set.
|
||||
DataPath string
|
||||
|
||||
// ExtensionPaths is a comma-delimited list of path to SQLite extensions to be loaded.
|
||||
// Each element may be a directory path, zipfile, or tar.gz file. May not be set.
|
||||
ExtensionPaths StringSliceValue
|
||||
|
||||
// HTTPAddr is the bind network address for the HTTP Server.
|
||||
// It never includes a trailing HTTP or HTTPS.
|
||||
HTTPAddr string
|
||||
|
||||
// HTTPAdv is the advertised HTTP server network.
|
||||
HTTPAdv string
|
||||
|
||||
// HTTPAllowOrigin is the value to set for Access-Control-Allow-Origin HTTP header.
|
||||
HTTPAllowOrigin string
|
||||
|
||||
// AuthFile is the path to the authentication file. May not be set.
|
||||
AuthFile string `filepath:"true"`
|
||||
|
||||
// AutoBackupFile is the path to the auto-backup file. May not be set.
|
||||
AutoBackupFile string `filepath:"true"`
|
||||
|
||||
// AutoRestoreFile is the path to the auto-restore file. May not be set.
|
||||
AutoRestoreFile string `filepath:"true"`
|
||||
|
||||
// HTTPx509CACert is the path to the CA certificate file for when this node verifies
|
||||
// other certificates for any HTTP communications. May not be set.
|
||||
HTTPx509CACert string `filepath:"true"`
|
||||
|
||||
// HTTPx509Cert is the path to the X509 cert for the HTTP server. May not be set.
|
||||
HTTPx509Cert string `filepath:"true"`
|
||||
|
||||
// HTTPx509Key is the path to the private key for the HTTP server. May not be set.
|
||||
HTTPx509Key string `filepath:"true"`
|
||||
|
||||
// HTTPVerifyClient indicates whether the HTTP server should verify client certificates.
|
||||
HTTPVerifyClient bool
|
||||
|
||||
// NodeX509CACert is the path to the CA certificate file for when this node verifies
|
||||
// other certificates for any inter-node communications. May not be set.
|
||||
NodeX509CACert string `filepath:"true"`
|
||||
|
||||
// NodeX509Cert is the path to the X509 cert for the Raft server. May not be set.
|
||||
NodeX509Cert string `filepath:"true"`
|
||||
|
||||
// NodeX509Key is the path to the X509 key for the Raft server. May not be set.
|
||||
NodeX509Key string `filepath:"true"`
|
||||
|
||||
// NoNodeVerify disables checking other nodes' Node X509 certs for validity.
|
||||
NoNodeVerify bool
|
||||
|
||||
// NodeVerifyClient enable mutual TLS for node-to-node communication.
|
||||
NodeVerifyClient bool
|
||||
|
||||
// NodeVerifyServerName is the hostname to verify on the certificates returned by nodes.
|
||||
// If NoNodeVerify is true this field is ignored.
|
||||
NodeVerifyServerName string
|
||||
|
||||
// NodeID is the Raft ID for the node.
|
||||
NodeID string
|
||||
|
||||
// RaftAddr is the bind network address for the Raft server.
|
||||
RaftAddr string
|
||||
|
||||
// RaftAdv is the advertised Raft server address.
|
||||
RaftAdv string
|
||||
|
||||
// JoinAddrs is the list of Raft addresses to use for a join attempt.
|
||||
JoinAddrs string
|
||||
|
||||
// JoinAttempts is the number of times a node should attempt to join using a
|
||||
// given address.
|
||||
JoinAttempts int
|
||||
|
||||
// JoinInterval is the time between retrying failed join operations.
|
||||
JoinInterval time.Duration
|
||||
|
||||
// JoinAs sets the user join attempts should be performed as. May not be set.
|
||||
JoinAs string
|
||||
|
||||
// BootstrapExpect is the minimum number of nodes required for a bootstrap.
|
||||
BootstrapExpect int
|
||||
|
||||
// BootstrapExpectTimeout is the maximum time a bootstrap operation can take.
|
||||
BootstrapExpectTimeout time.Duration
|
||||
|
||||
// DiscoMode sets the discovery mode. May not be set.
|
||||
DiscoMode string
|
||||
|
||||
// DiscoKey sets the discovery prefix key.
|
||||
DiscoKey string
|
||||
|
||||
// DiscoConfig sets the path to any discovery configuration file. May not be set.
|
||||
DiscoConfig string
|
||||
|
||||
// OnDiskPath sets the path to the SQLite file. May not be set.
|
||||
OnDiskPath string
|
||||
|
||||
// FKConstraints enables SQLite foreign key constraints.
|
||||
FKConstraints bool
|
||||
|
||||
// AutoVacInterval sets the automatic VACUUM interval. Use 0s to disable.
|
||||
AutoVacInterval time.Duration
|
||||
|
||||
// AutoOptimizeInterval sets the automatic optimization interval. Use 0s to disable.
|
||||
AutoOptimizeInterval time.Duration
|
||||
|
||||
// RaftLogLevel sets the minimum logging level for the Raft subsystem.
|
||||
RaftLogLevel string
|
||||
|
||||
// RaftNonVoter controls whether this node is a voting, read-only node.
|
||||
RaftNonVoter bool
|
||||
|
||||
// RaftSnapThreshold is the number of outstanding log entries that trigger snapshot.
|
||||
RaftSnapThreshold uint64
|
||||
|
||||
// RaftSnapThreshold is the size of a SQLite WAL file which will trigger a snapshot.
|
||||
RaftSnapThresholdWALSize uint64
|
||||
|
||||
// RaftSnapInterval sets the threshold check interval.
|
||||
RaftSnapInterval time.Duration
|
||||
|
||||
// RaftLeaderLeaseTimeout sets the leader lease timeout.
|
||||
RaftLeaderLeaseTimeout time.Duration
|
||||
|
||||
// RaftHeartbeatTimeout specifies the time in follower state without contact
|
||||
// from a Leader before the node attempts an election.
|
||||
RaftHeartbeatTimeout time.Duration
|
||||
|
||||
// RaftElectionTimeout specifies the time in candidate state without contact
|
||||
// from a Leader before the node attempts an election.
|
||||
RaftElectionTimeout time.Duration
|
||||
|
||||
// RaftApplyTimeout sets the Log-apply timeout.
|
||||
RaftApplyTimeout time.Duration
|
||||
|
||||
// RaftShutdownOnRemove sets whether Raft should be shutdown if the node is removed
|
||||
RaftShutdownOnRemove bool
|
||||
|
||||
// RaftClusterRemoveOnShutdown sets whether the node should remove itself from the cluster on shutdown
|
||||
RaftClusterRemoveOnShutdown bool
|
||||
|
||||
// RaftStepdownOnShutdown sets whether Leadership should be relinquished on shutdown
|
||||
RaftStepdownOnShutdown bool
|
||||
|
||||
// RaftReapNodeTimeout sets the duration after which a non-reachable voting node is
|
||||
// reaped i.e. removed from the cluster.
|
||||
RaftReapNodeTimeout time.Duration
|
||||
|
||||
// RaftReapReadOnlyNodeTimeout sets the duration after which a non-reachable non-voting node is
|
||||
// reaped i.e. removed from the cluster.
|
||||
RaftReapReadOnlyNodeTimeout time.Duration
|
||||
|
||||
// ClusterConnectTimeout sets the timeout when initially connecting to another node in
|
||||
// the cluster, for non-Raft communications.
|
||||
ClusterConnectTimeout time.Duration
|
||||
|
||||
// WriteQueueCap is the default capacity of Execute queues
|
||||
WriteQueueCap int
|
||||
|
||||
// WriteQueueBatchSz is the default batch size for Execute queues
|
||||
WriteQueueBatchSz int
|
||||
|
||||
// WriteQueueTimeout is the default time after which any data will be sent on
|
||||
// Execute queues, if a batch size has not been reached.
|
||||
WriteQueueTimeout time.Duration
|
||||
|
||||
// WriteQueueTx controls whether writes from the queue are done within a transaction.
|
||||
WriteQueueTx bool
|
||||
|
||||
// CPUProfile enables CPU profiling.
|
||||
CPUProfile string
|
||||
|
||||
// MemProfile enables memory profiling.
|
||||
MemProfile string
|
||||
|
||||
// TraceProfile enables trace profiling.
|
||||
TraceProfile string
|
||||
}
|
||||
|
||||
// Validate checks the configuration for internal consistency, and activates
|
||||
// important rqlite policies. It must be called at least once on a Config
|
||||
// object before the Config object is used. It is OK to call more than
|
||||
// once.
|
||||
func (c *Config) Validate() error {
|
||||
dataPath, err := filepath.Abs(c.DataPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to determine absolute data path: %s", err.Error())
|
||||
}
|
||||
c.DataPath = dataPath
|
||||
|
||||
err = c.CheckFilePaths()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = c.CheckDirPaths()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(c.ExtensionPaths) > 0 {
|
||||
for _, p := range c.ExtensionPaths {
|
||||
if !fileExists(p) {
|
||||
return fmt.Errorf("extension path does not exist: %s", p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !bothUnsetSet(c.HTTPx509Cert, c.HTTPx509Key) {
|
||||
return fmt.Errorf("either both -%s and -%s must be set, or neither", HTTPx509CertFlag, HTTPx509KeyFlag)
|
||||
}
|
||||
if !bothUnsetSet(c.NodeX509Cert, c.NodeX509Key) {
|
||||
return fmt.Errorf("either both -%s and -%s must be set, or neither", NodeX509CertFlag, NodeX509KeyFlag)
|
||||
|
||||
}
|
||||
|
||||
if c.RaftAddr == c.HTTPAddr {
|
||||
return errors.New("HTTP and Raft addresses must differ")
|
||||
}
|
||||
|
||||
// Enforce policies regarding addresses
|
||||
if c.RaftAdv == "" {
|
||||
c.RaftAdv = c.RaftAddr
|
||||
}
|
||||
if c.HTTPAdv == "" {
|
||||
c.HTTPAdv = c.HTTPAddr
|
||||
}
|
||||
|
||||
// Node ID policy
|
||||
if c.NodeID == "" {
|
||||
c.NodeID = c.RaftAdv
|
||||
}
|
||||
|
||||
// Perform some address validity checks.
|
||||
if strings.HasPrefix(strings.ToLower(c.HTTPAddr), "http") ||
|
||||
strings.HasPrefix(strings.ToLower(c.HTTPAdv), "http") {
|
||||
return errors.New("HTTP options should not include protocol (http:// or https://)")
|
||||
}
|
||||
if _, _, err := net.SplitHostPort(c.HTTPAddr); err != nil {
|
||||
return errors.New("HTTP bind address not valid")
|
||||
}
|
||||
|
||||
hadv, _, err := net.SplitHostPort(c.HTTPAdv)
|
||||
if err != nil {
|
||||
return errors.New("HTTP advertised HTTP address not valid")
|
||||
}
|
||||
if addr := net.ParseIP(hadv); addr != nil && addr.IsUnspecified() {
|
||||
return fmt.Errorf("advertised HTTP address is not routable (%s), specify it via -%s or -%s",
|
||||
hadv, HTTPAddrFlag, HTTPAdvAddrFlag)
|
||||
}
|
||||
|
||||
if _, rp, err := net.SplitHostPort(c.RaftAddr); err != nil {
|
||||
return errors.New("raft bind address not valid")
|
||||
} else if _, err := strconv.Atoi(rp); err != nil {
|
||||
return errors.New("raft bind port not valid")
|
||||
}
|
||||
|
||||
radv, rp, err := net.SplitHostPort(c.RaftAdv)
|
||||
if err != nil {
|
||||
return errors.New("raft advertised address not valid")
|
||||
}
|
||||
if addr := net.ParseIP(radv); addr != nil && addr.IsUnspecified() {
|
||||
return fmt.Errorf("advertised Raft address is not routable (%s), specify it via -%s or -%s",
|
||||
radv, RaftAddrFlag, RaftAdvAddrFlag)
|
||||
}
|
||||
if _, err := strconv.Atoi(rp); err != nil {
|
||||
return errors.New("raft advertised port is not valid")
|
||||
}
|
||||
|
||||
if c.RaftAdv == c.HTTPAdv {
|
||||
return errors.New("advertised HTTP and Raft addresses must differ")
|
||||
}
|
||||
|
||||
// Enforce bootstrapping policies
|
||||
if c.BootstrapExpect > 0 && c.RaftNonVoter {
|
||||
return errors.New("bootstrapping only applicable to voting nodes")
|
||||
}
|
||||
|
||||
// Join parameters OK?
|
||||
if c.JoinAddrs != "" {
|
||||
addrs := strings.Split(c.JoinAddrs, ",")
|
||||
for i := range addrs {
|
||||
if _, _, err := net.SplitHostPort(addrs[i]); err != nil {
|
||||
return fmt.Errorf("%s is an invalid join address", addrs[i])
|
||||
}
|
||||
|
||||
if c.BootstrapExpect == 0 {
|
||||
if addrs[i] == c.RaftAdv || addrs[i] == c.RaftAddr {
|
||||
return errors.New("node cannot join with itself unless bootstrapping")
|
||||
}
|
||||
if c.AutoRestoreFile != "" {
|
||||
return errors.New("auto-restoring cannot be used when joining a cluster")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if c.DiscoMode != "" {
|
||||
return errors.New("disco mode cannot be used when also explicitly joining a cluster")
|
||||
}
|
||||
}
|
||||
|
||||
// Valid disco mode?
|
||||
switch c.DiscoMode {
|
||||
case "":
|
||||
case DiscoModeEtcdKV, DiscoModeConsulKV:
|
||||
if c.BootstrapExpect > 0 {
|
||||
return fmt.Errorf("bootstrapping not applicable when using %s", c.DiscoMode)
|
||||
}
|
||||
case DiscoModeDNS, DiscoModeDNSSRV:
|
||||
if c.BootstrapExpect == 0 && !c.RaftNonVoter {
|
||||
return fmt.Errorf("bootstrap-expect value required when using %s with a voting node", c.DiscoMode)
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("disco mode must be one of %s, %s, %s, or %s",
|
||||
DiscoModeConsulKV, DiscoModeEtcdKV, DiscoModeDNS, DiscoModeDNSSRV)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// JoinAddresses returns the join addresses set at the command line. Returns nil
|
||||
// if no join addresses were set.
|
||||
func (c *Config) JoinAddresses() []string {
|
||||
if c.JoinAddrs == "" {
|
||||
return nil
|
||||
}
|
||||
return strings.Split(c.JoinAddrs, ",")
|
||||
}
|
||||
|
||||
// HTTPURL returns the fully-formed, advertised HTTP API address for this config, including
|
||||
// protocol, host and port.
|
||||
func (c *Config) HTTPURL() string {
|
||||
apiProto := "http"
|
||||
if c.HTTPx509Cert != "" {
|
||||
apiProto = "https"
|
||||
}
|
||||
return fmt.Sprintf("%s://%s", apiProto, c.HTTPAdv)
|
||||
}
|
||||
|
||||
// RaftPort returns the port on which the Raft system is listening. Validate must
|
||||
// have been called before calling this method.
|
||||
func (c *Config) RaftPort() int {
|
||||
_, port, err := net.SplitHostPort(c.RaftAddr)
|
||||
if err != nil {
|
||||
panic("RaftAddr not valid")
|
||||
}
|
||||
p, err := strconv.Atoi(port)
|
||||
if err != nil {
|
||||
panic("RaftAddr port not valid")
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
// DiscoConfigReader returns a ReadCloser providing access to the Disco config.
|
||||
// The caller must call close on the ReadCloser when finished with it. If no
|
||||
// config was supplied, it returns nil.
|
||||
func (c *Config) DiscoConfigReader() io.ReadCloser {
|
||||
var rc io.ReadCloser
|
||||
if c.DiscoConfig == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Open config file. If opening fails, assume string is the literal config.
|
||||
cfgFile, err := os.Open(c.DiscoConfig)
|
||||
if err != nil {
|
||||
rc = io.NopCloser(bytes.NewReader([]byte(c.DiscoConfig)))
|
||||
} else {
|
||||
rc = cfgFile
|
||||
}
|
||||
return rc
|
||||
}
|
||||
|
||||
// CheckFilePaths checks that all file paths in the config exist.
|
||||
// Empty filepaths are ignored.
|
||||
func (c *Config) CheckFilePaths() error {
|
||||
v := reflect.ValueOf(c).Elem()
|
||||
|
||||
// Iterate through the fields of the struct
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
field := v.Type().Field(i)
|
||||
fieldValue := v.Field(i)
|
||||
|
||||
if fieldValue.Kind() != reflect.String {
|
||||
continue
|
||||
}
|
||||
|
||||
if tagValue, ok := field.Tag.Lookup("filepath"); ok && tagValue == "true" {
|
||||
filePath := fieldValue.String()
|
||||
if filePath == "" {
|
||||
continue
|
||||
}
|
||||
if !fileExists(filePath) {
|
||||
return fmt.Errorf("%s does not exist", filePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// CheckDirPaths checks that all directory paths in the config exist and are directories.
|
||||
// Empty directory paths are ignored.
|
||||
func (c *Config) CheckDirPaths() error {
|
||||
v := reflect.ValueOf(c).Elem()
|
||||
|
||||
// Iterate through the fields of the struct
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
field := v.Type().Field(i)
|
||||
fieldValue := v.Field(i)
|
||||
|
||||
if fieldValue.Kind() != reflect.String {
|
||||
continue
|
||||
}
|
||||
|
||||
if tagValue, ok := field.Tag.Lookup("dirpath"); ok && tagValue == "true" {
|
||||
dirPath := fieldValue.String()
|
||||
if dirPath == "" {
|
||||
continue
|
||||
}
|
||||
if !fileExists(dirPath) {
|
||||
return fmt.Errorf("%s does not exist", dirPath)
|
||||
}
|
||||
if !isDir(dirPath) {
|
||||
return fmt.Errorf("%s is not a directory", dirPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// BuildInfo is build information for display at command line.
|
||||
type BuildInfo struct {
|
||||
Version string
|
||||
@@ -601,24 +160,6 @@ func errorExit(code int, msg string) {
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
// bothUnsetSet returns true if both a and b are unset, or both are set.
|
||||
func bothUnsetSet(a, b string) bool {
|
||||
return (a == "" && b == "") || (a != "" && b != "")
|
||||
}
|
||||
|
||||
func fileExists(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func isDir(path string) bool {
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return fi.IsDir()
|
||||
}
|
||||
|
||||
func mustParseDuration(d string) time.Duration {
|
||||
td, err := time.ParseDuration(d)
|
||||
if err != nil {
|
||||
|
||||
@@ -3,11 +3,11 @@ package goose_store
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"isp-config-service/repository"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/pressly/goose/v3/database"
|
||||
"isp-config-service/repository"
|
||||
)
|
||||
|
||||
type Store struct {
|
||||
@@ -30,24 +30,27 @@ func (s Store) Tablename() string {
|
||||
|
||||
func (s Store) CreateVersionTable(ctx context.Context, db database.DBTxConn) error {
|
||||
q := s.querier.CreateTable(s.tablename)
|
||||
if _, err := s.db.ExecContext(ctx, q); err != nil {
|
||||
return fmt.Errorf("failed to create version table %q: %w", s.tablename, err)
|
||||
_, err := s.db.ExecContext(ctx, q)
|
||||
if err != nil {
|
||||
return errors.WithMessagef(err, "failed to create version table %q", s.tablename)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s Store) Insert(ctx context.Context, db database.DBTxConn, req database.InsertRequest) error {
|
||||
q := s.querier.InsertVersion(s.tablename)
|
||||
if _, err := s.db.ExecContext(ctx, q, req.Version, true); err != nil {
|
||||
return fmt.Errorf("failed to insert version %d: %w", req.Version, err)
|
||||
_, err := s.db.ExecContext(ctx, q, req.Version, true)
|
||||
if err != nil {
|
||||
return errors.WithMessagef(err, "failed to insert version %d", req.Version)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s Store) Delete(ctx context.Context, db database.DBTxConn, version int64) error {
|
||||
q := s.querier.DeleteVersion(s.tablename)
|
||||
if _, err := s.db.ExecContext(ctx, q, version); err != nil {
|
||||
return fmt.Errorf("failed to delete version %d: %w", version, err)
|
||||
_, err := s.db.ExecContext(ctx, q, version)
|
||||
if err != nil {
|
||||
return errors.WithMessagef(err, "failed to delete version %d", version)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -59,10 +62,10 @@ func (s Store) GetMigration(ctx context.Context, db database.DBTxConn, version i
|
||||
isApplied := float64(0)
|
||||
err := s.db.QueryRowContext(ctx, q, version).Scan(&result.Timestamp, &isApplied)
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, fmt.Errorf("%w: %d", database.ErrVersionNotFound, version)
|
||||
return nil, errors.WithMessagef(database.ErrVersionNotFound, "%d", version)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get migration %d: %w", version, err)
|
||||
return nil, errors.WithMessagef(err, "failed to get migration %d", version)
|
||||
}
|
||||
result.IsApplied = isApplied == 0
|
||||
return &result, nil
|
||||
@@ -76,7 +79,7 @@ func (s Store) ListMigrations(ctx context.Context, db database.DBTxConn) ([]*dat
|
||||
q := s.querier.ListMigrations(s.tablename)
|
||||
rows, err := s.db.QueryContext(ctx, q)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to list migrations: %w", err)
|
||||
return nil, errors.WithMessage(err, "failed to list migrations")
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
@@ -85,14 +88,16 @@ func (s Store) ListMigrations(ctx context.Context, db database.DBTxConn) ([]*dat
|
||||
var result database.ListMigrationsResult
|
||||
isApplied := float64(0)
|
||||
version := float64(0)
|
||||
if err := rows.Scan(&version, &isApplied); err != nil {
|
||||
return nil, fmt.Errorf("failed to scan list migrations result: %w", err)
|
||||
err = rows.Scan(&version, &isApplied)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "failed to scan list migrations result")
|
||||
}
|
||||
result.IsApplied = isApplied == 0
|
||||
result.Version = int64(version)
|
||||
migrations = append(migrations, &result)
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
err = rows.Err()
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "fetch rows")
|
||||
}
|
||||
return migrations, nil
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// nolint
|
||||
package rarchive
|
||||
|
||||
import (
|
||||
"compress/gzip"
|
||||
"os"
|
||||
)
|
||||
|
||||
// IsTarGzipFile checks if the file at the given path is a gzipped tarball
|
||||
// by attempting to open it as such.
|
||||
func IsTarGzipFile(path string) bool {
|
||||
f, err := os.Open(path)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
// Attempt to create a gzip reader
|
||||
gzr, err := gzip.NewReader(f)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer gzr.Close()
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// nolint
|
||||
package rarchive
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
)
|
||||
|
||||
// IsZipFile checks if the file at the given path is a ZIP file
|
||||
// by verifying the magic number (the first few bytes of the file).
|
||||
func IsZipFile(path string) bool {
|
||||
f, err := os.Open(path)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
// Read the first 4 bytes of the file to check the magic number
|
||||
buf := make([]byte, 4)
|
||||
_, err = f.Read(buf)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
// ZIP files start with "PK\x03\x04"
|
||||
return bytes.Equal(buf, []byte("PK\x03\x04"))
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// rtls is for creating TLS configurations for use by servers and clients.
|
||||
// nolint
|
||||
package rtls
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"os"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// MTLSState indicates whether mutual TLS is enabled or disabled.
|
||||
type MTLSState tls.ClientAuthType
|
||||
|
||||
// CreateClientConfig creates a new tls.Config for use by a client. The certFile and keyFile
|
||||
// parameters are the paths to the client's certificate and key files, which will be used to
|
||||
// authenticate the client to the server if mutual TLS is active. The caCertFile parameter
|
||||
// is the path to the CA certificate file, which the client will use to verify any certificate
|
||||
// presented by the server. serverName can also be set, informing the client which hostname
|
||||
// should appear in the returned certificate. If noverify is true, the client will not verify
|
||||
// the server's certificate.
|
||||
func CreateClientConfig(certFile, keyFile, caCertFile, serverName string, noverify bool) (*tls.Config, error) {
|
||||
var err error
|
||||
|
||||
config := createBaseTLSConfig(serverName, noverify)
|
||||
if certFile != "" && keyFile != "" {
|
||||
config.Certificates = make([]tls.Certificate, 1)
|
||||
config.Certificates[0], err = tls.LoadX509KeyPair(certFile, keyFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if caCertFile != "" {
|
||||
if err := setCertPool(caCertFile, &config.RootCAs); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
||||
func createBaseTLSConfig(serverName string, noverify bool) *tls.Config {
|
||||
return &tls.Config{
|
||||
ServerName: serverName,
|
||||
InsecureSkipVerify: noverify,
|
||||
NextProtos: []string{"h2", "http/1.1"},
|
||||
MinVersion: uint16(tls.VersionTLS12),
|
||||
}
|
||||
}
|
||||
|
||||
// setCertPool sets the CA certificate pool for the given file. It reads the file and
|
||||
// appends the certificates to the pool. If the file cannot be read or the certificates
|
||||
// cannot be appended, it returns an error.
|
||||
func setCertPool(caCertFile string, pool **x509.CertPool) error {
|
||||
asn1Data, err := os.ReadFile(caCertFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*pool = x509.NewCertPool()
|
||||
ok := (*pool).AppendCertsFromPEM(asn1Data)
|
||||
if !ok {
|
||||
return errors.Errorf("failed to load CA certificate(s) for verification in %q", caCertFile)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
// nolint
|
||||
package rtls
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"log"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// CertReloader is a simple TLS certificate reloader. It loads the certificate
|
||||
// and key files from the specified paths and reloads them if they have been
|
||||
// modified since the last load.
|
||||
type CertReloader struct {
|
||||
certPath, keyPath string
|
||||
modTime time.Time
|
||||
logger *log.Logger
|
||||
|
||||
mu sync.RWMutex
|
||||
cert *tls.Certificate
|
||||
}
|
||||
|
||||
// GetCertificate returns the current certificate. It reloads the certificate
|
||||
// if it has been modified since the last load. GetCertificate is thread-safe
|
||||
// and if the cert has not changed this function will execute concurrently with
|
||||
// other GetCertificate calls.
|
||||
func (cr *CertReloader) GetCertificate() (*tls.Certificate, error) {
|
||||
cr.mu.RLock()
|
||||
latestTime, err := latestModTime(cr.certPath, cr.keyPath)
|
||||
if err != nil || !latestTime.After(cr.modTime) {
|
||||
defer cr.mu.RUnlock()
|
||||
if err != nil {
|
||||
cr.logger.Printf("failed to get latest modification time (%s), returning prior cert", err)
|
||||
}
|
||||
return cr.cert, nil
|
||||
}
|
||||
|
||||
// The certificate or key file has changed, we need to reload. First we release
|
||||
// the read lock, then we acquire a write lock to reload the certificate.
|
||||
cr.mu.RUnlock()
|
||||
cr.mu.Lock()
|
||||
defer cr.mu.Unlock()
|
||||
|
||||
// Now that we have the write lock, we check again if the certificate has actually
|
||||
// been updated by another concurrent call to this function.
|
||||
latestTime, err = latestModTime(cr.certPath, cr.keyPath)
|
||||
if err != nil || !latestTime.After(cr.modTime) {
|
||||
if err != nil {
|
||||
cr.logger.Printf("failed to get latest modification time (%s), returning prior cert", err)
|
||||
}
|
||||
return cr.cert, nil
|
||||
}
|
||||
|
||||
pair, err := loadKeyPair(cr.certPath, cr.keyPath)
|
||||
if err != nil {
|
||||
cr.logger.Printf("failed to reload certificate (%s), returning prior cert", err)
|
||||
return cr.cert, nil
|
||||
}
|
||||
cr.logger.Printf("reloading certificate at %s and key at %s", cr.certPath, cr.keyPath)
|
||||
cr.cert = &pair
|
||||
cr.modTime = latestTime
|
||||
return cr.cert, nil
|
||||
}
|
||||
|
||||
// loadKeyPair loads a TLS certificate and key pair from the given files.
|
||||
// It simply wraps tls.LoadX509KeyPair, ensuring that the rest of the code
|
||||
// uses the same function to load the key pair.
|
||||
func loadKeyPair(certFile, keyFile string) (tls.Certificate, error) {
|
||||
return tls.LoadX509KeyPair(certFile, keyFile)
|
||||
}
|
||||
|
||||
// latestModTime returns the latest modification time of the given files.
|
||||
// It returns os.ErrNotExist if no files are provided.
|
||||
func latestModTime(file ...string) (time.Time, error) {
|
||||
if len(file) == 0 {
|
||||
return time.Time{}, os.ErrNotExist
|
||||
}
|
||||
var latest time.Time
|
||||
for _, f := range file {
|
||||
info, err := os.Stat(f)
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
}
|
||||
if info.ModTime().After(latest) {
|
||||
latest = info.ModTime()
|
||||
}
|
||||
}
|
||||
return latest, nil
|
||||
}
|
||||
+49
-17
@@ -16,21 +16,22 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"isp-config-service/service/rqlite/internal/rarchive"
|
||||
"isp-config-service/service/rqlite/internal/rtls"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rqlite/rqlite-disco-clients/dns"
|
||||
"github.com/rqlite/rqlite-disco-clients/dnssrv"
|
||||
"github.com/rqlite/rqlite/v9/auth"
|
||||
"github.com/rqlite/rqlite/v9/auto/backup"
|
||||
"github.com/rqlite/rqlite/v9/cluster"
|
||||
"github.com/rqlite/rqlite/v9/cmd"
|
||||
"github.com/rqlite/rqlite/v9/db"
|
||||
"github.com/rqlite/rqlite/v9/db/extensions"
|
||||
httpd "github.com/rqlite/rqlite/v9/http"
|
||||
"github.com/rqlite/rqlite/v9/store"
|
||||
"github.com/rqlite/rqlite/v9/tcp"
|
||||
"github.com/txix-open/isp-kit/config"
|
||||
|
||||
"github.com/rqlite/rqlite/v8/auth"
|
||||
"github.com/rqlite/rqlite/v8/cluster"
|
||||
"github.com/rqlite/rqlite/v8/cmd"
|
||||
"github.com/rqlite/rqlite/v8/db"
|
||||
"github.com/rqlite/rqlite/v8/extensions"
|
||||
httpd "github.com/rqlite/rqlite/v8/http"
|
||||
"github.com/rqlite/rqlite/v8/rarchive"
|
||||
"github.com/rqlite/rqlite/v8/rtls"
|
||||
"github.com/rqlite/rqlite/v8/store"
|
||||
"github.com/rqlite/rqlite/v8/tcp"
|
||||
)
|
||||
|
||||
const name = `rqlite`
|
||||
@@ -47,6 +48,7 @@ func init() {
|
||||
|
||||
type localConfig struct {
|
||||
Rqlite *Config
|
||||
Backup Backup
|
||||
}
|
||||
|
||||
func main(ctx context.Context, r *Rqlite) error {
|
||||
@@ -121,7 +123,7 @@ func main(ctx context.Context, r *Rqlite) error {
|
||||
log.Fatalf("failed to create store: %s", err.Error())
|
||||
}
|
||||
|
||||
r.store = str
|
||||
r.storePtr.Store(str)
|
||||
|
||||
credStr, err := credentialsStore(r.credentials)
|
||||
if err != nil {
|
||||
@@ -186,6 +188,15 @@ func main(ctx context.Context, r *Rqlite) error {
|
||||
h, p, _ := net.SplitHostPort(cfg.HTTPAdv)
|
||||
log.Printf("connect using the command-line tool via 'rqlite -H %s -p %s'", h, p)
|
||||
|
||||
// Start any requested auto-backups
|
||||
backupSrv, err := startAutoBackups(mainCtx, &localCfg.Backup, str)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to start auto-backups: %s", err.Error())
|
||||
}
|
||||
if backupSrv != nil {
|
||||
httpServ.RegisterStatus("auto_backups", backupSrv)
|
||||
}
|
||||
|
||||
// Block until done.
|
||||
<-mainCtx.Done()
|
||||
|
||||
@@ -210,7 +221,7 @@ func main(ctx context.Context, r *Rqlite) error {
|
||||
log.Printf("stepping down as Leader before shutdown")
|
||||
}
|
||||
// Perform a stepdown, ignore any errors.
|
||||
str.Stepdown(true)
|
||||
str.Stepdown(true, "")
|
||||
}
|
||||
muxLn.Close()
|
||||
|
||||
@@ -222,6 +233,27 @@ func main(ctx context.Context, r *Rqlite) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func startAutoBackups(ctx context.Context, backupCfg *Backup, str *store.Store) (*backup.Uploader, error) {
|
||||
if !backupCfg.Enable {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
backupCfg.SetParams()
|
||||
b, err := json.Marshal(backupCfg)
|
||||
if err != nil {
|
||||
return nil, errors.Errorf("failed to marshal auto-backup settings: %s", err.Error())
|
||||
}
|
||||
|
||||
uCfg, sc, err := backup.NewStorageClient(b)
|
||||
if err != nil {
|
||||
return nil, errors.Errorf("failed to parse auto-backup file: %s", err.Error())
|
||||
}
|
||||
provider := store.NewProvider(str, uCfg.Vacuum, !uCfg.NoCompress)
|
||||
u := backup.NewUploader(sc, provider, time.Duration(uCfg.Interval))
|
||||
u.Start(ctx, str.IsLeader)
|
||||
return u, nil
|
||||
}
|
||||
|
||||
func evaluateAdvAddresses(cfg *config.Config) error {
|
||||
httpAdv := cfg.Optional().String("rqlite.HTTPAdv", "")
|
||||
shouldEvalHttp := strings.Contains(httpAdv, "$HOSTNAME")
|
||||
@@ -290,11 +322,11 @@ func createStore(cfg *Config, ln *tcp.Layer, extensions []string) (*store.Store,
|
||||
dbConf.FKConstraints = cfg.FKConstraints
|
||||
dbConf.Extensions = extensions
|
||||
|
||||
str := store.New(ln, &store.Config{
|
||||
str := store.New(&store.Config{
|
||||
DBConf: dbConf,
|
||||
Dir: cfg.DataPath,
|
||||
ID: cfg.NodeID,
|
||||
})
|
||||
}, ln)
|
||||
|
||||
// Set optional parameters on store.
|
||||
str.RaftLogLevel = cfg.RaftLogLevel
|
||||
@@ -363,12 +395,12 @@ func startNodeMux(cfg *Config, ln net.Listener) (*tcp.Mux, error) {
|
||||
}
|
||||
if cfg.NodeVerifyClient {
|
||||
b.WriteString(", mutual TLS enabled")
|
||||
mux, err = tcp.NewMutualTLSMux(ln, adv, cfg.NodeX509Cert, cfg.NodeX509Key, cfg.NodeX509CACert)
|
||||
} else {
|
||||
b.WriteString(", mutual TLS disabled")
|
||||
mux, err = tcp.NewTLSMux(ln, adv, cfg.NodeX509Cert, cfg.NodeX509Key)
|
||||
}
|
||||
log.Println(b.String())
|
||||
mux, err = tcp.NewTLSMux(ln, adv, cfg.NodeX509Cert, cfg.NodeX509Key, cfg.NodeX509CACert,
|
||||
cfg.NoNodeVerify, cfg.NodeVerifyClient)
|
||||
} else {
|
||||
mux, err = tcp.NewMux(ln, adv)
|
||||
}
|
||||
|
||||
@@ -4,14 +4,15 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/rqlite/rqlite/v8/auth"
|
||||
"github.com/rqlite/rqlite/v9/auth"
|
||||
"github.com/txix-open/isp-kit/http/httpcli"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
_ "github.com/rqlite/gorqlite/stdlib"
|
||||
"github.com/rqlite/rqlite/v8/store"
|
||||
"github.com/rqlite/rqlite/v9/store"
|
||||
"github.com/txix-open/isp-kit/config"
|
||||
)
|
||||
|
||||
@@ -25,7 +26,7 @@ type Rqlite struct {
|
||||
credentials []auth.Credential
|
||||
|
||||
localHttpAddr string
|
||||
store *store.Store
|
||||
storePtr *atomic.Pointer[store.Store]
|
||||
closed chan struct{}
|
||||
cancel context.CancelFunc
|
||||
}
|
||||
@@ -40,6 +41,7 @@ func New(
|
||||
internalClientCredential: internalClientCredential,
|
||||
credentials: credentials,
|
||||
closed: make(chan struct{}),
|
||||
storePtr: &atomic.Pointer[store.Store]{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,10 +53,10 @@ func (r *Rqlite) Run(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (r *Rqlite) WaitForLeader(timeout time.Duration) error {
|
||||
if r.store == nil {
|
||||
if r.storePtr.Load() == nil {
|
||||
return ErrNotRun
|
||||
}
|
||||
_, err := r.store.WaitForLeader(timeout)
|
||||
_, err := r.storePtr.Load().WaitForLeader(timeout)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "wait for leader in rqlite store")
|
||||
}
|
||||
@@ -62,14 +64,14 @@ func (r *Rqlite) WaitForLeader(timeout time.Duration) error {
|
||||
}
|
||||
|
||||
func (r *Rqlite) IsLeader() bool {
|
||||
if r.store == nil {
|
||||
if r.storePtr.Load() == nil {
|
||||
return false
|
||||
}
|
||||
return r.store.IsLeader()
|
||||
return r.storePtr.Load().IsLeader()
|
||||
}
|
||||
|
||||
func (r *Rqlite) SqlDB() (*sql.DB, error) {
|
||||
if r.store == nil {
|
||||
if r.storePtr.Load() == nil {
|
||||
return nil, ErrNotRun
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,13 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"isp-config-service/assembly"
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/middlewares"
|
||||
"isp-config-service/service/rqlite"
|
||||
"isp-config-service/service/rqlite/db"
|
||||
"isp-config-service/service/rqlite/goose_store"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/pressly/goose/v3"
|
||||
"github.com/txix-open/isp-kit/app"
|
||||
@@ -17,16 +24,11 @@ import (
|
||||
"github.com/txix-open/isp-kit/http/httpclix"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"github.com/txix-open/isp-kit/observability/sentry"
|
||||
"isp-config-service/assembly"
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/middlewares"
|
||||
"isp-config-service/service/rqlite"
|
||||
"isp-config-service/service/rqlite/db"
|
||||
"isp-config-service/service/rqlite/goose_store"
|
||||
)
|
||||
|
||||
const (
|
||||
waitForLeaderTimeout = 30 * time.Second
|
||||
waitForLeaderTimeout = 180 * time.Second
|
||||
waitingLogsTimeout = 30 * time.Second
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
@@ -35,7 +37,7 @@ type Service struct {
|
||||
rqlite *rqlite.Rqlite
|
||||
grpcSrv *grpc.Server
|
||||
httpSrv *http.Server
|
||||
clusterCli *cluster.Client
|
||||
clusterCli bootstrap.ClusterClient
|
||||
logger log.Logger
|
||||
|
||||
// initialized in Run
|
||||
@@ -97,8 +99,11 @@ func (s *Service) Run(ctx context.Context) error {
|
||||
}()
|
||||
time.Sleep(1 * time.Second) // optimistically wait for store initialization
|
||||
|
||||
s.logger.Debug(ctx, fmt.Sprintf("waiting for cluster startup for %s...", waitForLeaderTimeout))
|
||||
waitingCtx, waitingDone := context.WithCancel(ctx)
|
||||
go s.writeWaitingLogs(waitingCtx)
|
||||
|
||||
err := s.rqlite.WaitForLeader(waitForLeaderTimeout)
|
||||
waitingDone()
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "wait for leader")
|
||||
}
|
||||
@@ -138,6 +143,10 @@ func (s *Service) Run(ctx context.Context) error {
|
||||
s.locatorConfig.CleanEventWorker.Run(ctx)
|
||||
s.locatorConfig.CleanPhantomBackendWorker.Run(ctx)
|
||||
|
||||
if cfg.Local.Backup.Enable {
|
||||
s.locatorConfig.CleanBackupsWorker.Run(ctx)
|
||||
}
|
||||
|
||||
go func() {
|
||||
s.logger.Debug(ctx, fmt.Sprintf("starting grpc server on %s", s.boot.BindingAddress))
|
||||
err := s.grpcSrv.ListenAndServe(s.boot.BindingAddress)
|
||||
@@ -225,3 +234,19 @@ func internalClientCredentials(cfg conf.Local) (*httpcli.BasicAuth, error) {
|
||||
}
|
||||
return nil, errors.Errorf("internal client credential '%s' not found", cfg.InternalClientCredential)
|
||||
}
|
||||
|
||||
func (s *Service) writeWaitingLogs(ctx context.Context) {
|
||||
s.logger.Debug(ctx, fmt.Sprintf("waiting for cluster startup for %s...", waitForLeaderTimeout))
|
||||
|
||||
t := time.NewTicker(waitingLogsTimeout)
|
||||
defer t.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case <-t.C:
|
||||
s.logger.Debug(ctx, fmt.Sprintf("continue waiting for cluster startup for %s...", waitForLeaderTimeout))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,6 +209,7 @@ func (s Service) notifyRoutingChanged(ctx context.Context, event string, conns [
|
||||
ModuleName: backend.ModuleName,
|
||||
Version: backend.Version,
|
||||
LibVersion: backend.LibVersion,
|
||||
Transport: backend.Transport,
|
||||
Endpoints: backend.Endpoints.Value,
|
||||
RequiredModules: backend.RequiredModules.Value,
|
||||
Address: addr,
|
||||
|
||||
@@ -2,13 +2,14 @@ package variable
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/entity"
|
||||
"isp-config-service/entity/xtypes"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Repo interface {
|
||||
@@ -91,8 +92,7 @@ func (s Service) GetByName(ctx context.Context, name string) (*domain.Variable,
|
||||
return nil, errors.WithMessage(err, "get meta by variables")
|
||||
}
|
||||
|
||||
result := s.toDto(*variable, metaByVariables)
|
||||
return &result, nil
|
||||
return new(s.toDto(*variable, metaByVariables)), nil
|
||||
}
|
||||
|
||||
func (s Service) Create(ctx context.Context, req domain.CreateVariableRequest) error {
|
||||
@@ -255,10 +255,6 @@ func (s Service) ExtractVariables(ctx context.Context, configId string, input []
|
||||
}
|
||||
|
||||
func (s Service) SaveVariableLinks(ctx context.Context, configId string, links []entity.ConfigHasVariable) error {
|
||||
if len(links) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
err := s.repo.UpsertLinks(ctx, configId, links)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "upsert links")
|
||||
|
||||
@@ -9,6 +9,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/service/startup"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/txix-open/isp-kit/bootstrap"
|
||||
"github.com/txix-open/isp-kit/cluster"
|
||||
@@ -16,9 +20,6 @@ import (
|
||||
"github.com/txix-open/isp-kit/json"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"github.com/txix-open/isp-kit/rc/schema"
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/service/startup"
|
||||
)
|
||||
|
||||
//nolint:funlen,paralleltest
|
||||
@@ -158,7 +159,7 @@ func newClusterClientWith(
|
||||
Version: "1.0.0",
|
||||
Schema: schemaData,
|
||||
Config: defaultRemoteConfig,
|
||||
}, []string{"127.0.0.1:9001"}, logger)
|
||||
}, []string{"127.0.0.1:9001"}, 5*time.Second, logger)
|
||||
t.Cleanup(func() {
|
||||
_ = cli.Close()
|
||||
})
|
||||
@@ -171,10 +172,11 @@ func setupTest(t *testing.T) log.Logger {
|
||||
|
||||
t.Setenv("APP_CONFIG_PATH", "../conf/config.yml")
|
||||
t.Setenv("DefaultRemoteConfigPath", "../conf/default_remote_config.json")
|
||||
boot := bootstrap.New("1.0.0", conf.Remote{}, nil)
|
||||
boot := bootstrap.New("1.0.0", conf.Remote{}, nil, cluster.GrpcTransport)
|
||||
boot.MigrationsDir = "../migrations"
|
||||
dataPath := dataDir(t)
|
||||
boot.App.Config().Set("rqlite.DataPath", dataPath)
|
||||
boot.App.Config().Set("backup.Enable", false)
|
||||
logger := boot.App.Logger()
|
||||
|
||||
startup, err := startup.New(boot)
|
||||
|
||||
@@ -6,15 +6,16 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/service/startup"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/txix-open/isp-kit/bootstrap"
|
||||
"github.com/txix-open/isp-kit/cluster"
|
||||
"github.com/txix-open/isp-kit/http/httpclix"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"github.com/txix-open/isp-kit/test/fake"
|
||||
"isp-config-service/conf"
|
||||
"isp-config-service/domain"
|
||||
"isp-config-service/service/startup"
|
||||
)
|
||||
|
||||
// nolint:paralleltest
|
||||
@@ -91,10 +92,11 @@ func setupTestWithAppRun(t *testing.T) (*require.Assertions, log.Logger) {
|
||||
|
||||
t.Setenv("APP_CONFIG_PATH", "../conf/config.yml")
|
||||
t.Setenv("DefaultRemoteConfigPath", "../conf/default_remote_config.json")
|
||||
boot := bootstrap.New("1.0.0", conf.Remote{}, nil)
|
||||
boot := bootstrap.New("1.0.0", conf.Remote{}, nil, cluster.GrpcTransport)
|
||||
boot.MigrationsDir = "../migrations"
|
||||
dataPath := dataDir(t)
|
||||
boot.App.Config().Set("rqlite.DataPath", dataPath)
|
||||
boot.App.Config().Set("backup.Enable", false)
|
||||
logger := boot.App.Logger()
|
||||
|
||||
startup, err := startup.New(boot)
|
||||
|
||||
@@ -73,7 +73,7 @@ func TestVariableAcceptance(t *testing.T) {
|
||||
logger,
|
||||
)
|
||||
go func() {
|
||||
handler := cluster.NewEventHandler().RemoteConfigReceiverWithTimeout(eventHandler, 5*time.Second)
|
||||
handler := cluster.NewEventHandler().RemoteConfigReceiver(eventHandler)
|
||||
err := clientA1.Run(t.Context(), handler)
|
||||
require.NoError(err) //nolint:testifylint
|
||||
}()
|
||||
|
||||
Reference in new issue
Block a user