Compare commits
18 Commits
f5cbede966
...
release/v0
| Author | SHA1 | Date | |
|---|---|---|---|
| ec4c3c0413 | |||
| 456f1970eb | |||
| b1dfb88f71 | |||
| a7266f4bfa | |||
| 2ea538995a | |||
| 174cd09ba6 | |||
| 62ebfa17ea | |||
| 8de7ab4a67 | |||
| 3b36244282 | |||
| c0f6cd90c6 | |||
| 5aeff7c786 | |||
| 73d3361f34 | |||
| ba16c2cce3 | |||
| b76595d164 | |||
| 53cda1ce5e | |||
| 6d5c7e81e9 | |||
| ed80af6ae2 | |||
| 692f65b80f |
50
app/app.go
50
app/app.go
@@ -2,33 +2,36 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/mmorpg/service-gateway/config"
|
||||||
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
|
"git.hlsq.asia/mmorpg/service-gateway/internal/grpc_server"
|
||||||
"github.com/judwhite/go-svc"
|
"github.com/judwhite/go-svc"
|
||||||
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Program struct {
|
type Program struct {
|
||||||
moduleList []Module // 模块列表
|
moduleList []module.Module // 模块列表
|
||||||
}
|
|
||||||
|
|
||||||
type Module interface {
|
|
||||||
init() error
|
|
||||||
start() error
|
|
||||||
stop() error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Program) Init(_ svc.Environment) error {
|
func (p *Program) Init(_ svc.Environment) error {
|
||||||
p.moduleList = append(p.moduleList, &ModuleBase{})
|
if err := config.LoadConfig(); err != nil {
|
||||||
p.moduleList = append(p.moduleList, &ModuleDB{})
|
return err
|
||||||
p.moduleList = append(p.moduleList, &ModulePrometheus{})
|
}
|
||||||
|
p.moduleList = append(p.moduleList, &module.Base{Log: config.Get().Log})
|
||||||
|
p.moduleList = append(p.moduleList, &module.DB{Cfg: config.Get().DB, AppName: config.Get().App.Name})
|
||||||
p.moduleList = append(p.moduleList, &ModuleWebServer{})
|
p.moduleList = append(p.moduleList, &ModuleWebServer{})
|
||||||
p.moduleList = append(p.moduleList, &ModuleWebsocketServer{})
|
p.moduleList = append(p.moduleList, &ModuleWebsocketServer{})
|
||||||
p.moduleList = append(p.moduleList, &ModuleGrpcServer{})
|
|
||||||
p.moduleList = append(p.moduleList, &ModuleLoginQueue{})
|
p.moduleList = append(p.moduleList, &ModuleLoginQueue{})
|
||||||
|
p.moduleList = append(p.moduleList, &module.Grpc{Server: grpc_server.NewServer(config.Get().Serve.Grpc)})
|
||||||
|
p.moduleList = append(p.moduleList, &module.Prometheus{MetricCfg: config.Get().Metric})
|
||||||
|
p.moduleList = append(p.moduleList, &module.Tracer{MetricCfg: config.Get().Metric, ServiceName: common.KeyDiscoverServiceNameGateway})
|
||||||
|
p.moduleList = append(p.moduleList, &module.Discover{})
|
||||||
|
|
||||||
for _, module := range p.moduleList {
|
for _, m := range p.moduleList {
|
||||||
if err := module.init(); err != nil {
|
if err := m.Init(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,22 +40,29 @@ func (p *Program) Init(_ svc.Environment) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Program) Start() error {
|
func (p *Program) Start() error {
|
||||||
for _, module := range p.moduleList {
|
ready := &sync.WaitGroup{}
|
||||||
if err := module.start(); err != nil {
|
ready.Add(len(p.moduleList))
|
||||||
|
for _, m := range p.moduleList {
|
||||||
|
if err := m.Start(ready); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
discover.Listen()
|
ready.Wait()
|
||||||
|
for _, m := range p.moduleList {
|
||||||
|
if err := m.AfterStart(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
global.ServiceStatus = global.ServiceStatusReady
|
||||||
|
|
||||||
log.Infof(fmt.Sprintf("%v Start successful...", config.Get().App.Name))
|
log.Infof(fmt.Sprintf("%v Start successful...", config.Get().App.Name))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Program) Stop() error {
|
func (p *Program) Stop() error {
|
||||||
discover.Close()
|
|
||||||
for i := len(p.moduleList) - 1; i >= 0; i-- {
|
for i := len(p.moduleList) - 1; i >= 0; i-- {
|
||||||
module := p.moduleList[i]
|
m := p.moduleList[i]
|
||||||
if err := module.stop(); err != nil {
|
if err := m.Stop(); err != nil {
|
||||||
log.Errorf("module stop error: %v", err)
|
log.Errorf("module stop error: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
33
app/base.go
33
app/base.go
@@ -1,33 +0,0 @@
|
|||||||
package app
|
|
||||||
|
|
||||||
import (
|
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
|
||||||
"math/rand"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ModuleBase 基础模块,或者一些零散的模块
|
|
||||||
type ModuleBase struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *ModuleBase) init() error {
|
|
||||||
// 配置
|
|
||||||
if err := config.LoadConfig(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
cfg := config.Get()
|
|
||||||
// 日志
|
|
||||||
log.Init(cfg.Log.Debug, cfg.Log.MaxSize, cfg.Log.MaxBackups, cfg.Log.MaxAge, cfg.Log.Level)
|
|
||||||
// 雪花
|
|
||||||
utils.InitSnowflake(int64(rand.Intn(1000)))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *ModuleBase) start() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *ModuleBase) stop() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
23
app/db.go
23
app/db.go
@@ -1,23 +0,0 @@
|
|||||||
package app
|
|
||||||
|
|
||||||
import (
|
|
||||||
"git.hlsq.asia/mmorpg/service-common/db"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ModuleDB 数据库模块
|
|
||||||
type ModuleDB struct {
|
|
||||||
dbModule *db.ModuleDB
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *ModuleDB) init() error {
|
|
||||||
return p.dbModule.Init(config.Get().DB)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *ModuleDB) start() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *ModuleDB) stop() error {
|
|
||||||
return p.dbModule.Stop()
|
|
||||||
}
|
|
||||||
27
app/grpc.go
27
app/grpc.go
@@ -1,27 +0,0 @@
|
|||||||
package app
|
|
||||||
|
|
||||||
import (
|
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/grpc_server"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ModuleGrpcServer Grpc服务模块
|
|
||||||
type ModuleGrpcServer struct {
|
|
||||||
server service.IService
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *ModuleGrpcServer) init() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *ModuleGrpcServer) start() error {
|
|
||||||
m.server = grpc_server.NewServer(config.Get().Serve.Grpc.TTL)
|
|
||||||
m.server.Init(config.Get().Serve.Grpc.Address, config.Get().Serve.Grpc.Port)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *ModuleGrpcServer) stop() error {
|
|
||||||
m.server.Close()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,29 +1,33 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/login"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/login"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModuleLoginQueue 登录队列模块
|
// ModuleLoginQueue 登录队列模块
|
||||||
type ModuleLoginQueue struct {
|
type ModuleLoginQueue struct {
|
||||||
|
module.DefaultModule
|
||||||
login *login.Login
|
login *login.Login
|
||||||
queueUp *login.QueueUp
|
queueUp *login.QueueUp
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleLoginQueue) init() error {
|
func (m *ModuleLoginQueue) Init() error {
|
||||||
m.login = login.NewLoginQueue(global.MaxQueueUpSize)
|
m.login = login.NewLoginQueue(global.MaxQueueUpSize)
|
||||||
m.queueUp = login.NewQueueUp(global.MaxQueueUpSize)
|
m.queueUp = login.NewQueueUp(global.MaxQueueUpSize)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleLoginQueue) start() error {
|
func (m *ModuleLoginQueue) Start(ready *sync.WaitGroup) error {
|
||||||
m.login.Start(runtime.NumCPU())
|
m.login.Start(runtime.NumCPU())
|
||||||
|
ready.Done()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleLoginQueue) stop() error {
|
func (m *ModuleLoginQueue) Stop() error {
|
||||||
m.login.Stop()
|
m.login.Stop()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
package app
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
||||||
"net/http"
|
|
||||||
"sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ModulePrometheus 普罗米修斯模块
|
|
||||||
type ModulePrometheus struct {
|
|
||||||
wg *sync.WaitGroup
|
|
||||||
server *http.Server
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *ModulePrometheus) init() error {
|
|
||||||
m.wg = &sync.WaitGroup{}
|
|
||||||
|
|
||||||
global.OnlineUsersGauge = prometheus.NewGauge(prometheus.GaugeOpts{
|
|
||||||
Name: "gateway_online_users_total",
|
|
||||||
Help: "Total number of online users in gateway",
|
|
||||||
})
|
|
||||||
prometheus.MustRegister(global.OnlineUsersGauge)
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *ModulePrometheus) start() error {
|
|
||||||
m.wg.Add(1)
|
|
||||||
go func() {
|
|
||||||
defer m.wg.Done()
|
|
||||||
m.server = &http.Server{
|
|
||||||
Addr: fmt.Sprintf("%v:%v", config.Get().Metric.Prometheus.Address, config.Get().Metric.Prometheus.Port),
|
|
||||||
Handler: promhttp.Handler(),
|
|
||||||
}
|
|
||||||
if err := m.server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
|
|
||||||
log.Errorf("prometheus server failed: %v", err.Error())
|
|
||||||
}
|
|
||||||
log.Infof("prometheus server stop.")
|
|
||||||
}()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *ModulePrometheus) stop() error {
|
|
||||||
if err := m.server.Shutdown(context.Background()); err != nil {
|
|
||||||
log.Errorf("stop prometheus server failed: %v", err)
|
|
||||||
}
|
|
||||||
m.wg.Wait()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/mmorpg/service-gateway/config"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/net/http_gateway"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/net/http_gateway"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -13,16 +14,17 @@ import (
|
|||||||
|
|
||||||
// ModuleWebServer Web服务模块
|
// ModuleWebServer Web服务模块
|
||||||
type ModuleWebServer struct {
|
type ModuleWebServer struct {
|
||||||
|
module.DefaultModule
|
||||||
wg *sync.WaitGroup
|
wg *sync.WaitGroup
|
||||||
server *http.Server
|
server *http.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleWebServer) init() error {
|
func (m *ModuleWebServer) Init() error {
|
||||||
m.wg = &sync.WaitGroup{}
|
m.wg = &sync.WaitGroup{}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleWebServer) start() error {
|
func (m *ModuleWebServer) Start(ready *sync.WaitGroup) error {
|
||||||
m.wg.Add(1)
|
m.wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer m.wg.Done()
|
defer m.wg.Done()
|
||||||
@@ -30,6 +32,7 @@ func (m *ModuleWebServer) start() error {
|
|||||||
Addr: fmt.Sprintf("%v:%v", config.Get().Serve.Http.Address, config.Get().Serve.Http.Port),
|
Addr: fmt.Sprintf("%v:%v", config.Get().Serve.Http.Address, config.Get().Serve.Http.Port),
|
||||||
Handler: http_gateway.InitRouter(),
|
Handler: http_gateway.InitRouter(),
|
||||||
}
|
}
|
||||||
|
ready.Done()
|
||||||
if err := m.server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
|
if err := m.server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||||
log.Errorf("http server failed: %v", err.Error())
|
log.Errorf("http server failed: %v", err.Error())
|
||||||
}
|
}
|
||||||
@@ -38,7 +41,7 @@ func (m *ModuleWebServer) start() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleWebServer) stop() error {
|
func (m *ModuleWebServer) Stop() error {
|
||||||
if err := m.server.Shutdown(context.Background()); err != nil {
|
if err := m.server.Shutdown(context.Background()); err != nil {
|
||||||
log.Errorf("stop http server failed: %v", err)
|
log.Errorf("stop http server failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/socket/websocket"
|
"git.hlsq.asia/mmorpg/service-common/net/socket/websocket"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/mmorpg/service-gateway/config"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/net/ws_gateway"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/net/ws_gateway"
|
||||||
@@ -13,11 +14,12 @@ import (
|
|||||||
|
|
||||||
// ModuleWebsocketServer Websocket服务模块
|
// ModuleWebsocketServer Websocket服务模块
|
||||||
type ModuleWebsocketServer struct {
|
type ModuleWebsocketServer struct {
|
||||||
|
module.DefaultModule
|
||||||
wg *sync.WaitGroup
|
wg *sync.WaitGroup
|
||||||
server *websocket.WSServer
|
server *websocket.WSServer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleWebsocketServer) init() error {
|
func (m *ModuleWebsocketServer) Init() error {
|
||||||
m.wg = &sync.WaitGroup{}
|
m.wg = &sync.WaitGroup{}
|
||||||
m.server = websocket.NewWSServer(
|
m.server = websocket.NewWSServer(
|
||||||
&ws_gateway.GatewayWsServer{},
|
&ws_gateway.GatewayWsServer{},
|
||||||
@@ -27,10 +29,11 @@ func (m *ModuleWebsocketServer) init() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleWebsocketServer) start() error {
|
func (m *ModuleWebsocketServer) Start(ready *sync.WaitGroup) error {
|
||||||
m.wg.Add(1)
|
m.wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer m.wg.Done()
|
defer m.wg.Done()
|
||||||
|
ready.Done()
|
||||||
_ = m.server.Run(
|
_ = m.server.Run(
|
||||||
fmt.Sprintf("tcp4://0.0.0.0:%v", config.Get().Serve.Socket.Web.Port),
|
fmt.Sprintf("tcp4://0.0.0.0:%v", config.Get().Serve.Socket.Web.Port),
|
||||||
true,
|
true,
|
||||||
@@ -47,7 +50,7 @@ func (m *ModuleWebsocketServer) start() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleWebsocketServer) stop() error {
|
func (m *ModuleWebsocketServer) Stop() error {
|
||||||
if err := m.server.Stop(); err != nil {
|
if err := m.server.Stop(); err != nil {
|
||||||
log.Errorf("stop websocket server failed: %v", err)
|
log.Errorf("stop websocket server failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,33 +11,34 @@ log:
|
|||||||
metric:
|
metric:
|
||||||
prometheus:
|
prometheus:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8504
|
port: 18504
|
||||||
|
jaeger:
|
||||||
|
endpoint: "127.0.0.1:4317"
|
||||||
|
|
||||||
db:
|
db:
|
||||||
etcd:
|
etcd:
|
||||||
endpoints: [ "10.0.40.9:2379" ]
|
endpoints: [ "127.0.0.1:2379" ]
|
||||||
redis:
|
redis:
|
||||||
addr: "47.108.184.184:6379"
|
addr: "127.0.0.1:6379"
|
||||||
password: "lQ7aM8oB6lK0iD5k"
|
password: "lQ7aM8oB6lK0iD5k"
|
||||||
db: 0
|
db: 0
|
||||||
|
|
||||||
serve:
|
serve:
|
||||||
grpc:
|
grpc:
|
||||||
address: "10.0.40.199"
|
address: "127.0.0.1"
|
||||||
port: 8500
|
port: 18500
|
||||||
ttl: 20
|
ttl: 20
|
||||||
socket:
|
socket:
|
||||||
web:
|
web:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8501
|
port: 18501
|
||||||
raw:
|
raw:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8502
|
port: 18502
|
||||||
http:
|
http:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8503
|
port: 18503
|
||||||
|
|
||||||
auth:
|
auth:
|
||||||
secret: "bMa3mU4oCsX2KBex5o7GzwSnACpumFq3SdlDXYZgVTU="
|
shortExpire: 3600
|
||||||
shortExpire: 60
|
longExpire: 604800
|
||||||
longExpire: 10080
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type AuthConfig struct {
|
type AuthConfig struct {
|
||||||
Secret string `yaml:"secret"`
|
|
||||||
ShortExpire int64 `yaml:"shortExpire"`
|
ShortExpire int64 `yaml:"shortExpire"`
|
||||||
LongExpire int64 `yaml:"longExpire"`
|
LongExpire int64 `yaml:"longExpire"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ log:
|
|||||||
metric:
|
metric:
|
||||||
prometheus:
|
prometheus:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8504
|
port: 18504
|
||||||
|
jaeger:
|
||||||
|
endpoint: "172.18.28.0:4317"
|
||||||
|
|
||||||
db:
|
db:
|
||||||
etcd:
|
etcd:
|
||||||
@@ -24,20 +26,19 @@ db:
|
|||||||
serve:
|
serve:
|
||||||
grpc:
|
grpc:
|
||||||
address: "172.18.28.0"
|
address: "172.18.28.0"
|
||||||
port: 8500
|
port: 18500
|
||||||
ttl: 20
|
ttl: 20
|
||||||
socket:
|
socket:
|
||||||
web:
|
web:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8501
|
port: 18501
|
||||||
raw:
|
raw:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8502
|
port: 18502
|
||||||
http:
|
http:
|
||||||
address: "0.0.0.0"
|
address: "0.0.0.0"
|
||||||
port: 8503
|
port: 18503
|
||||||
|
|
||||||
auth:
|
auth:
|
||||||
secret: "bMa3mU4oCsX2KBex5o7GzwSnACpumFq3SdlDXYZgVTU="
|
shortExpire: 3600
|
||||||
shortExpire: 15
|
longExpire: 604800
|
||||||
longExpire: 10080
|
|
||||||
5
deploy/Jenkinsfile
vendored
5
deploy/Jenkinsfile
vendored
@@ -51,7 +51,7 @@ pipeline {
|
|||||||
stage('Build Go Binary') {
|
stage('Build Go Binary') {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'golang:1.23.1-alpine'
|
image 'golang:1.24.0-alpine'
|
||||||
reuseNode true
|
reuseNode true
|
||||||
args '-u root:root -v $GO_MOD_CACHE_DIR:/go/pkg/mod -v $GO_BUILD_CACHE_DIR:/root/.cache/go-build'
|
args '-u root:root -v $GO_MOD_CACHE_DIR:/go/pkg/mod -v $GO_BUILD_CACHE_DIR:/root/.cache/go-build'
|
||||||
}
|
}
|
||||||
@@ -80,6 +80,7 @@ pipeline {
|
|||||||
sh """
|
sh """
|
||||||
echo "$DOCKER_PASS" | docker login --username "$DOCKER_USER" --password-stdin ${env.REGISTRY_URL}
|
echo "$DOCKER_PASS" | docker login --username "$DOCKER_USER" --password-stdin ${env.REGISTRY_URL}
|
||||||
docker buildx build --platform linux/amd64 -t ${env.IMAGE_TAG} -f deploy/Dockerfile . --push
|
docker buildx build --platform linux/amd64 -t ${env.IMAGE_TAG} -f deploy/Dockerfile . --push
|
||||||
|
docker rmi ${env.IMAGE_TAG}
|
||||||
docker logout ${env.REGISTRY_URL}
|
docker logout ${env.REGISTRY_URL}
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
@@ -109,7 +110,7 @@ pipeline {
|
|||||||
docker run -d \\
|
docker run -d \\
|
||||||
--name ${env.APP_NAME} \\
|
--name ${env.APP_NAME} \\
|
||||||
--restart unless-stopped \\
|
--restart unless-stopped \\
|
||||||
-p 8500-8504:8500-8504 \\
|
-p 18500-18504:18500-18504 \\
|
||||||
--env XH_G_ENV=prod \\
|
--env XH_G_ENV=prod \\
|
||||||
-v /root/service/logs/gateway_log/:/app/logs \\
|
-v /root/service/logs/gateway_log/:/app/logs \\
|
||||||
${env.IMAGE_TAG}
|
${env.IMAGE_TAG}
|
||||||
|
|||||||
77
go.mod
77
go.mod
@@ -1,57 +1,73 @@
|
|||||||
module git.hlsq.asia/mmorpg/service-gateway
|
module git.hlsq.asia/mmorpg/service-gateway
|
||||||
|
|
||||||
go 1.23.1
|
go 1.24.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
bou.ke/monkey v1.0.2
|
bou.ke/monkey v1.0.2
|
||||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260114110346-7cb057fc916e
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260206145147-5a0f4b71d430
|
||||||
github.com/alicebob/miniredis/v2 v2.35.0
|
github.com/alicebob/miniredis/v2 v2.35.0
|
||||||
github.com/gin-contrib/cors v1.7.6
|
github.com/gin-contrib/cors v1.7.6
|
||||||
github.com/gin-gonic/gin v1.11.0
|
github.com/gin-gonic/gin v1.11.0
|
||||||
github.com/golang/mock v1.6.0
|
github.com/golang/mock v1.6.0
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3
|
github.com/google/uuid v1.6.0
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3
|
||||||
github.com/judwhite/go-svc v1.2.1
|
github.com/judwhite/go-svc v1.2.1
|
||||||
github.com/panjf2000/gnet/v2 v2.9.7
|
github.com/panjf2000/gnet/v2 v2.9.7
|
||||||
github.com/prometheus/client_golang v1.20.5
|
github.com/prometheus/client_golang v1.20.5
|
||||||
github.com/redis/go-redis/v9 v9.10.0
|
|
||||||
github.com/stretchr/testify v1.11.1
|
github.com/stretchr/testify v1.11.1
|
||||||
|
go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.64.0
|
||||||
go.uber.org/zap v1.27.0
|
go.uber.org/zap v1.27.0
|
||||||
google.golang.org/grpc v1.71.1
|
google.golang.org/grpc v1.77.0
|
||||||
google.golang.org/protobuf v1.36.9
|
google.golang.org/protobuf v1.36.10
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
filippo.io/edwards25519 v1.1.0 // indirect
|
filippo.io/edwards25519 v1.1.0 // indirect
|
||||||
|
github.com/IBM/sarama v1.46.3 // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/bwmarrin/snowflake v0.3.0 // indirect
|
github.com/bwmarrin/snowflake v0.3.0 // indirect
|
||||||
github.com/bytedance/sonic v1.14.0 // indirect
|
github.com/bytedance/gopkg v0.1.3 // indirect
|
||||||
github.com/bytedance/sonic/loader v0.3.0 // indirect
|
github.com/bytedance/sonic v1.14.2 // indirect
|
||||||
|
github.com/bytedance/sonic/loader v0.4.0 // indirect
|
||||||
|
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
github.com/cloudwego/base64x v0.1.6 // indirect
|
github.com/cloudwego/base64x v0.1.6 // indirect
|
||||||
github.com/coreos/go-semver v0.3.1 // indirect
|
github.com/coreos/go-semver v0.3.1 // indirect
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
|
github.com/eapache/go-resiliency v1.7.0 // indirect
|
||||||
|
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
|
||||||
|
github.com/eapache/queue v1.1.0 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||||
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
github.com/gabriel-vasile/mimetype v1.4.11 // indirect
|
||||||
github.com/gin-contrib/sse v1.1.0 // indirect
|
github.com/gin-contrib/sse v1.1.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/locales v0.14.1 // indirect
|
||||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
github.com/go-playground/validator/v10 v10.27.0 // indirect
|
github.com/go-playground/validator/v10 v10.28.0 // indirect
|
||||||
github.com/go-sql-driver/mysql v1.8.1 // indirect
|
github.com/go-sql-driver/mysql v1.8.1 // indirect
|
||||||
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||||
github.com/gobwas/httphead v0.1.0 // indirect
|
github.com/gobwas/httphead v0.1.0 // indirect
|
||||||
github.com/gobwas/pool v0.2.1 // indirect
|
github.com/gobwas/pool v0.2.1 // indirect
|
||||||
github.com/gobwas/ws v1.4.0 // indirect
|
github.com/gobwas/ws v1.4.0 // indirect
|
||||||
github.com/goccy/go-json v0.10.5 // indirect
|
github.com/goccy/go-json v0.10.5 // indirect
|
||||||
github.com/goccy/go-yaml v1.18.0 // indirect
|
github.com/goccy/go-yaml v1.19.0 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
|
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
|
||||||
github.com/golang/protobuf v1.5.4 // indirect
|
github.com/golang/protobuf v1.5.4 // indirect
|
||||||
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
|
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||||
|
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
|
||||||
|
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
|
||||||
|
github.com/jcmturner/gofork v1.7.6 // indirect
|
||||||
|
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
|
||||||
|
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
|
||||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
github.com/jinzhu/now v1.1.5 // indirect
|
github.com/jinzhu/now v1.1.5 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/klauspost/compress v1.17.9 // indirect
|
github.com/klauspost/compress v1.18.1 // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||||
github.com/leodido/go-urn v1.4.0 // indirect
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
@@ -61,12 +77,15 @@ require (
|
|||||||
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
|
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
|
||||||
github.com/panjf2000/ants/v2 v2.11.3 // indirect
|
github.com/panjf2000/ants/v2 v2.11.3 // indirect
|
||||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||||
|
github.com/pierrec/lz4/v4 v4.1.22 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/prometheus/client_model v0.6.1 // indirect
|
github.com/prometheus/client_model v0.6.1 // indirect
|
||||||
github.com/prometheus/common v0.62.0 // indirect
|
github.com/prometheus/common v0.62.0 // indirect
|
||||||
github.com/prometheus/procfs v0.15.1 // indirect
|
github.com/prometheus/procfs v0.15.1 // indirect
|
||||||
github.com/quic-go/qpack v0.5.1 // indirect
|
github.com/quic-go/qpack v0.6.0 // indirect
|
||||||
github.com/quic-go/quic-go v0.54.0 // indirect
|
github.com/quic-go/quic-go v0.57.1 // indirect
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
|
||||||
|
github.com/redis/go-redis/v9 v9.10.0 // indirect
|
||||||
github.com/sagikazarmark/locafero v0.11.0 // indirect
|
github.com/sagikazarmark/locafero v0.11.0 // indirect
|
||||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
|
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
|
||||||
github.com/spf13/afero v1.15.0 // indirect
|
github.com/spf13/afero v1.15.0 // indirect
|
||||||
@@ -75,25 +94,31 @@ require (
|
|||||||
github.com/spf13/viper v1.21.0 // indirect
|
github.com/spf13/viper v1.21.0 // indirect
|
||||||
github.com/subosito/gotenv v1.6.0 // indirect
|
github.com/subosito/gotenv v1.6.0 // indirect
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
github.com/ugorji/go/codec v1.3.0 // indirect
|
github.com/ugorji/go/codec v1.3.1 // indirect
|
||||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||||
github.com/yuin/gopher-lua v1.1.1 // indirect
|
github.com/yuin/gopher-lua v1.1.1 // indirect
|
||||||
go.etcd.io/etcd/api/v3 v3.6.1 // indirect
|
go.etcd.io/etcd/api/v3 v3.6.1 // indirect
|
||||||
go.etcd.io/etcd/client/pkg/v3 v3.6.1 // indirect
|
go.etcd.io/etcd/client/pkg/v3 v3.6.1 // indirect
|
||||||
go.etcd.io/etcd/client/v3 v3.6.1 // indirect
|
go.etcd.io/etcd/client/v3 v3.6.1 // indirect
|
||||||
go.uber.org/mock v0.5.0 // indirect
|
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||||
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0 // indirect
|
||||||
|
go.opentelemetry.io/otel v1.39.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/metric v1.39.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/trace v1.39.0 // indirect
|
||||||
|
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||||
golang.org/x/arch v0.20.0 // indirect
|
golang.org/x/arch v0.23.0 // indirect
|
||||||
golang.org/x/crypto v0.40.0 // indirect
|
golang.org/x/crypto v0.45.0 // indirect
|
||||||
golang.org/x/mod v0.26.0 // indirect
|
golang.org/x/net v0.47.0 // indirect
|
||||||
golang.org/x/net v0.42.0 // indirect
|
golang.org/x/sync v0.18.0 // indirect
|
||||||
golang.org/x/sync v0.16.0 // indirect
|
golang.org/x/sys v0.39.0 // indirect
|
||||||
golang.org/x/sys v0.35.0 // indirect
|
golang.org/x/text v0.31.0 // indirect
|
||||||
golang.org/x/text v0.28.0 // indirect
|
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
|
||||||
golang.org/x/tools v0.35.0 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
|
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
gorm.io/driver/mysql v1.6.0 // indirect
|
gorm.io/driver/mysql v1.6.0 // indirect
|
||||||
|
|||||||
204
go.sum
204
go.sum
@@ -2,10 +2,12 @@ bou.ke/monkey v1.0.2 h1:kWcnsrCNUatbxncxR/ThdYqbytgOIArtYWqcQLQzKLI=
|
|||||||
bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA=
|
bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA=
|
||||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260114110346-7cb057fc916e h1:E459cK0l+oODUT6KWA3BxPQRboMJIKLs4TYjnWiG6iQ=
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260206145147-5a0f4b71d430 h1:8aNIgKpU6HBg7h4ENjuGWshap+VxeKUmLE0IvFoWbug=
|
||||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260114110346-7cb057fc916e/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260206145147-5a0f4b71d430/go.mod h1:mMhZcumphj6gaVTppVYsMTkd+5HupmQgAc53Pd4MH9I=
|
||||||
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
||||||
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
|
github.com/IBM/sarama v1.46.3 h1:njRsX6jNlnR+ClJ8XmkO+CM4unbrNr/2vB5KK6UA+IE=
|
||||||
|
github.com/IBM/sarama v1.46.3/go.mod h1:GTUYiF9DMOZVe3FwyGT+dtSPceGFIgA+sPc5u6CBwko=
|
||||||
github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI=
|
github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI=
|
||||||
github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM=
|
github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM=
|
||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||||
@@ -16,10 +18,14 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
|
|||||||
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||||
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
|
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
|
||||||
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
|
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
|
||||||
github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ=
|
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
|
||||||
github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA=
|
github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM=
|
||||||
github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA=
|
github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE=
|
||||||
github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
|
github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980=
|
||||||
|
github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o=
|
||||||
|
github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo=
|
||||||
|
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 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
|
github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
|
||||||
@@ -33,20 +39,29 @@ 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.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||||
|
github.com/eapache/go-resiliency v1.7.0 h1:n3NRTnBn5N0Cbi/IeOHuQn9s2UwVUH7Ga0ZWcP+9JTA=
|
||||||
|
github.com/eapache/go-resiliency v1.7.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho=
|
||||||
|
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws=
|
||||||
|
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0=
|
||||||
|
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
|
||||||
|
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||||
|
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
|
||||||
|
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
|
||||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||||
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||||
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||||
github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY=
|
github.com/gabriel-vasile/mimetype v1.4.11 h1:AQvxbp830wPhHTqc1u7nzoLT+ZFxGY7emj5DR5DYFik=
|
||||||
github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok=
|
github.com/gabriel-vasile/mimetype v1.4.11/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
||||||
github.com/gin-contrib/cors v1.7.6 h1:3gQ8GMzs1Ylpf70y8bMw4fVpycXIeX1ZemuSQIsnQQY=
|
github.com/gin-contrib/cors v1.7.6 h1:3gQ8GMzs1Ylpf70y8bMw4fVpycXIeX1ZemuSQIsnQQY=
|
||||||
github.com/gin-contrib/cors v1.7.6/go.mod h1:Ulcl+xN4jel9t1Ry8vqph23a60FwH9xVLd+3ykmTjOk=
|
github.com/gin-contrib/cors v1.7.6/go.mod h1:Ulcl+xN4jel9t1Ry8vqph23a60FwH9xVLd+3ykmTjOk=
|
||||||
github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
|
github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
|
||||||
github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
|
github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
|
||||||
github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
|
github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
|
||||||
github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls=
|
github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls=
|
||||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||||
|
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||||
@@ -55,8 +70,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/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 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||||
github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4=
|
github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688=
|
||||||
github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo=
|
github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU=
|
||||||
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
|
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
|
||||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||||
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
|
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
|
||||||
@@ -69,8 +84,8 @@ github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
|
|||||||
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
|
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
|
||||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||||
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||||
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
|
github.com/goccy/go-yaml v1.19.0 h1:EmkZ9RIsX+Uq4DYFowegAuJo8+xdX3T/2dwNPXbxEYE=
|
||||||
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
|
github.com/goccy/go-yaml v1.19.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
|
||||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||||
@@ -80,13 +95,32 @@ github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
|||||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
||||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||||
|
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||||
|
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/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 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
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/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
|
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
|
||||||
|
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/hashicorp/go-uuid v1.0.2/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/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
|
||||||
|
github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
|
||||||
|
github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo=
|
||||||
|
github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM=
|
||||||
|
github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg=
|
||||||
|
github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo=
|
||||||
|
github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o=
|
||||||
|
github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg=
|
||||||
|
github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8=
|
||||||
|
github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
|
||||||
|
github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY=
|
||||||
|
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
|
||||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||||
@@ -97,8 +131,8 @@ github.com/judwhite/go-svc v1.2.1 h1:a7fsJzYUa33sfDJRF2N/WXhA+LonCEEY8BJb1tuS5tA
|
|||||||
github.com/judwhite/go-svc v1.2.1/go.mod h1:mo/P2JNX8C07ywpP9YtO2gnBgnUiFTHqtsZekJrUuTk=
|
github.com/judwhite/go-svc v1.2.1/go.mod h1:mo/P2JNX8C07ywpP9YtO2gnBgnUiFTHqtsZekJrUuTk=
|
||||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
|
github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co=
|
||||||
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0=
|
||||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||||
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
@@ -126,6 +160,8 @@ github.com/panjf2000/gnet/v2 v2.9.7 h1:6zW7Jl3oAfXwSuh1PxHLndoL2MQRWx0AJR6aaQjxU
|
|||||||
github.com/panjf2000/gnet/v2 v2.9.7/go.mod h1:WQTxDWYuQ/hz3eccH0FN32IVuvZ19HewEWx0l62fx7E=
|
github.com/panjf2000/gnet/v2 v2.9.7/go.mod h1:WQTxDWYuQ/hz3eccH0FN32IVuvZ19HewEWx0l62fx7E=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||||
|
github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU=
|
||||||
|
github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
|
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
|
||||||
@@ -136,14 +172,16 @@ github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ
|
|||||||
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
|
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
|
||||||
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
||||||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||||
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
|
github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=
|
||||||
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
|
github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=
|
||||||
github.com/quic-go/quic-go v0.54.0 h1:6s1YB9QotYI6Ospeiguknbp2Znb/jZYjZLRXn9kMQBg=
|
github.com/quic-go/quic-go v0.57.1 h1:25KAAR9QR8KZrCZRThWMKVAwGoiHIrNbT72ULHTuI10=
|
||||||
github.com/quic-go/quic-go v0.54.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY=
|
github.com/quic-go/quic-go v0.57.1/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s=
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 h1:bsUq1dX0N8AOIL7EB/X911+m4EHsnWEHeJ0c+3TTBrg=
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||||
github.com/redis/go-redis/v9 v9.10.0 h1:FxwK3eV8p/CQa0Ch276C7u2d0eNC9kCmAYQ7mCXCzVs=
|
github.com/redis/go-redis/v9 v9.10.0 h1:FxwK3eV8p/CQa0Ch276C7u2d0eNC9kCmAYQ7mCXCzVs=
|
||||||
github.com/redis/go-redis/v9 v9.10.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
|
github.com/redis/go-redis/v9 v9.10.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
|
||||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||||
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
|
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
|
||||||
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
|
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
|
||||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
|
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
|
||||||
@@ -159,23 +197,28 @@ github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjb
|
|||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
|
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
|
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 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||||
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
|
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
|
||||||
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||||
github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA=
|
github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY=
|
||||||
github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=
|
github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=
|
||||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=
|
github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=
|
||||||
github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
|
github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
|
||||||
go.etcd.io/etcd/api/v3 v3.6.1 h1:yJ9WlDih9HT457QPuHt/TH/XtsdN2tubyxyQHSHPsEo=
|
go.etcd.io/etcd/api/v3 v3.6.1 h1:yJ9WlDih9HT457QPuHt/TH/XtsdN2tubyxyQHSHPsEo=
|
||||||
@@ -184,53 +227,74 @@ go.etcd.io/etcd/client/pkg/v3 v3.6.1 h1:CxDVv8ggphmamrXM4Of8aCC8QHzDM4tGcVr9p2BS
|
|||||||
go.etcd.io/etcd/client/pkg/v3 v3.6.1/go.mod h1:aTkCp+6ixcVTZmrJGa7/Mc5nMNs59PEgBbq+HCmWyMc=
|
go.etcd.io/etcd/client/pkg/v3 v3.6.1/go.mod h1:aTkCp+6ixcVTZmrJGa7/Mc5nMNs59PEgBbq+HCmWyMc=
|
||||||
go.etcd.io/etcd/client/v3 v3.6.1 h1:KelkcizJGsskUXlsxjVrSmINvMMga0VWwFF0tSPGEP0=
|
go.etcd.io/etcd/client/v3 v3.6.1 h1:KelkcizJGsskUXlsxjVrSmINvMMga0VWwFF0tSPGEP0=
|
||||||
go.etcd.io/etcd/client/v3 v3.6.1/go.mod h1:fCbPUdjWNLfx1A6ATo9syUmFVxqHH9bCnPLBZmnLmMY=
|
go.etcd.io/etcd/client/v3 v3.6.1/go.mod h1:fCbPUdjWNLfx1A6ATo9syUmFVxqHH9bCnPLBZmnLmMY=
|
||||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||||
go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
|
go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.64.0 h1:7IKZbAYwlwLXAdu7SVPhzTjDjogWZxP4MIa7rovY+PU=
|
||||||
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
|
go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.64.0/go.mod h1:+TF5nf3NIv2X8PGxqfYOaRnAoMM43rUA2C3XsN2DoWA=
|
||||||
go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0 h1:RN3ifU8y4prNWeEnQp2kRRHz8UwonAEYZl8tUzHEXAk=
|
||||||
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0/go.mod h1:habDz3tEWiFANTo6oUE99EmaFUrCNYAAg3wiVmusm70=
|
||||||
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
|
go.opentelemetry.io/contrib/propagators/b3 v1.39.0 h1:PI7pt9pkSnimWcp5sQhUA9OzLbc3Ba4sL+VEUTNsxrk=
|
||||||
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
|
go.opentelemetry.io/contrib/propagators/b3 v1.39.0/go.mod h1:5gV/EzPnfYIwjzj+6y8tbGW2PKWhcsz5e/7twptRVQY=
|
||||||
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
|
go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
|
||||||
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
|
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
|
||||||
go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 h1:f0cb2XPmrqn4XMy9PNliTgRKJgS5WcL/u0/WRYGz4t0=
|
||||||
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0/go.mod h1:vnakAaFckOMiMtOIhFI2MNH4FYrZzXCYxmb1LlhoGz8=
|
||||||
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 h1:in9O8ESIOlwJAEGTkkf34DesGRAc/Pn8qJ7k3r/42LM=
|
||||||
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0/go.mod h1:Rp0EXBm5tfnv0WL+ARyO/PHBEaEAT8UUHQ6AGJcSq6c=
|
||||||
|
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.39.0 h1:8UPA4IbVZxpsD76ihGOQiFml99GPAEZLohDXvqHdi6U=
|
||||||
|
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.39.0/go.mod h1:MZ1T/+51uIVKlRzGw1Fo46KEWThjlCBZKl2LzY5nv4g=
|
||||||
|
go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
|
||||||
|
go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
|
||||||
|
go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18=
|
||||||
|
go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE=
|
||||||
|
go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=
|
||||||
|
go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=
|
||||||
|
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
|
||||||
|
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
|
||||||
|
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.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
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/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
|
go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
|
||||||
go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
|
go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=
|
||||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
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/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 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||||
golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c=
|
golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg=
|
||||||
golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
|
golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||||
|
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
|
||||||
|
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
|
||||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
|
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
|
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||||
|
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
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/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -238,38 +302,50 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
|
||||||
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
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/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
|
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||||
|
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||||
|
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
|
||||||
|
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950=
|
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg=
|
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4=
|
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
|
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto=
|
||||||
google.golang.org/grpc v1.71.1 h1:ffsFWr7ygTUscGPI0KKK6TLrGz0476KUvvsbqWK0rPI=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww=
|
||||||
google.golang.org/grpc v1.71.1/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
|
||||||
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
|
google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM=
|
||||||
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
|
google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig=
|
||||||
|
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
|
||||||
|
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
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 h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
|
||||||
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
|||||||
@@ -1,10 +1,21 @@
|
|||||||
package global
|
package global
|
||||||
|
|
||||||
import "github.com/prometheus/client_golang/prometheus"
|
var ServiceStatus = ServiceStatusStarting
|
||||||
|
|
||||||
|
type ServiceStatusCode int32
|
||||||
|
|
||||||
const (
|
const (
|
||||||
KeyGatewayAccessToken = "gateway:token:access:%v"
|
ServiceStatusStarting ServiceStatusCode = iota // 启动中
|
||||||
KeyGatewayRefreshToken = "gateway:token:refresh:%v"
|
ServiceStatusReady // 就绪
|
||||||
|
ServiceStatusStopping // 停止中
|
||||||
|
)
|
||||||
|
|
||||||
|
var GatewaySID int64
|
||||||
|
|
||||||
|
const (
|
||||||
|
KeyGatewayAccessToken = "gateway:token:access:"
|
||||||
|
KeyGatewayRefreshToken = "gateway:token:refresh:"
|
||||||
|
KeyGatewaySession = "gateway:session:"
|
||||||
|
|
||||||
KeyGatewayInfo = "gateway:info:%v"
|
KeyGatewayInfo = "gateway:info:%v"
|
||||||
HFieldInfoGatewaySID = "gateway_sid"
|
HFieldInfoGatewaySID = "gateway_sid"
|
||||||
@@ -14,7 +25,3 @@ const (
|
|||||||
MaxOnlineSize = 100 // 最大在线人数
|
MaxOnlineSize = 100 // 最大在线人数
|
||||||
MaxQueueUpSize = 100 // 最大排队人数
|
MaxQueueUpSize = 100 // 最大排队人数
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
OnlineUsersGauge prometheus.Gauge
|
|
||||||
)
|
|
||||||
|
|||||||
24
internal/global/metric.go
Normal file
24
internal/global/metric.go
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package global
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
OnlineUsersGauge prometheus.Gauge
|
||||||
|
FlowCounter prometheus.Counter
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
OnlineUsersGauge = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "gateway_online_users",
|
||||||
|
Help: "Total number of online users",
|
||||||
|
})
|
||||||
|
prometheus.MustRegister(OnlineUsersGauge)
|
||||||
|
|
||||||
|
FlowCounter = prometheus.NewCounter(prometheus.CounterOpts{
|
||||||
|
Name: "gateway_flow_counter",
|
||||||
|
Help: "Total number of flow",
|
||||||
|
})
|
||||||
|
prometheus.MustRegister(FlowCounter)
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
|
||||||
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -17,14 +18,14 @@ func (s *Server) ToClient(server grpc_pb.Gateway_ToClientServer) error {
|
|||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
log.Errorf("Action panic: %v", err)
|
log.Errorf("ToClient panic: %v", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
for {
|
for {
|
||||||
if args, err := server.Recv(); err != nil {
|
if args, err := server.Recv(); err != nil {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if args.USN == "" {
|
if args.USN == -1 {
|
||||||
|
|
||||||
//utils.WorkerPool(ws_handler.UserMgr.GetAllInterface(), func(task interface{}) {
|
//utils.WorkerPool(ws_handler.UserMgr.GetAllInterface(), func(task interface{}) {
|
||||||
// client := task.(*ws_handler.Client)
|
// client := task.(*ws_handler.Client)
|
||||||
@@ -39,8 +40,10 @@ func (s *Server) ToClient(server grpc_pb.Gateway_ToClientServer) error {
|
|||||||
log.Errorf("ToClient proto.Marshal error: %v", err)
|
log.Errorf("ToClient proto.Marshal error: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
dataLen := float64(len(data))
|
||||||
for _, cli := range client.UserMgr.GetAll() {
|
for _, cli := range client.UserMgr.GetAll() {
|
||||||
cli.WriteBytesPreMarshal(data)
|
cli.WriteBytesPreMarshal(data)
|
||||||
|
global.FlowCounter.Add(dataLen)
|
||||||
}
|
}
|
||||||
|
|
||||||
//for _, client := range ws_handler.UserMgr.GetAll() {
|
//for _, client := range ws_handler.UserMgr.GetAll() {
|
||||||
@@ -49,6 +52,7 @@ func (s *Server) ToClient(server grpc_pb.Gateway_ToClientServer) error {
|
|||||||
} else {
|
} else {
|
||||||
if cli := client.UserMgr.GetByUSN(args.USN); cli != nil {
|
if cli := client.UserMgr.GetByUSN(args.USN); cli != nil {
|
||||||
cli.WriteBytes(ss_pb.MessageID(args.MessageID), args.Payload)
|
cli.WriteBytes(ss_pb.MessageID(args.MessageID), args.Payload)
|
||||||
|
global.FlowCounter.Add(float64(len(args.Payload)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package grpc_server
|
package grpc_server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/config"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -13,20 +14,26 @@ type Server struct {
|
|||||||
service.Base
|
service.Base
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServer(ttl int64) *Server {
|
func NewServer(cfg *config.GrpcConfig) *Server {
|
||||||
s := &Server{
|
s := &Server{
|
||||||
Base: service.Base{
|
Base: service.Base{
|
||||||
Target: common.KeyDiscoverGateway,
|
Target: common.KeyDiscoverGateway,
|
||||||
EtcdTTL: ttl,
|
ServiceName: common.KeyDiscoverServiceNameGateway,
|
||||||
|
Cfg: cfg,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
s.Base.OnCustomGrpcServerOption = s.OnCustomGrpcServerOption
|
||||||
s.Base.OnInit = s.OnInit
|
s.Base.OnInit = s.OnInit
|
||||||
s.Base.OnClose = s.OnClose
|
s.Base.OnClose = s.OnClose
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Server) OnCustomGrpcServerOption() []grpc.ServerOption {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Server) OnInit(serve *grpc.Server) {
|
func (s *Server) OnInit(serve *grpc.Server) {
|
||||||
client.GatewaySID = s.SID
|
global.GatewaySID = s.SID
|
||||||
grpc_pb.RegisterGatewayServer(serve, s)
|
grpc_pb.RegisterGatewayServer(serve, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
package http_handler
|
package http_handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 这个模块处理用户登录
|
// 这个模块处理用户登录
|
||||||
@@ -24,7 +20,7 @@ type LoginReq struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type LoginResp struct {
|
type LoginResp struct {
|
||||||
USN string `json:"usn"`
|
USN int64 `json:"usn"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
AccessToken string `json:"accessToken"`
|
AccessToken string `json:"accessToken"`
|
||||||
RefreshToken string `json:"refreshToken"`
|
RefreshToken string `json:"refreshToken"`
|
||||||
@@ -43,7 +39,7 @@ func Login(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
usn, name := "", ""
|
usn, name := int64(0), ""
|
||||||
if req.Phone != "" {
|
if req.Phone != "" {
|
||||||
// TODO 校验验证码
|
// TODO 校验验证码
|
||||||
login, err := client.PhoneLogin(c, &grpc_pb.PhoneLoginReq{
|
login, err := client.PhoneLogin(c, &grpc_pb.PhoneLoginReq{
|
||||||
@@ -71,7 +67,12 @@ func Login(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
at, rt, err := genToken(c, usn)
|
at, rt, err := sessionLogin(c, usn)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Login sessionLogin error: %v, usn: %v", err, usn)
|
||||||
|
http_resp.JsonOK(c, http_resp.Error(http_resp.Failed))
|
||||||
|
return
|
||||||
|
}
|
||||||
http_resp.JsonOK(c, http_resp.Success(&LoginResp{
|
http_resp.JsonOK(c, http_resp.Success(&LoginResp{
|
||||||
USN: usn,
|
USN: usn,
|
||||||
Name: name,
|
Name: name,
|
||||||
@@ -81,7 +82,7 @@ func Login(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RefreshTokenReq struct {
|
type RefreshTokenReq struct {
|
||||||
RefreshToken string `json:"refreshToken" binding:"required,min=1"`
|
RefreshToken string `json:"refreshToken"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RefreshTokenResp struct {
|
type RefreshTokenResp struct {
|
||||||
@@ -95,18 +96,27 @@ func RefreshToken(c *gin.Context) {
|
|||||||
http_resp.JsonBadRequest(c)
|
http_resp.JsonBadRequest(c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
claims, err := utils.ParseToken(req.RefreshToken, config.Get().Auth.Secret)
|
if req.RefreshToken == "" {
|
||||||
|
cookie, err := c.Cookie("refresh_token")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http_resp.JsonUnauthorized(c)
|
http_resp.JsonUnauthorized(c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if redis.GetClient().Get(c, fmt.Sprintf(global.KeyGatewayRefreshToken, claims.USN)).Val() != req.RefreshToken {
|
req.RefreshToken = cookie
|
||||||
|
}
|
||||||
|
|
||||||
|
usn, _ := redis.GetClient().HGet(c, global.KeyGatewayRefreshToken+req.RefreshToken, (&utils.UserSession{}).GetUsnKey()).Int64()
|
||||||
|
if usn == 0 {
|
||||||
http_resp.JsonUnauthorized(c)
|
http_resp.JsonUnauthorized(c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
at, rt, err := genToken(c, claims.USN)
|
|
||||||
|
if err := sessionLogout(c, req.RefreshToken); err != nil {
|
||||||
|
log.Errorf("RefreshToken sessionLogout error: %v, usn: %v", err, usn)
|
||||||
|
}
|
||||||
|
at, rt, err := sessionLogin(c, usn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("RefreshToken genToken error: %v, usn: %v", err, claims.USN)
|
log.Errorf("RefreshToken sessionLogin error: %v, usn: %v", err, usn)
|
||||||
http_resp.JsonOK(c, http_resp.Error(http_resp.Failed))
|
http_resp.JsonOK(c, http_resp.Error(http_resp.Failed))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -117,23 +127,29 @@ func RefreshToken(c *gin.Context) {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
func genToken(ctx context.Context, usn string) (string, string, error) {
|
type LogoutReq struct {
|
||||||
at, err := genTokenOne(ctx, global.KeyGatewayAccessToken, usn, time.Duration(config.Get().Auth.ShortExpire)*time.Minute)
|
RefreshToken string `json:"refreshToken"`
|
||||||
if err != nil {
|
|
||||||
return "", "", err
|
|
||||||
}
|
|
||||||
rt, err := genTokenOne(ctx, global.KeyGatewayRefreshToken, usn, time.Duration(config.Get().Auth.LongExpire)*time.Minute)
|
|
||||||
if err != nil {
|
|
||||||
return "", "", err
|
|
||||||
}
|
|
||||||
return at, rt, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func genTokenOne(ctx context.Context, key string, usn string, ttl time.Duration) (string, error) {
|
type LogoutResp struct {
|
||||||
token, err := utils.GenToken(usn, config.Get().Auth.Secret, ttl)
|
}
|
||||||
|
|
||||||
|
func Logout(c *gin.Context) {
|
||||||
|
req := &LogoutReq{}
|
||||||
|
if err := c.ShouldBindJSON(req); err != nil {
|
||||||
|
http_resp.JsonBadRequest(c)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if req.RefreshToken == "" {
|
||||||
|
cookie, err := c.Cookie("refresh_token")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
http_resp.JsonUnauthorized(c)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
redis.GetClient().Set(ctx, fmt.Sprintf(key, usn), token, ttl)
|
req.RefreshToken = cookie
|
||||||
return token, err
|
}
|
||||||
|
if err := sessionLogout(c, req.RefreshToken); err != nil {
|
||||||
|
log.Errorf("Logout sessionLogout error: %v", err)
|
||||||
|
}
|
||||||
|
http_resp.JsonOK(c, http_resp.Success(&LogoutResp{}))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,23 +2,18 @@ package http_handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bou.ke/monkey"
|
"bou.ke/monkey"
|
||||||
"context"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb/mocks"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb/mocks"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/testutil"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/testutil"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
redis2 "github.com/redis/go-redis/v9"
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -26,17 +21,6 @@ type LoginTestSuite struct {
|
|||||||
testutil.TestSuite
|
testutil.TestSuite
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ts *LoginTestSuite) TestGenToken() {
|
|
||||||
usn := utils.RandInt(1, 100000000)
|
|
||||||
at, rt, err := genToken(context.Background(), strconv.Itoa(usn))
|
|
||||||
ts.Assert().NoError(err)
|
|
||||||
|
|
||||||
redisAt := redis.GetClient().Get(context.Background(), fmt.Sprintf(global.KeyGatewayAccessToken, usn)).Val()
|
|
||||||
ts.Assert().Equal(at, redisAt)
|
|
||||||
redisRt := redis.GetClient().Get(context.Background(), fmt.Sprintf(global.KeyGatewayRefreshToken, usn)).Val()
|
|
||||||
ts.Assert().Equal(rt, redisRt)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ts *LoginTestSuite) TestLogin() {
|
func (ts *LoginTestSuite) TestLogin() {
|
||||||
gin.SetMode(gin.TestMode)
|
gin.SetMode(gin.TestMode)
|
||||||
|
|
||||||
@@ -90,7 +74,7 @@ func (ts *LoginTestSuite) TestLogin() {
|
|||||||
client := mocks.NewMockUserClient(ctrl)
|
client := mocks.NewMockUserClient(ctrl)
|
||||||
client.EXPECT().
|
client.EXPECT().
|
||||||
PhoneLogin(gomock.Any(), gomock.Any()).
|
PhoneLogin(gomock.Any(), gomock.Any()).
|
||||||
Return(&grpc_pb.PhoneLoginResp{USN: "1", Name: "hh"}, nil)
|
Return(&grpc_pb.PhoneLoginResp{USN: 1, Name: "hh"}, nil)
|
||||||
|
|
||||||
monkey.Patch(grpc_client.UserNewClientLB, func() (grpc_pb.UserClient, error) {
|
monkey.Patch(grpc_client.UserNewClientLB, func() (grpc_pb.UserClient, error) {
|
||||||
return client, nil
|
return client, nil
|
||||||
@@ -130,41 +114,41 @@ func (ts *LoginTestSuite) TestRefreshToken() {
|
|||||||
utils.AssertResponse(&ts.Suite, w, http.StatusOK, http_resp.TokenInvalid)
|
utils.AssertResponse(&ts.Suite, w, http.StatusOK, http_resp.TokenInvalid)
|
||||||
})
|
})
|
||||||
|
|
||||||
ts.Run("Redis Get Failed", func() {
|
//ts.Run("Redis Get Failed", func() {
|
||||||
monkey.Patch(utils.ParseToken, func(tokenString string, secret string) (*utils.Claims, error) {
|
// monkey.Patch(utils.ParseToken, func(tokenString string, secret string) (*utils.Claims, error) {
|
||||||
if tokenString == "abc" {
|
// if tokenString == "abc" {
|
||||||
return &utils.Claims{USN: "1"}, nil
|
// return &utils.Claims{USN: 1}, nil
|
||||||
}
|
// }
|
||||||
return nil, assert.AnError
|
// return nil, assert.AnError
|
||||||
})
|
// })
|
||||||
defer monkey.Unpatch(utils.ParseToken)
|
// defer monkey.Unpatch(utils.ParseToken)
|
||||||
|
//
|
||||||
redis.GetClient().Set(context.Background(), fmt.Sprintf(global.KeyGatewayRefreshToken, 1), "ab", redis2.KeepTTL)
|
// redis.GetClient().Set(context.Background(), global.KeyGatewayRefreshToken+1, "ab", redis2.KeepTTL)
|
||||||
|
//
|
||||||
w, c := utils.CreateTestContext("POST", "/", &RefreshTokenReq{
|
// w, c := utils.CreateTestContext("POST", "/", &RefreshTokenReq{
|
||||||
RefreshToken: "abc",
|
// RefreshToken: "abc",
|
||||||
})
|
// })
|
||||||
RefreshToken(c)
|
// RefreshToken(c)
|
||||||
utils.AssertResponse(&ts.Suite, w, http.StatusOK, http_resp.TokenInvalid)
|
// utils.AssertResponse(&ts.Suite, w, http.StatusOK, http_resp.TokenInvalid)
|
||||||
})
|
//})
|
||||||
|
//
|
||||||
ts.Run("OK", func() {
|
//ts.Run("OK", func() {
|
||||||
monkey.Patch(utils.ParseToken, func(tokenString string, secret string) (*utils.Claims, error) {
|
// monkey.Patch(utils.ParseToken, func(tokenString string, secret string) (*utils.Claims, error) {
|
||||||
if tokenString == "abc" {
|
// if tokenString == "abc" {
|
||||||
return &utils.Claims{USN: "1"}, nil
|
// return &utils.Claims{USN: 1}, nil
|
||||||
}
|
// }
|
||||||
return nil, assert.AnError
|
// return nil, assert.AnError
|
||||||
})
|
// })
|
||||||
defer monkey.Unpatch(utils.ParseToken)
|
// defer monkey.Unpatch(utils.ParseToken)
|
||||||
|
//
|
||||||
redis.GetClient().Set(context.Background(), fmt.Sprintf(global.KeyGatewayRefreshToken, 1), "abc", redis2.KeepTTL)
|
// redis.GetClient().Set(context.Background(), fmt.Sprintf(global.KeyGatewayRefreshToken, 1), "abc", redis2.KeepTTL)
|
||||||
|
//
|
||||||
w, c := utils.CreateTestContext("POST", "/", &RefreshTokenReq{
|
// w, c := utils.CreateTestContext("POST", "/", &RefreshTokenReq{
|
||||||
RefreshToken: "abc",
|
// RefreshToken: "abc",
|
||||||
})
|
// })
|
||||||
RefreshToken(c)
|
// RefreshToken(c)
|
||||||
utils.AssertResponse(&ts.Suite, w, http.StatusOK, http_resp.OK)
|
// utils.AssertResponse(&ts.Suite, w, http.StatusOK, http_resp.OK)
|
||||||
})
|
//})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLoginTestSuite(t *testing.T) {
|
func TestLoginTestSuite(t *testing.T) {
|
||||||
|
|||||||
108
internal/handler/http_handler/session.go
Normal file
108
internal/handler/http_handler/session.go
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
package http_handler
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
|
"git.hlsq.asia/mmorpg/service-gateway/config"
|
||||||
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/google/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
scriptLoginSha1 string
|
||||||
|
scriptLogin = `
|
||||||
|
local at_key = KEYS[1] .. ARGV[1]
|
||||||
|
local rt_key = KEYS[2] .. ARGV[2]
|
||||||
|
local session_key = KEYS[3] .. ARGV[3]
|
||||||
|
|
||||||
|
redis.call("HSET", at_key,
|
||||||
|
"usn", ARGV[3],
|
||||||
|
"ip", ARGV[6],
|
||||||
|
"ua", ARGV[7],
|
||||||
|
"rt", ARGV[2]
|
||||||
|
)
|
||||||
|
redis.call("EXPIRE", at_key, tonumber(ARGV[4]))
|
||||||
|
|
||||||
|
redis.call("HSET", rt_key,
|
||||||
|
"usn", ARGV[3],
|
||||||
|
"ip", ARGV[6],
|
||||||
|
"ua", ARGV[7],
|
||||||
|
"at", ARGV[1]
|
||||||
|
)
|
||||||
|
redis.call("EXPIRE", rt_key, tonumber(ARGV[5]))
|
||||||
|
|
||||||
|
local all_rts = redis.call("SMEMBERS", session_key)
|
||||||
|
-- 只允许最大10个会话,多了的随机踢掉
|
||||||
|
if #all_rts >= 10 then
|
||||||
|
local rk = KEYS[2] .. all_rts[1]
|
||||||
|
local ak = KEYS[1] .. redis.call("HGET", rk, "at")
|
||||||
|
redis.call("DEL", rk)
|
||||||
|
redis.call("DEL", ak)
|
||||||
|
end
|
||||||
|
-- 清理已经失效的会话
|
||||||
|
for i, rt in ipairs(all_rts) do
|
||||||
|
if redis.call("EXISTS", KEYS[2] .. rt) == 0 then
|
||||||
|
redis.call("SREM", session_key, rt)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
redis.call("SADD", session_key, ARGV[2])
|
||||||
|
redis.call("EXPIRE", session_key, tonumber(ARGV[5]) + 600)
|
||||||
|
|
||||||
|
return 1
|
||||||
|
`
|
||||||
|
)
|
||||||
|
|
||||||
|
func sessionLogin(c *gin.Context, usn int64) (string, string, error) {
|
||||||
|
if scriptLoginSha1 == "" {
|
||||||
|
scriptLoginSha1 = redis.GetClient().ScriptLoad(c, scriptLogin).Val()
|
||||||
|
}
|
||||||
|
at := uuid.New().String()
|
||||||
|
rt := uuid.New().String()
|
||||||
|
err := redis.GetClient().EvalSha(
|
||||||
|
c, scriptLoginSha1,
|
||||||
|
[]string{global.KeyGatewayAccessToken, global.KeyGatewayRefreshToken, global.KeyGatewaySession},
|
||||||
|
at,
|
||||||
|
rt,
|
||||||
|
usn,
|
||||||
|
config.Get().Auth.ShortExpire,
|
||||||
|
config.Get().Auth.LongExpire,
|
||||||
|
c.RemoteIP(),
|
||||||
|
c.GetHeader("User-Agent"),
|
||||||
|
).Err()
|
||||||
|
if err != nil {
|
||||||
|
return "", "", utils.ErrorsWrap(err)
|
||||||
|
}
|
||||||
|
c.SetCookie("refresh_token", rt, int(config.Get().Auth.LongExpire), "/", ".hlsq.asia", true, true)
|
||||||
|
|
||||||
|
return at, rt, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
scriptLogoutSha1 string
|
||||||
|
scriptLogout = `
|
||||||
|
local rt_key = KEYS[2] .. ARGV[1]
|
||||||
|
local usn = redis.call("HGET", rt_key, "usn")
|
||||||
|
local at = redis.call("HGET", rt_key, "at")
|
||||||
|
local at_key = KEYS[1] .. at
|
||||||
|
local session_key = KEYS[3] .. usn
|
||||||
|
|
||||||
|
redis.call("DEL", at_key)
|
||||||
|
redis.call("DEL", rt_key)
|
||||||
|
redis.call("SREM", session_key, ARGV[1])
|
||||||
|
|
||||||
|
return 1
|
||||||
|
`
|
||||||
|
)
|
||||||
|
|
||||||
|
func sessionLogout(c *gin.Context, rt string) error {
|
||||||
|
if scriptLogoutSha1 == "" {
|
||||||
|
scriptLogoutSha1 = redis.GetClient().ScriptLoad(c, scriptLogout).Val()
|
||||||
|
}
|
||||||
|
return redis.GetClient().EvalSha(
|
||||||
|
c, scriptLogoutSha1,
|
||||||
|
[]string{global.KeyGatewayAccessToken, global.KeyGatewayRefreshToken, global.KeyGatewaySession},
|
||||||
|
rt,
|
||||||
|
).Err()
|
||||||
|
}
|
||||||
@@ -13,8 +13,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
var GatewaySID string
|
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
sync.WaitGroup
|
sync.WaitGroup
|
||||||
conn socket.ISocketConn // Socket
|
conn socket.ISocketConn // Socket
|
||||||
@@ -25,17 +23,16 @@ type Client struct {
|
|||||||
heartBeat time.Time // 最后一次心跳
|
heartBeat time.Time // 最后一次心跳
|
||||||
|
|
||||||
Status int32 // 状态:0 登陆中 1 正常 2 离线
|
Status int32 // 状态:0 登陆中 1 正常 2 离线
|
||||||
USN string // 用户ID
|
USN int64 // 用户ID
|
||||||
SceneSID string // 场景服ID
|
SceneSID int64 // 场景服ID
|
||||||
InstanceID int32 // 副本ID,副本类型
|
InstanceID int32 // 副本ID,副本类型
|
||||||
UniqueNo string // 副本唯一编号
|
UniqueNo int64 // 副本唯一编号
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewClient(usn string, conn socket.ISocketConn) *Client {
|
func NewClient(conn socket.ISocketConn) *Client {
|
||||||
client := &Client{
|
client := &Client{
|
||||||
USN: usn,
|
|
||||||
conn: conn,
|
conn: conn,
|
||||||
logger: log.GetLogger().Named(fmt.Sprintf("usn:%v", usn)),
|
logger: log.GetLogger(),
|
||||||
heartBeat: time.Now(),
|
heartBeat: time.Now(),
|
||||||
mailChan: make(chan Event, 1024),
|
mailChan: make(chan Event, 1024),
|
||||||
}
|
}
|
||||||
@@ -45,6 +42,11 @@ func NewClient(usn string, conn socket.ISocketConn) *Client {
|
|||||||
return client
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Client) SetUSN(usn int64) {
|
||||||
|
c.USN = usn
|
||||||
|
c.logger = log.GetLogger().Named(fmt.Sprintf("usn:%v", usn))
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Client) Loop() {
|
func (c *Client) Loop() {
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func (c *Client) handle(event Event) {
|
|||||||
if c.Status == 0 {
|
if c.Status == 0 {
|
||||||
c.Status = 1
|
c.Status = 1
|
||||||
UserMgr.Add(c.USN, c)
|
UserMgr.Add(c.USN, c)
|
||||||
redis.GetClient().HSet(c.ctx, fmt.Sprintf(global.KeyGatewayInfo, c.USN), global.HFieldInfoGatewaySID, GatewaySID)
|
redis.GetClient().HSet(c.ctx, fmt.Sprintf(global.KeyGatewayInfo, c.USN), global.HFieldInfoGatewaySID, global.GatewaySID)
|
||||||
c.WriteMessage(ss_pb.MessageID_MESSAGE_ID_LOGIN_SUCCESS, &ss_pb.S2C_LoginSuccess{
|
c.WriteMessage(ss_pb.MessageID_MESSAGE_ID_LOGIN_SUCCESS, &ss_pb.S2C_LoginSuccess{
|
||||||
InstanceID: 1,
|
InstanceID: 1,
|
||||||
})
|
})
|
||||||
@@ -61,7 +61,7 @@ func (c *Client) onEnter(msg *ss_pb.C2S_EnterInstance) {
|
|||||||
}
|
}
|
||||||
resp, err := client.Enter(c.ctx, &grpc_pb.EnterReq{
|
resp, err := client.Enter(c.ctx, &grpc_pb.EnterReq{
|
||||||
USN: c.USN,
|
USN: c.USN,
|
||||||
GatewaySID: GatewaySID,
|
GatewaySID: global.GatewaySID,
|
||||||
InstanceID: msg.InstanceID,
|
InstanceID: msg.InstanceID,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -75,7 +75,7 @@ func (c *Client) onEnter(msg *ss_pb.C2S_EnterInstance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) onLeave() {
|
func (c *Client) onLeave() {
|
||||||
if c.SceneSID == "" {
|
if c.SceneSID == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
client, err := grpc_client.SceneNewClient(c.SceneSID)
|
client, err := grpc_client.SceneNewClient(c.SceneSID)
|
||||||
@@ -94,7 +94,7 @@ func (c *Client) onLeave() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) onAction(msg *ss_pb.C2S_Action) {
|
func (c *Client) onAction(msg *ss_pb.C2S_Action) {
|
||||||
if c.SceneSID == "" {
|
if c.SceneSID == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := grpc_client.SendMessageToScene(c.SceneSID, grpc_client.FunAction, &grpc_pb.ActionReq{
|
if err := grpc_client.SendMessageToScene(c.SceneSID, grpc_client.FunAction, &grpc_pb.ActionReq{
|
||||||
|
|||||||
@@ -8,35 +8,35 @@ import (
|
|||||||
var UserMgr *userManager
|
var UserMgr *userManager
|
||||||
|
|
||||||
type userManager struct {
|
type userManager struct {
|
||||||
userMap map[string]*Client
|
userMap map[int64]*Client
|
||||||
sync.RWMutex
|
sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
UserMgr = &userManager{
|
UserMgr = &userManager{
|
||||||
userMap: make(map[string]*Client),
|
userMap: make(map[int64]*Client),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *userManager) Add(usn string, client *Client) {
|
func (m *userManager) Add(usn int64, client *Client) {
|
||||||
m.Lock()
|
m.Lock()
|
||||||
defer m.Unlock()
|
defer m.Unlock()
|
||||||
m.userMap[usn] = client
|
m.userMap[usn] = client
|
||||||
global.OnlineUsersGauge.Inc()
|
global.OnlineUsersGauge.Inc()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *userManager) Delete(usn string) {
|
func (m *userManager) Delete(usn int64) {
|
||||||
m.Lock()
|
m.Lock()
|
||||||
defer m.Unlock()
|
defer m.Unlock()
|
||||||
delete(m.userMap, usn)
|
delete(m.userMap, usn)
|
||||||
global.OnlineUsersGauge.Dec()
|
global.OnlineUsersGauge.Dec()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *userManager) GetAll() map[string]*Client {
|
func (m *userManager) GetAll() map[int64]*Client {
|
||||||
m.RLock()
|
m.RLock()
|
||||||
defer m.RUnlock()
|
defer m.RUnlock()
|
||||||
|
|
||||||
copyMap := make(map[string]*Client, len(m.userMap))
|
copyMap := make(map[int64]*Client, len(m.userMap))
|
||||||
for k, v := range m.userMap {
|
for k, v := range m.userMap {
|
||||||
copyMap[k] = v
|
copyMap[k] = v
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ func (m *userManager) GetAllInterface() []interface{} {
|
|||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *userManager) GetByUSN(usn string) *Client {
|
func (m *userManager) GetByUSN(usn int64) *Client {
|
||||||
m.RLock()
|
m.RLock()
|
||||||
defer m.RUnlock()
|
defer m.RUnlock()
|
||||||
return m.userMap[usn]
|
return m.userMap[usn]
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -152,7 +153,9 @@ func (l *Login) StartLogin(user *User) {
|
|||||||
|
|
||||||
// CheckToken 校验Token是否有效
|
// CheckToken 校验Token是否有效
|
||||||
func (l *Login) CheckToken(user *User) bool {
|
func (l *Login) CheckToken(user *User) bool {
|
||||||
return redis.GetClient().Get(l.ctx, fmt.Sprintf(global.KeyGatewayAccessToken, user.Cli.USN)).Val() == user.Token
|
usn, _ := redis.GetClient().HGet(context.Background(), global.KeyGatewayAccessToken+user.Token, (&utils.UserSession{}).GetUsnKey()).Int64()
|
||||||
|
user.Cli.SetUSN(usn)
|
||||||
|
return usn > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckOnline 校验是否在线
|
// CheckOnline 校验是否在线
|
||||||
@@ -161,7 +164,7 @@ func (l *Login) CheckOnline(user *User) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// KickUser 把玩家踢下线
|
// KickUser 把玩家踢下线
|
||||||
func (l *Login) KickUser(gatewaySID string, usn string) bool {
|
func (l *Login) KickUser(gatewaySID int64, usn int64) bool {
|
||||||
gc, err := grpc_client.GatewayNewClient(gatewaySID)
|
gc, err := grpc_client.GatewayNewClient(gatewaySID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("KickUser cannot find gateway client: %v, sid: %v", err, gatewaySID)
|
log.Errorf("KickUser cannot find gateway client: %v, sid: %v", err, gatewaySID)
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ func (q *QueueUp) Dequeue() (*client.Client, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetPosition 返回用户前面还有多少人在排队
|
// GetPosition 返回用户前面还有多少人在排队
|
||||||
func (q *QueueUp) GetPosition(usn string) (int64, bool) {
|
func (q *QueueUp) GetPosition(usn int64) (int64, bool) {
|
||||||
val, ok := q.waiting.Load(usn)
|
val, ok := q.waiting.Load(usn)
|
||||||
if !ok {
|
if !ok {
|
||||||
return 0, false
|
return 0, false
|
||||||
@@ -88,7 +88,7 @@ func (q *QueueUp) GetPosition(usn string) (int64, bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RemoveUser 安全移除用户(标记为取消)
|
// RemoveUser 安全移除用户(标记为取消)
|
||||||
func (q *QueueUp) RemoveUser(usn string) bool {
|
func (q *QueueUp) RemoveUser(usn int64) bool {
|
||||||
_, loaded := q.waiting.LoadAndDelete(usn)
|
_, loaded := q.waiting.LoadAndDelete(usn)
|
||||||
return loaded
|
return loaded
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ package http_gateway
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@@ -28,9 +29,11 @@ func ginLogger(logger *zap.SugaredLogger) gin.HandlerFunc {
|
|||||||
path := c.Request.URL.Path
|
path := c.Request.URL.Path
|
||||||
c.Next()
|
c.Next()
|
||||||
cost := time.Since(start)
|
cost := time.Since(start)
|
||||||
|
usn, _ := c.Get("usn")
|
||||||
|
|
||||||
logger.Infof(fmt.Sprintf(
|
logger.Infof(fmt.Sprintf(
|
||||||
"HTTP Method:%v Code:%v Time:%v IP:%v Path:%v",
|
"[usn:%v] Method:%v Code:%v Time:%v IP:%v Path:%v",
|
||||||
|
usn,
|
||||||
c.Request.Method,
|
c.Request.Method,
|
||||||
c.Writer.Status(),
|
c.Writer.Status(),
|
||||||
cost,
|
cost,
|
||||||
@@ -45,6 +48,7 @@ func authJwt() gin.HandlerFunc {
|
|||||||
pList := strings.SplitN(c.Request.URL.Path, "/", 4)
|
pList := strings.SplitN(c.Request.URL.Path, "/", 4)
|
||||||
if len(pList) < 4 || pList[2] == "" {
|
if len(pList) < 4 || pList[2] == "" {
|
||||||
http_resp.JsonNotFound(c)
|
http_resp.JsonNotFound(c)
|
||||||
|
c.Abort()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 如果是Public接口,有Token就读,没有就算了
|
// 如果是Public接口,有Token就读,没有就算了
|
||||||
@@ -60,15 +64,18 @@ func authJwt() gin.HandlerFunc {
|
|||||||
c.Abort()
|
c.Abort()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
claims, err := utils.ParseToken(token, config.Get().Auth.Secret)
|
|
||||||
if err != nil {
|
usn, _ := redis.GetClient().HGet(c, global.KeyGatewayAccessToken+token, (&utils.UserSession{}).GetUsnKey()).Int64()
|
||||||
|
if usn == 0 {
|
||||||
http_resp.JsonUnauthorized(c)
|
http_resp.JsonUnauthorized(c)
|
||||||
c.Abort()
|
c.Abort()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 这里将Header写到请求中,grpc-gateway框架会读取然后传给grpc服务
|
// 这里将Header写到请求中,grpc-gateway框架会读取然后传给grpc服务
|
||||||
c.Request.Header.Set("X-Usn", claims.USN)
|
c.Request.Header.Set("X-Usn", utils.Int64ToString(usn))
|
||||||
|
// 这里写到上下文中,打日志
|
||||||
|
c.Set("usn", usn)
|
||||||
c.Next()
|
c.Next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package http_gateway
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
||||||
@@ -11,7 +12,9 @@ import (
|
|||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
|
"go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin"
|
||||||
"google.golang.org/protobuf/encoding/protojson"
|
"google.golang.org/protobuf/encoding/protojson"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitServeMux() *runtime.ServeMux {
|
func InitServeMux() *runtime.ServeMux {
|
||||||
@@ -47,6 +50,13 @@ func InitRouter() *gin.Engine {
|
|||||||
gin.Recovery(),
|
gin.Recovery(),
|
||||||
ginLogger(log.GetLogger().Named("GIN")),
|
ginLogger(log.GetLogger().Named("GIN")),
|
||||||
cors.New(corsConfig()),
|
cors.New(corsConfig()),
|
||||||
|
otelgin.Middleware(
|
||||||
|
common.KeyDiscoverServiceNameGateway,
|
||||||
|
otelgin.WithSpanNameFormatter(func(c *gin.Context) string {
|
||||||
|
method := strings.ToUpper(c.Request.Method)
|
||||||
|
return method + " " + c.Request.URL.Path
|
||||||
|
}),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
r.HandleMethodNotAllowed = true
|
r.HandleMethodNotAllowed = true
|
||||||
@@ -63,7 +73,7 @@ func InitRouter() *gin.Engine {
|
|||||||
auth.Use(authJwt())
|
auth.Use(authJwt())
|
||||||
|
|
||||||
// 网关
|
// 网关
|
||||||
initBaseRoute(auth)
|
initGatewayPath(auth)
|
||||||
// 用户中心
|
// 用户中心
|
||||||
initUserPath(auth)
|
initUserPath(auth)
|
||||||
// 奇怪的知识-服务端
|
// 奇怪的知识-服务端
|
||||||
@@ -72,14 +82,17 @@ func InitRouter() *gin.Engine {
|
|||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
func initBaseRoute(r *gin.RouterGroup) {
|
func initGatewayPath(r *gin.RouterGroup) {
|
||||||
g := r.Group("/gw")
|
g := r.Group("/" + common.KeyDiscoverServiceNameGateway)
|
||||||
|
|
||||||
g.POST("/open/login", http_handler.Login)
|
g.POST("/open/login", http_handler.Login)
|
||||||
g.POST("/open/refresh_token", http_handler.RefreshToken)
|
g.POST("/open/refresh_token", http_handler.RefreshToken)
|
||||||
|
g.POST("/open/logout", http_handler.Logout)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initUserPath(r *gin.RouterGroup) {
|
func initUserPath(r *gin.RouterGroup) {
|
||||||
g := r.Group("/user")
|
g := r.Group("/" + common.KeyDiscoverServiceNameUser)
|
||||||
|
|
||||||
client, err := grpc_client.UserNewClientLB()
|
client, err := grpc_client.UserNewClientLB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("get user conn failed: %v", err)
|
log.Errorf("get user conn failed: %v", err)
|
||||||
@@ -96,7 +109,8 @@ func initUserPath(r *gin.RouterGroup) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func initQgdzsPath(r *gin.RouterGroup) {
|
func initQgdzsPath(r *gin.RouterGroup) {
|
||||||
g := r.Group("/qgdzs")
|
g := r.Group("/" + common.KeyDiscoverServiceNameQgdzs)
|
||||||
|
|
||||||
client, err := grpc_client.QgdzsNewClientLB()
|
client, err := grpc_client.QgdzsNewClientLB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("get qgdzs conn failed: %v", err)
|
log.Errorf("get qgdzs conn failed: %v", err)
|
||||||
|
|||||||
@@ -33,11 +33,12 @@ func ErrorHandler(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w
|
|||||||
code = http_resp.Failed.Code()
|
code = http_resp.Failed.Code()
|
||||||
msg = http_resp.Failed.Error()
|
msg = http_resp.Failed.Error()
|
||||||
}
|
}
|
||||||
if st.Code() == codes.Unknown ||
|
if st.Code() == codes.Unknown || st.Code() == codes.Unimplemented || st.Code() == codes.NotFound {
|
||||||
st.Code() == codes.Unimplemented ||
|
|
||||||
st.Code() == codes.NotFound {
|
|
||||||
msg = st.Message()
|
msg = st.Message()
|
||||||
}
|
}
|
||||||
|
if st.Code() == codes.NotFound {
|
||||||
|
code = http_resp.NotFound.Code()
|
||||||
|
}
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
w.WriteHeader(grpcCodeToHTTPCode(st.Code()))
|
w.WriteHeader(grpcCodeToHTTPCode(st.Code()))
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/socket"
|
"git.hlsq.asia/mmorpg/service-common/net/socket"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/login"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/login"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@@ -27,16 +25,11 @@ func (g *GatewayWsServer) OnHandShake(conn socket.ISocketConn) socket.Action {
|
|||||||
g.logger.Warnf("token is invalid")
|
g.logger.Warnf("token is invalid")
|
||||||
return socket.Close
|
return socket.Close
|
||||||
}
|
}
|
||||||
claims, err := utils.ParseToken(token, config.Get().Auth.Secret)
|
|
||||||
if err != nil {
|
|
||||||
g.logger.Warnf("token is invalid")
|
|
||||||
return socket.Close
|
|
||||||
}
|
|
||||||
|
|
||||||
cli := client.NewClient(claims.USN, conn)
|
cli := client.NewClient(conn)
|
||||||
conn.SetParam("client", cli)
|
conn.SetParam("client", cli)
|
||||||
if !login.GetLoginQueue().AddToLoginQueue(&login.User{Cli: cli, Token: token}) {
|
if !login.GetLoginQueue().AddToLoginQueue(&login.User{Cli: cli, Token: token}) {
|
||||||
g.logger.Warnf("AddToLoginQueue err, login queue full, usn: %v", claims.USN)
|
g.logger.Warnf("AddToLoginQueue err, login queue full")
|
||||||
return socket.Close
|
return socket.Close
|
||||||
}
|
}
|
||||||
return socket.None
|
return socket.None
|
||||||
@@ -44,7 +37,7 @@ func (g *GatewayWsServer) OnHandShake(conn socket.ISocketConn) socket.Action {
|
|||||||
|
|
||||||
func (g *GatewayWsServer) OnMessage(conn socket.ISocketConn, bytes []byte) socket.Action {
|
func (g *GatewayWsServer) OnMessage(conn socket.ISocketConn, bytes []byte) socket.Action {
|
||||||
cli, ok := conn.GetParam("client").(*client.Client)
|
cli, ok := conn.GetParam("client").(*client.Client)
|
||||||
if !ok || cli.USN == "" || cli.Status != 1 {
|
if !ok || cli.USN == 0 || cli.Status != 1 {
|
||||||
return socket.Close
|
return socket.Close
|
||||||
}
|
}
|
||||||
cli.OnEvent(&client.ClientEvent{Msg: bytes})
|
cli.OnEvent(&client.ClientEvent{Msg: bytes})
|
||||||
@@ -53,7 +46,7 @@ func (g *GatewayWsServer) OnMessage(conn socket.ISocketConn, bytes []byte) socke
|
|||||||
|
|
||||||
func (g *GatewayWsServer) OnPong(conn socket.ISocketConn) {
|
func (g *GatewayWsServer) OnPong(conn socket.ISocketConn) {
|
||||||
cli, ok := conn.GetParam("client").(*client.Client)
|
cli, ok := conn.GetParam("client").(*client.Client)
|
||||||
if !ok || cli.USN == "" {
|
if !ok || cli.USN == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
cli.OnEvent(&client.PongEvent{})
|
cli.OnEvent(&client.PongEvent{})
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ func (ts *TestSuite) SetupSuite() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Auth: &config.AuthConfig{
|
Auth: &config.AuthConfig{
|
||||||
Secret: "test",
|
|
||||||
ShortExpire: 15,
|
ShortExpire: 15,
|
||||||
LongExpire: 10080,
|
LongExpire: 10080,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user