MSP-7470 Init user auth

This commit is contained in:
Синельник Тимур Романович committed 2026-04-01 10:05:20 +03:00
1 parent b67eb8137c
commit eb6326c343
35 files changed
+1059 -142

No files matched your search

+8
View File
@@ -16,6 +16,10 @@ import (
"github.com/txix-open/isp-kit/log"
)
const (
routerModuleName = "isp-router-service"
)
type Assembly struct {
boot *bootstrap.Bootstrap
server *http.Server
@@ -24,6 +28,7 @@ type Assembly struct {
systemCli *client.Client
adminCli *client.Client
lockerCli *client.Client
routerLb *lb.RoundRobin
locations []conf.Location
grpcClientByModuleName map[string]*client.Client
@@ -81,6 +86,7 @@ func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
systemCli: systemCli,
adminCli: adminCli,
lockerCli: lockerCli,
routerLb: lb.NewRoundRobin(nil),
}, nil
}
@@ -103,6 +109,7 @@ func (a *Assembly) ReceiveConfig(ctx context.Context, remoteConfig []byte) error
a.systemCli,
a.adminCli,
a.lockerCli,
a.routerLb,
)
handler, err := locator.Handler(newCfg, a.locations)
if err != nil {
@@ -128,6 +135,7 @@ func (a *Assembly) Runners() []app.Runner {
eventHandler.RequireModule("isp-system-service", a.systemCli)
eventHandler.RequireModule("msp-admin-service", a.adminCli)
eventHandler.RequireModule("isp-lock-service", a.lockerCli)
eventHandler.RequireModule(routerModuleName, a.routerLb)
return []app.Runner{
app.RunnerFunc(func(ctx context.Context) error {