From 709f411f456fff10de6649ad5166f3b65e2401b3 Mon Sep 17 00:00:00 2001 From: walkline Date: Fri, 1 Mar 2024 19:01:33 +0100 Subject: [PATCH] Expose gameserver metrics via HTTP This commit adds functionality to expose gameserver metrics via HTTP. These metrics are consumed by the server-registry and are displayed in the `.tc9 ws ls` command. This enhancement allows for better monitoring and management of game-server instances and enables possibility to implement k8s operator for auto scaling. --- api/proto/v1/servers-registry/registry.proto | 14 +- .../cmd/game-load-balancer/main.go | 3 +- apps/game-load-balancer/session/character.go | 2 +- apps/game-load-balancer/session/chat.go | 10 +- .../cmd/servers-registry/main.go | 1 + apps/servers-registry/repo/game-server.go | 16 + .../repo/game-server_inmem.go | 14 + .../repo/game-server_redis.go | 23 + .../server/registry-server.go | 20 +- apps/servers-registry/service/game-server.go | 33 ++ game-server/azerothcore/Dockerfile | 2 +- game-server/libsidecar/grpc-api.go | 57 +-- game-server/libsidecar/lib.go | 56 ++- game-server/libsidecar/monitoring.c | 16 + game-server/libsidecar/monitoring.go | 91 ++++ game-server/libsidecar/monitoring.h | 28 ++ gen/servers-registry/pb/registry.pb.go | 454 +++++++++++------- go.mod | 17 +- go.sum | 99 +--- shared/config/logging.go | 2 +- shared/healthandmetrics/metrics-reader.go | 23 +- .../healthandmetrics/metrics-reader_test.go | 3 +- shared/healthandmetrics/metrics.go | 35 ++ shared/healthandmetrics/server.go | 10 +- 24 files changed, 697 insertions(+), 332 deletions(-) create mode 100644 game-server/libsidecar/monitoring.c create mode 100644 game-server/libsidecar/monitoring.go create mode 100644 game-server/libsidecar/monitoring.h diff --git a/api/proto/v1/servers-registry/registry.proto b/api/proto/v1/servers-registry/registry.proto index 88fe8bf..1cba3a3 100644 --- a/api/proto/v1/servers-registry/registry.proto +++ b/api/proto/v1/servers-registry/registry.proto @@ -77,12 +77,22 @@ message ListGameServersForRealmRequest { } message GameServerDetailed { + message Diff { + uint32 mean = 1; + uint32 median = 2; + uint32 percentile95 = 3; + uint32 percentile99 = 4; + uint32 max = 5; + }; + string address = 1; string healthAddress = 2; string grpcAddress = 3; uint32 realmID = 4; - repeated uint32 availableMaps = 5; - repeated uint32 assignedMaps = 6; + uint32 activeConnections = 5; + Diff diff = 6; + repeated uint32 availableMaps = 7; + repeated uint32 assignedMaps = 8; } message ListGameServersForRealmResponse { diff --git a/apps/game-load-balancer/cmd/game-load-balancer/main.go b/apps/game-load-balancer/cmd/game-load-balancer/main.go index 16559dd..b4cba5f 100644 --- a/apps/game-load-balancer/cmd/game-load-balancer/main.go +++ b/apps/game-load-balancer/cmd/game-load-balancer/main.go @@ -8,6 +8,7 @@ import ( _ "github.com/go-sql-driver/mysql" "github.com/nats-io/nats.go" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/zerolog/log" "google.golang.org/grpc" @@ -70,7 +71,7 @@ func main() { groupClient := groupService(conf) healthandmetrics.EnableActiveConnectionsMetrics() - healthCheckServer := healthandmetrics.NewServer(conf.HealthCheckPort, true) + healthCheckServer := healthandmetrics.NewServer(conf.HealthCheckPort, promhttp.Handler()) go func() { err = healthCheckServer.ListenAndServe() diff --git a/apps/game-load-balancer/session/character.go b/apps/game-load-balancer/session/character.go index 0104aca..377d77a 100644 --- a/apps/game-load-balancer/session/character.go +++ b/apps/game-load-balancer/session/character.go @@ -108,7 +108,7 @@ func (s *GameSession) CreateCharacter(ctx context.Context, p *packet.Packet) err } go socket.ListenAndProcess(s.ctx) - newCtx, cancel := context.WithTimeout(s.ctx, time.Second*5) + newCtx, cancel := context.WithTimeout(s.ctx, time.Second*20) defer cancel() waitDone := make(chan struct{}) diff --git a/apps/game-load-balancer/session/chat.go b/apps/game-load-balancer/session/chat.go index d86ca4f..ba93c24 100644 --- a/apps/game-load-balancer/session/chat.go +++ b/apps/game-load-balancer/session/chat.go @@ -3,13 +3,13 @@ package session import ( "context" "fmt" - pbGroup "github.com/walkline/ToCloud9/gen/group/pb" "strings" root "github.com/walkline/ToCloud9/apps/game-load-balancer" eBroadcaster "github.com/walkline/ToCloud9/apps/game-load-balancer/events-broadcaster" "github.com/walkline/ToCloud9/apps/game-load-balancer/packet" pbChat "github.com/walkline/ToCloud9/gen/chat/pb" + pbGroup "github.com/walkline/ToCloud9/gen/group/pb" pbGuild "github.com/walkline/ToCloud9/gen/guilds/pb" pbServ "github.com/walkline/ToCloud9/gen/servers-registry/pb" ) @@ -277,6 +277,14 @@ func (s *GameSession) handleCommandMsgListGameServers(ctx context.Context) error s.SendSysMessage(fmt.Sprintf("> Node address: %s.", server.Address)) s.SendSysMessage(fmt.Sprintf(" Available maps: %s.", mapsAvailable)) s.SendSysMessage(fmt.Sprintf(" Assigned maps: %s.", assignedMaps)) + s.SendSysMessage(fmt.Sprintf(" Active connections: %d.", server.ActiveConnections)) + s.SendSysMessage( + fmt.Sprintf( + " Diff (mean, median, 95, 99, max): %dms, %dms, %dms, %dms, %dms.", + server.Diff.Mean, server.Diff.Median, server.Diff.Percentile95, + server.Diff.Percentile99, server.Diff.Max, + ), + ) if isCurrentlyUsing { s.SendSysMessage(" You are |cff4CFF00connected |rto this one.") diff --git a/apps/servers-registry/cmd/servers-registry/main.go b/apps/servers-registry/cmd/servers-registry/main.go index 8532416..261e93b 100644 --- a/apps/servers-registry/cmd/servers-registry/main.go +++ b/apps/servers-registry/cmd/servers-registry/main.go @@ -77,6 +77,7 @@ func main() { mainContext, repo.NewGameServerRedisRepo(rdb), healthChecker, + metricsConsumer, binpack.NewBinPackBalancer(binpack.DefaultMapsWeight), // TODO: implement providing custom maps weight list. events.NewServerRegistryProducerNatsJSON(nc, "0.0.1"), supportedRealms, diff --git a/apps/servers-registry/repo/game-server.go b/apps/servers-registry/repo/game-server.go index 2be59e0..05e2354 100644 --- a/apps/servers-registry/repo/game-server.go +++ b/apps/servers-registry/repo/game-server.go @@ -5,6 +5,14 @@ import ( "sort" ) +type DiffData struct { + Mean uint32 + Median uint32 + Percentile95 uint32 + Percentile99 uint32 + Max uint32 +} + type GameServer struct { ID string Address string @@ -13,6 +21,9 @@ type GameServer struct { RealmID uint32 AvailableMaps []uint32 + ActiveConnections uint32 + Diff DiffData + // AssignedMapsToHandle list of maps that loadbalancer algorithm assigned for this server. AssignedMapsToHandle []uint32 @@ -26,6 +37,10 @@ func (g *GameServer) HealthCheckAddress() string { return g.HealthCheckAddr } +func (g *GameServer) MetricsAddress() string { + return g.HealthCheckAddr +} + func (g *GameServer) CanHandleMap(id uint32) bool { i := sort.Search(len(g.AssignedMapsToHandle), func(i int) bool { return g.AssignedMapsToHandle[i] >= id }) // item exists @@ -55,6 +70,7 @@ func (g *GameServer) Copy() GameServer { type GameServerRepo interface { Upsert(context.Context, *GameServer) error + Update(ctx context.Context, id string, f func(*GameServer) *GameServer) error Remove(ctx context.Context, id string) error ListByRealm(ctx context.Context, realmID uint32) ([]GameServer, error) One(ctx context.Context, id string) (*GameServer, error) diff --git a/apps/servers-registry/repo/game-server_inmem.go b/apps/servers-registry/repo/game-server_inmem.go index 8a1c62c..ca4069e 100644 --- a/apps/servers-registry/repo/game-server_inmem.go +++ b/apps/servers-registry/repo/game-server_inmem.go @@ -27,6 +27,20 @@ func (g *gameServerInMemRepo) Upsert(ctx context.Context, server *GameServer) er return nil } +func (g *gameServerInMemRepo) Update(ctx context.Context, id string, f func(*GameServer) *GameServer) error { + g.mutex.Lock() + defer g.mutex.Unlock() + + for i := range g.storage { + if g.storage[i].ID == id { + g.storage[i] = *f(&g.storage[i]) + return nil + } + } + + return nil +} + func (g *gameServerInMemRepo) Remove(ctx context.Context, id string) error { g.mutex.Lock() defer g.mutex.Unlock() diff --git a/apps/servers-registry/repo/game-server_redis.go b/apps/servers-registry/repo/game-server_redis.go index 3789c65..adfcdfb 100644 --- a/apps/servers-registry/repo/game-server_redis.go +++ b/apps/servers-registry/repo/game-server_redis.go @@ -46,6 +46,29 @@ func (g *gameServerRedisRepo) Upsert(ctx context.Context, server *GameServer) er return nil } +func (g *gameServerRedisRepo) Update(ctx context.Context, id string, f func(*GameServer) *GameServer) error { + res := g.rdb.Get(ctx, g.key(id)) + if res.Err() != nil { + return res.Err() + } + + v := &GameServer{} + err := json.Unmarshal([]byte(res.Val()), v) + if err != nil { + return err + } + + newV := f(v) + d, err := json.Marshal(newV) + if err != nil { + return err + } + + key := g.key(newV.ID) + status := g.rdb.Set(ctx, key, d, 0) + return status.Err() +} + func (g *gameServerRedisRepo) Remove(ctx context.Context, id string) error { key := g.key(id) res := g.rdb.Get(ctx, key) diff --git a/apps/servers-registry/server/registry-server.go b/apps/servers-registry/server/registry-server.go index c84c021..8bd0cbd 100644 --- a/apps/servers-registry/server/registry-server.go +++ b/apps/servers-registry/server/registry-server.go @@ -89,12 +89,20 @@ func (s *serversRegistry) ListGameServersForRealm(ctx context.Context, request * respServers := make([]*pb.GameServerDetailed, len(servers)) for i := range servers { respServers[i] = &pb.GameServerDetailed{ - Address: servers[i].Address, - HealthAddress: servers[i].HealthCheckAddr, - GrpcAddress: servers[i].GRPCAddress, - RealmID: servers[i].RealmID, - AvailableMaps: servers[i].AvailableMaps, - AssignedMaps: servers[i].AssignedMapsToHandle, + Address: servers[i].Address, + HealthAddress: servers[i].HealthCheckAddr, + GrpcAddress: servers[i].GRPCAddress, + RealmID: servers[i].RealmID, + ActiveConnections: servers[i].ActiveConnections, + AvailableMaps: servers[i].AvailableMaps, + AssignedMaps: servers[i].AssignedMapsToHandle, + Diff: &pb.GameServerDetailed_Diff{ + Mean: servers[i].Diff.Mean, + Median: servers[i].Diff.Median, + Percentile95: servers[i].Diff.Percentile95, + Percentile99: servers[i].Diff.Percentile99, + Max: servers[i].Diff.Max, + }, } } diff --git a/apps/servers-registry/service/game-server.go b/apps/servers-registry/service/game-server.go index baf5093..c7fa53a 100644 --- a/apps/servers-registry/service/game-server.go +++ b/apps/servers-registry/service/game-server.go @@ -25,6 +25,7 @@ type GameServer interface { type gameServerImpl struct { r repo.GameServerRepo checker healthandmetrics.HealthChecker + metrics healthandmetrics.MetricsConsumer mapBalancer mapbalancing.MapDistributor eProducer events.ServerRegistryProducer } @@ -33,6 +34,7 @@ func NewGameServer( ctx context.Context, r repo.GameServerRepo, checker healthandmetrics.HealthChecker, + metrics healthandmetrics.MetricsConsumer, mapBalancer mapbalancing.MapDistributor, eProducer events.ServerRegistryProducer, supportedRealmIDs []uint32, @@ -40,6 +42,7 @@ func NewGameServer( service := &gameServerImpl{ r: r, checker: checker, + metrics: metrics, mapBalancer: mapBalancer, eProducer: eProducer, } @@ -50,6 +53,12 @@ func NewGameServer( } }) + metrics.AddObserver(func(observable healthandmetrics.MetricsObservable, read *healthandmetrics.MetricsRead) { + if gs, ok := observable.(*repo.GameServer); ok { + service.onMetricsUpdate(gs, read) + } + }) + for _, id := range supportedRealmIDs { servers, err := r.ListByRealm(ctx, id) if err != nil { @@ -60,6 +69,11 @@ func NewGameServer( if err = checker.AddHealthCheckObject(&servers[i]); err != nil { return nil, err } + + err = metrics.AddMetricsObservable(&servers[i]) + if err != nil { + return nil, err + } } } @@ -75,6 +89,10 @@ func (g *gameServerImpl) Register(ctx context.Context, server *repo.GameServer) return err } + if err := g.metrics.AddMetricsObservable(server); err != nil { + return err + } + if err := g.r.Upsert(ctx, server); err != nil { return err } @@ -243,3 +261,18 @@ func (g *gameServerImpl) distributeMapsToServers(ctx context.Context, servers [] return distributed, nil } + +func (g *gameServerImpl) onMetricsUpdate(server *repo.GameServer, m *healthandmetrics.MetricsRead) { + err := g.r.Update(context.Background(), server.ID, func(s *repo.GameServer) *repo.GameServer { + s.ActiveConnections = uint32(m.ActiveConnections) + s.Diff.Mean = uint32(m.DelayMean) + s.Diff.Median = uint32(m.DelayMedian) + s.Diff.Percentile99 = uint32(m.Delay99Percentile) + s.Diff.Percentile95 = uint32(m.Delay95Percentile) + s.Diff.Max = uint32(m.DelayMax) + return s + }) + if err != nil { + log.Error().Err(err).Msg("can't update metrics for game server") + } +} diff --git a/game-server/azerothcore/Dockerfile b/game-server/azerothcore/Dockerfile index e522b3b..79242ff 100644 --- a/game-server/azerothcore/Dockerfile +++ b/game-server/azerothcore/Dockerfile @@ -23,7 +23,7 @@ RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100 RUN mkdir repo RUN cd repo && git init && \ git remote add origin https://github.com/walkline/azerothcore-wotlk.git && \ - git fetch --depth 1 origin 6db9abf503ba09a665cc3b65e2d4db1da013da4c && \ + git fetch --depth 1 origin f41e5d6c8d4026f6326fbeaa30f867a9c767d246 && \ git checkout FETCH_HEAD COPY --from=build-sidecar ./go/src/github.com/walkline/ToCloud9/libsidecar.so ./repo/deps/libsidecar/libsidecar.so diff --git a/game-server/libsidecar/grpc-api.go b/game-server/libsidecar/grpc-api.go index f9c1fae..8d4c8a7 100644 --- a/game-server/libsidecar/grpc-api.go +++ b/game-server/libsidecar/grpc-api.go @@ -14,8 +14,8 @@ import ( "github.com/walkline/ToCloud9/gen/worldserver/pb" ) -var grpcReadRequestsQueue = queue.NewHandlersFIFOQueue() -var grpcWriteRequestsQueue = queue.NewHandlersFIFOQueue() +var readRequestsQueue = queue.NewHandlersFIFOQueue() +var writeRequestsQueue = queue.NewHandlersFIFOQueue() func SetupGRPCService(conf *config.Config) (net.Listener, *grpc.Server) { grpcapi.LibVer = libVer @@ -39,59 +39,10 @@ func SetupGRPCService(conf *config.Config) (net.Listener, *grpc.Server) { CanPlayerInteractWithGO: CanPlayerInteractWithGOAndTypeHandler, }, time.Second*5, - grpcReadRequestsQueue, - grpcWriteRequestsQueue, + readRequestsQueue, + writeRequestsQueue, ), ) return lis, grpcServer } - -// TC9ProcessGRPCRequests calls all grpc handlers in queue. -// -//export TC9ProcessGRPCRequests -func TC9ProcessGRPCRequests() { - // Parallel read processing disabled, since goroutines setup time is bigger than benefits for the low amount of requests. - // Can be enabled if read requests increase. - - //// TODO: make this configurable. - //const readGoroutineCount = 4 - // - //// Handle read operations. - //// Read operation is safe to process in parallel. - //wg := sync.WaitGroup{} - //wg.Add(readGoroutineCount) - //for i := 0; i < readGoroutineCount; i++ { - // go func() { - // defer wg.Done() - // - // handler := grpcReadRequestsQueue.Pop() - // for handler != nil { - // handler.Handle() - // handler = grpcReadRequestsQueue.Pop() - // } - // }() - //} - // - //wg.Wait() - // - //// Handle write operations. - //// Since TC is not tread-safe for write operations, we can have only 1 goroutine to process. - //handler := grpcWriteRequestsQueue.Pop() - //for handler != nil { - // handler.Handle() - // handler = grpcWriteRequestsQueue.Pop() - //} - - handler := grpcReadRequestsQueue.Pop() - for handler != nil { - handler.Handle() - handler = grpcReadRequestsQueue.Pop() - } - - handler = grpcWriteRequestsQueue.Pop() - for handler != nil { - handler.Handle() - handler = grpcWriteRequestsQueue.Pop() - } -} diff --git a/game-server/libsidecar/lib.go b/game-server/libsidecar/lib.go index b7b4f73..e285dab 100644 --- a/game-server/libsidecar/lib.go +++ b/game-server/libsidecar/lib.go @@ -8,7 +8,7 @@ import ( "unsafe" "github.com/nats-io/nats.go" - + "github.com/walkline/ToCloud9/gen/servers-registry/pb" "github.com/walkline/ToCloud9/shared/healthandmetrics" ) @@ -46,7 +46,10 @@ func initLib(realmID uint32) (*config.Config, healthandmetrics.Server, ShutdownF log.Fatal().Err(err).Msg("can't connect to the Nats") } - healthCheckServer := healthandmetrics.NewServer(cfg.HealthCheckPort, false) + healthandmetrics.EnableActiveConnectionsMetrics() + healthandmetrics.EnableDelayMetrics() + + healthCheckServer := healthandmetrics.NewServer(cfg.HealthCheckPort, monitoringHttpHandler()) go healthCheckServer.ListenAndServe() natsConsumer := SetupEventsListener(nc, realmID, log) @@ -165,6 +168,55 @@ func TC9GracefulShutdown() { shutdownFunc() } +// TC9ProcessGRPCOrHTTPRequests calls all grpc or http handlers in queue. +// +//export TC9ProcessGRPCOrHTTPRequests +func TC9ProcessGRPCOrHTTPRequests() { + // Parallel read processing disabled, since goroutines setup time is bigger than benefits for the low amount of requests. + // Can be enabled if read requests increase. + + //// TODO: make this configurable. + //const readGoroutineCount = 4 + // + //// Handle read operations. + //// Read operation is safe to process in parallel. + //wg := sync.WaitGroup{} + //wg.Add(readGoroutineCount) + //for i := 0; i < readGoroutineCount; i++ { + // go func() { + // defer wg.Done() + // + // handler := readRequestsQueue.Pop() + // for handler != nil { + // handler.Handle() + // handler = readRequestsQueue.Pop() + // } + // }() + //} + // + //wg.Wait() + // + //// Handle write operations. + //// Since TC is not tread-safe for write operations, we can have only 1 goroutine to process. + //handler := writeRequestsQueue.Pop() + //for handler != nil { + // handler.Handle() + // handler = writeRequestsQueue.Pop() + //} + + handler := readRequestsQueue.Pop() + for handler != nil { + handler.Handle() + handler = readRequestsQueue.Pop() + } + + handler = writeRequestsQueue.Pop() + for handler != nil { + handler.Handle() + handler = writeRequestsQueue.Pop() + } +} + // TC9ReadyToAcceptPlayersFromMaps notifies servers registry that this server // loaded maps related data and ready to accept players from those maps. // diff --git a/game-server/libsidecar/monitoring.c b/game-server/libsidecar/monitoring.c new file mode 100644 index 0000000..6d347b3 --- /dev/null +++ b/game-server/libsidecar/monitoring.c @@ -0,0 +1,16 @@ +#include "monitoring.h" + +static MonitoringDataCollectorHandler monitoringDataCollectorHandler; +void SetMonitoringDataCollectorHandler(MonitoringDataCollectorHandler h) { + monitoringDataCollectorHandler = h; +} + +MonitoringDataCollectorResponse CallMonitoringDataCollectorHandler() { + if (monitoringDataCollectorHandler == 0) { + MonitoringDataCollectorResponse resp; + resp.errorCode = MonitoringErrorCodeNoHandler; + return resp; + } + + return monitoringDataCollectorHandler(); +} diff --git a/game-server/libsidecar/monitoring.go b/game-server/libsidecar/monitoring.go new file mode 100644 index 0000000..d327ab9 --- /dev/null +++ b/game-server/libsidecar/monitoring.go @@ -0,0 +1,91 @@ +package main + +/* +#include "monitoring.h" +*/ +import "C" +import ( + "context" + "errors" + "github.com/walkline/ToCloud9/shared/healthandmetrics" + "net/http" + "time" + + "github.com/prometheus/client_golang/prometheus/promhttp" + + "github.com/walkline/ToCloud9/game-server/libsidecar/queue" +) + +// TC9SetMonitoringDataCollectorHandler sets handler for getting data to handle monitoring request. +// +//export TC9SetMonitoringDataCollectorHandler +func TC9SetMonitoringDataCollectorHandler(h C.MonitoringDataCollectorHandler) { + C.SetMonitoringDataCollectorHandler(h) +} + +func monitoringHttpHandler() http.Handler { + promHandler := promhttp.Handler() + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ctx, cancel := context.WithTimeout(r.Context(), time.Second*5) + defer cancel() + + type respType struct { + diffMean int + diffMedian int + diff95Percentile int + diff99Percentile int + diffMax int + activeConnections int + + err error + } + var resp respType + + respChan := make(chan respType, 1) + + readRequestsQueue.Push(queue.HandlerFunc(func() { + res := C.CallMonitoringDataCollectorHandler() + if res.errorCode != C.MonitoringErrorCodeNoError { + respChan <- respType{ + err: errors.New("failed to process monitoring data collection"), + } + close(respChan) + return + } + + respChan <- respType{ + diffMean: int(res.diffMean), + diffMedian: int(res.diffMedian), + diff95Percentile: int(res.diff95Percentile), + diff99Percentile: int(res.diff99Percentile), + diffMax: int(res.diffMaxPercentile), + activeConnections: int(res.connectedPlayers), + err: nil, + } + close(respChan) + })) + + select { + case <-ctx.Done(): + w.WriteHeader(http.StatusGatewayTimeout) + _, _ = w.Write([]byte("timeout")) + return + case resp = <-respChan: + } + + if resp.err != nil { + w.WriteHeader(http.StatusInternalServerError) + _, _ = w.Write([]byte(resp.err.Error())) + return + } + + healthandmetrics.ActiveConnectionsMetrics.Set(float64(resp.activeConnections)) + healthandmetrics.DelayMeanMetrics.Set(float64(resp.diffMean)) + healthandmetrics.DelayMedianMetrics.Set(float64(resp.diffMedian)) + healthandmetrics.Delay95PercentileMetrics.Set(float64(resp.diff95Percentile)) + healthandmetrics.Delay99PercentileMetrics.Set(float64(resp.diff99Percentile)) + healthandmetrics.DelayMaxMetrics.Set(float64(resp.diffMax)) + + promHandler.ServeHTTP(w, r) + }) +} diff --git a/game-server/libsidecar/monitoring.h b/game-server/libsidecar/monitoring.h new file mode 100644 index 0000000..2cd66b4 --- /dev/null +++ b/game-server/libsidecar/monitoring.h @@ -0,0 +1,28 @@ +#ifndef __MONITORING__ +#define __MONITORING__ + +#include +#include +#include + +typedef enum MonitoringErrorCode { + MonitoringErrorCodeNoError = 0, + MonitoringErrorCodeNoHandler = 1, +} MonitoringErrorCode; + +// MonitoringDataCollectorResponse request. +typedef struct { + int errorCode; + uint32_t connectedPlayers; + uint32_t diffMean; + uint32_t diffMedian; + uint32_t diff95Percentile; + uint32_t diff99Percentile; + uint32_t diffMaxPercentile; +} MonitoringDataCollectorResponse; + +typedef MonitoringDataCollectorResponse (*MonitoringDataCollectorHandler)(); +void SetMonitoringDataCollectorHandler(MonitoringDataCollectorHandler h); +MonitoringDataCollectorResponse CallMonitoringDataCollectorHandler(); + +#endif diff --git a/gen/servers-registry/pb/registry.pb.go b/gen/servers-registry/pb/registry.pb.go index e554f1c..cd40d26 100644 --- a/gen/servers-registry/pb/registry.pb.go +++ b/gen/servers-registry/pb/registry.pb.go @@ -470,12 +470,14 @@ type GameServerDetailed struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - HealthAddress string `protobuf:"bytes,2,opt,name=healthAddress,proto3" json:"healthAddress,omitempty"` - GrpcAddress string `protobuf:"bytes,3,opt,name=grpcAddress,proto3" json:"grpcAddress,omitempty"` - RealmID uint32 `protobuf:"varint,4,opt,name=realmID,proto3" json:"realmID,omitempty"` - AvailableMaps []uint32 `protobuf:"varint,5,rep,packed,name=availableMaps,proto3" json:"availableMaps,omitempty"` - AssignedMaps []uint32 `protobuf:"varint,6,rep,packed,name=assignedMaps,proto3" json:"assignedMaps,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + HealthAddress string `protobuf:"bytes,2,opt,name=healthAddress,proto3" json:"healthAddress,omitempty"` + GrpcAddress string `protobuf:"bytes,3,opt,name=grpcAddress,proto3" json:"grpcAddress,omitempty"` + RealmID uint32 `protobuf:"varint,4,opt,name=realmID,proto3" json:"realmID,omitempty"` + ActiveConnections uint32 `protobuf:"varint,5,opt,name=activeConnections,proto3" json:"activeConnections,omitempty"` + Diff *GameServerDetailed_Diff `protobuf:"bytes,6,opt,name=diff,proto3" json:"diff,omitempty"` + AvailableMaps []uint32 `protobuf:"varint,7,rep,packed,name=availableMaps,proto3" json:"availableMaps,omitempty"` + AssignedMaps []uint32 `protobuf:"varint,8,rep,packed,name=assignedMaps,proto3" json:"assignedMaps,omitempty"` } func (x *GameServerDetailed) Reset() { @@ -538,6 +540,20 @@ func (x *GameServerDetailed) GetRealmID() uint32 { return 0 } +func (x *GameServerDetailed) GetActiveConnections() uint32 { + if x != nil { + return x.ActiveConnections + } + return 0 +} + +func (x *GameServerDetailed) GetDiff() *GameServerDetailed_Diff { + if x != nil { + return x.Diff + } + return nil +} + func (x *GameServerDetailed) GetAvailableMaps() []uint32 { if x != nil { return x.AvailableMaps @@ -1218,6 +1234,85 @@ func (x *Server) GetGrpcAddress() string { return "" } +type GameServerDetailed_Diff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mean uint32 `protobuf:"varint,1,opt,name=mean,proto3" json:"mean,omitempty"` + Median uint32 `protobuf:"varint,2,opt,name=median,proto3" json:"median,omitempty"` + Percentile95 uint32 `protobuf:"varint,3,opt,name=percentile95,proto3" json:"percentile95,omitempty"` + Percentile99 uint32 `protobuf:"varint,4,opt,name=percentile99,proto3" json:"percentile99,omitempty"` + Max uint32 `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"` +} + +func (x *GameServerDetailed_Diff) Reset() { + *x = GameServerDetailed_Diff{} + if protoimpl.UnsafeEnabled { + mi := &file_registry_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameServerDetailed_Diff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameServerDetailed_Diff) ProtoMessage() {} + +func (x *GameServerDetailed_Diff) ProtoReflect() protoreflect.Message { + mi := &file_registry_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GameServerDetailed_Diff.ProtoReflect.Descriptor instead. +func (*GameServerDetailed_Diff) Descriptor() ([]byte, []int) { + return file_registry_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *GameServerDetailed_Diff) GetMean() uint32 { + if x != nil { + return x.Mean + } + return 0 +} + +func (x *GameServerDetailed_Diff) GetMedian() uint32 { + if x != nil { + return x.Median + } + return 0 +} + +func (x *GameServerDetailed_Diff) GetPercentile95() uint32 { + if x != nil { + return x.Percentile95 + } + return 0 +} + +func (x *GameServerDetailed_Diff) GetPercentile99() uint32 { + if x != nil { + return x.Percentile99 + } + return 0 +} + +func (x *GameServerDetailed_Diff) GetMax() uint32 { + if x != nil { + return x.Max + } + return 0 +} + var File_registry_proto protoreflect.FileDescriptor var file_registry_proto_rawDesc = []byte{ @@ -1273,7 +1368,7 @@ var file_registry_proto_rawDesc = []byte{ 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x22, 0xda, 0x01, 0x0a, 0x12, 0x47, + 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x22, 0xc8, 0x03, 0x0a, 0x12, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x68, @@ -1282,140 +1377,155 @@ var file_registry_proto_rawDesc = []byte{ 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x12, 0x24, 0x0a, - 0x0d, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4d, - 0x61, 0x70, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4d, - 0x61, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x4d, 0x61, 0x70, 0x73, 0x22, 0x6d, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x12, 0x2c, 0x0a, + 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x64, + 0x69, 0x66, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x12, 0x24, 0x0a, 0x0d, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x61, + 0x70, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4d, 0x61, + 0x70, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x4d, 0x61, 0x70, 0x73, 0x1a, 0x8c, 0x01, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, + 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, + 0x65, 0x61, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x39, 0x35, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x39, 0x35, 0x12, + 0x22, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x39, 0x39, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, + 0x65, 0x39, 0x39, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x03, 0x6d, 0x61, 0x78, 0x22, 0x6d, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x38, 0x0a, 0x0b, 0x67, 0x61, + 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x22, 0x73, 0x0a, 0x1b, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x61, 0x6d, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x70, + 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0a, 0x6d, + 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x22, 0x30, 0x0a, 0x1c, 0x47, 0x61, 0x6d, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x22, 0xb3, 0x01, 0x0a, 0x1b, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, + 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x1a, 0x0a, + 0x08, 0x67, 0x61, 0x6d, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x67, 0x61, 0x6d, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x61, + 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, + 0x6d, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, + 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x40, 0x0a, 0x1c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, + 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x61, 0x70, 0x69, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x1c, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, + 0x73, 0x22, 0x63, 0x0a, 0x1d, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x61, 0x70, 0x69, 0x12, 0x30, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x22, 0x4e, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, + 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, + 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, + 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x22, 0xb4, 0x01, 0x0a, 0x1a, 0x4c, 0x6f, 0x61, 0x64, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x24, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x12, + 0x2c, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7b, 0x0a, + 0x21, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x61, 0x70, 0x69, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x0d, 0x6c, 0x6f, 0x61, + 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x22, 0x5e, 0x0a, 0x06, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, + 0x72, 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xbc, 0x06, 0x0a, 0x16, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x22, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x4d, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x6c, + 0x6d, 0x12, 0x2d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x4d, 0x61, + 0x70, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x47, + 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x4d, 0x61, 0x70, + 0x41, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x65, 0x0a, 0x18, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x23, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x61, 0x6d, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, - 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, - 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x38, 0x0a, 0x0b, - 0x67, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x22, 0x73, 0x0a, 0x1b, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, - 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, - 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x0a, 0x6d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x22, 0x30, 0x0a, 0x1c, 0x47, + 0x6c, 0x6d, 0x12, 0x22, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, + 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, - 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, - 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x22, 0xb3, 0x01, - 0x0a, 0x1b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, - 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6d, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x08, 0x67, 0x61, 0x6d, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, - 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, - 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x40, 0x0a, 0x1c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x1c, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x6c, 0x6d, - 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x61, 0x6c, 0x6d, - 0x49, 0x44, 0x73, 0x22, 0x63, 0x0a, 0x1d, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x30, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x22, 0x4e, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, - 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, - 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x22, 0xb4, 0x01, 0x0a, 0x1a, 0x4c, 0x6f, 0x61, - 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, - 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, - 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x7b, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x61, 0x70, 0x69, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x0d, 0x6c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x22, 0x5e, 0x0a, 0x06, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, - 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x67, 0x72, 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xbc, 0x06, 0x0a, - 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1d, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, - 0x22, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x4d, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x52, 0x65, - 0x61, 0x6c, 0x6d, 0x12, 0x2d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, - 0x4d, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x4d, - 0x61, 0x70, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x61, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x23, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, - 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, - 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x22, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, - 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, - 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, - 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, - 0x14, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, - 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x61, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, - 0x12, 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, - 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x76, + 0x64, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x1f, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, + 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x72, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x52, + 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x46, 0x6f, - 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, - 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x68, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x24, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, - 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, - 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, - 0x65, 0x6e, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x68, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x24, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x64, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x6c, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x65, 0x6e, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1430,7 +1540,7 @@ func file_registry_proto_rawDescGZIP() []byte { return file_registry_proto_rawDescData } -var file_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_registry_proto_goTypes = []interface{}{ (*RegisterGameServerRequest)(nil), // 0: v1.RegisterGameServerRequest (*RegisterGameServerResponse)(nil), // 1: v1.RegisterGameServerResponse @@ -1450,35 +1560,37 @@ var file_registry_proto_goTypes = []interface{}{ (*ListLoadBalancersForRealmRequest)(nil), // 15: v1.ListLoadBalancersForRealmRequest (*LoadBalancerServerDetailed)(nil), // 16: v1.LoadBalancerServerDetailed (*ListLoadBalancersForRealmResponse)(nil), // 17: v1.ListLoadBalancersForRealmResponse - (*Server)(nil), // 18: v1.Server + (*Server)(nil), // 18: v1.Server + (*GameServerDetailed_Diff)(nil), // 19: v1.GameServerDetailed.Diff } var file_registry_proto_depIdxs = []int32{ 18, // 0: v1.AvailableGameServersForMapAndRealmResponse.gameServers:type_name -> v1.Server 18, // 1: v1.RandomGameServerForRealmResponse.gameServer:type_name -> v1.Server - 7, // 2: v1.ListGameServersForRealmResponse.gameServers:type_name -> v1.GameServerDetailed - 18, // 3: v1.LoadBalancerForRealmsResponse.loadBalancers:type_name -> v1.Server - 16, // 4: v1.ListLoadBalancersForRealmResponse.loadBalancers:type_name -> v1.LoadBalancerServerDetailed - 0, // 5: v1.ServersRegistryService.RegisterGameServer:input_type -> v1.RegisterGameServerRequest - 2, // 6: v1.ServersRegistryService.AvailableGameServersForMapAndRealm:input_type -> v1.AvailableGameServersForMapAndRealmRequest - 4, // 7: v1.ServersRegistryService.RandomGameServerForRealm:input_type -> v1.RandomGameServerForRealmRequest - 6, // 8: v1.ServersRegistryService.ListGameServersForRealm:input_type -> v1.ListGameServersForRealmRequest - 9, // 9: v1.ServersRegistryService.GameServerMapsLoaded:input_type -> v1.GameServerMapsLoadedRequest - 11, // 10: v1.ServersRegistryService.RegisterLoadBalancer:input_type -> v1.RegisterLoadBalancerRequest - 13, // 11: v1.ServersRegistryService.LoadBalancerForRealms:input_type -> v1.LoadBalancerForRealmsRequest - 15, // 12: v1.ServersRegistryService.ListLoadBalancersForRealm:input_type -> v1.ListLoadBalancersForRealmRequest - 1, // 13: v1.ServersRegistryService.RegisterGameServer:output_type -> v1.RegisterGameServerResponse - 3, // 14: v1.ServersRegistryService.AvailableGameServersForMapAndRealm:output_type -> v1.AvailableGameServersForMapAndRealmResponse - 5, // 15: v1.ServersRegistryService.RandomGameServerForRealm:output_type -> v1.RandomGameServerForRealmResponse - 8, // 16: v1.ServersRegistryService.ListGameServersForRealm:output_type -> v1.ListGameServersForRealmResponse - 10, // 17: v1.ServersRegistryService.GameServerMapsLoaded:output_type -> v1.GameServerMapsLoadedResponse - 12, // 18: v1.ServersRegistryService.RegisterLoadBalancer:output_type -> v1.RegisterLoadBalancerResponse - 14, // 19: v1.ServersRegistryService.LoadBalancerForRealms:output_type -> v1.LoadBalancerForRealmsResponse - 17, // 20: v1.ServersRegistryService.ListLoadBalancersForRealm:output_type -> v1.ListLoadBalancersForRealmResponse - 13, // [13:21] is the sub-list for method output_type - 5, // [5:13] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 19, // 2: v1.GameServerDetailed.diff:type_name -> v1.GameServerDetailed.Diff + 7, // 3: v1.ListGameServersForRealmResponse.gameServers:type_name -> v1.GameServerDetailed + 18, // 4: v1.LoadBalancerForRealmsResponse.loadBalancers:type_name -> v1.Server + 16, // 5: v1.ListLoadBalancersForRealmResponse.loadBalancers:type_name -> v1.LoadBalancerServerDetailed + 0, // 6: v1.ServersRegistryService.RegisterGameServer:input_type -> v1.RegisterGameServerRequest + 2, // 7: v1.ServersRegistryService.AvailableGameServersForMapAndRealm:input_type -> v1.AvailableGameServersForMapAndRealmRequest + 4, // 8: v1.ServersRegistryService.RandomGameServerForRealm:input_type -> v1.RandomGameServerForRealmRequest + 6, // 9: v1.ServersRegistryService.ListGameServersForRealm:input_type -> v1.ListGameServersForRealmRequest + 9, // 10: v1.ServersRegistryService.GameServerMapsLoaded:input_type -> v1.GameServerMapsLoadedRequest + 11, // 11: v1.ServersRegistryService.RegisterLoadBalancer:input_type -> v1.RegisterLoadBalancerRequest + 13, // 12: v1.ServersRegistryService.LoadBalancerForRealms:input_type -> v1.LoadBalancerForRealmsRequest + 15, // 13: v1.ServersRegistryService.ListLoadBalancersForRealm:input_type -> v1.ListLoadBalancersForRealmRequest + 1, // 14: v1.ServersRegistryService.RegisterGameServer:output_type -> v1.RegisterGameServerResponse + 3, // 15: v1.ServersRegistryService.AvailableGameServersForMapAndRealm:output_type -> v1.AvailableGameServersForMapAndRealmResponse + 5, // 16: v1.ServersRegistryService.RandomGameServerForRealm:output_type -> v1.RandomGameServerForRealmResponse + 8, // 17: v1.ServersRegistryService.ListGameServersForRealm:output_type -> v1.ListGameServersForRealmResponse + 10, // 18: v1.ServersRegistryService.GameServerMapsLoaded:output_type -> v1.GameServerMapsLoadedResponse + 12, // 19: v1.ServersRegistryService.RegisterLoadBalancer:output_type -> v1.RegisterLoadBalancerResponse + 14, // 20: v1.ServersRegistryService.LoadBalancerForRealms:output_type -> v1.LoadBalancerForRealmsResponse + 17, // 21: v1.ServersRegistryService.ListLoadBalancersForRealm:output_type -> v1.ListLoadBalancersForRealmResponse + 14, // [14:22] is the sub-list for method output_type + 6, // [6:14] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_registry_proto_init() } @@ -1715,6 +1827,18 @@ func file_registry_proto_init() { return nil } } + file_registry_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameServerDetailed_Diff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1722,7 +1846,7 @@ func file_registry_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_registry_proto_rawDesc, NumEnums: 0, - NumMessages: 19, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/go.mod b/go.mod index 50c635c..0d9d894 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( github.com/redis/go-redis/v9 v9.0.3 github.com/rs/zerolog v1.23.0 github.com/stretchr/testify v1.8.1 - google.golang.org/grpc v1.43.0 - google.golang.org/protobuf v1.27.1 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.32.0 ) require ( @@ -22,8 +22,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/joho/godotenv v1.5.1 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/nats-io/nats-server/v2 v2.3.4 // indirect @@ -32,12 +31,12 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/stretchr/objx v0.5.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect - google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3 // indirect ) diff --git a/go.sum b/go.sum index ea3c36c..47bc713 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,4 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -8,37 +6,21 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao= github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -50,35 +32,26 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/ilyakaznacheev/cleanenv v1.5.0 h1:0VNZXggJE2OYdXE87bfSSwGxeiGt9moSR2lOrsHHvr4= github.com/ilyakaznacheev/cleanenv v1.5.0/go.mod h1:a5aDzaJrLCQZsazHol1w8InnDcOX0OColm64SlIi6gk= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= @@ -134,7 +107,6 @@ github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -148,7 +120,6 @@ github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3x github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/redis/go-redis/v9 v9.0.3 h1:+7mmR26M0IvyLxGZUHxu4GiBkJkVDid0Un+j4ScYu4k= github.com/redis/go-redis/v9 v9.0.3/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g= github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= @@ -163,14 +134,11 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/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.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -178,39 +146,27 @@ golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 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.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -227,71 +183,50 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3 h1:slmdOY3vp8a7KQbHkL+FLbvbkgMqmXojpFUO/jENuqQ= olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3/go.mod h1:oVgVk4OWVDi43qWBEyGhXgYxt7+ED4iYNpTngSLX2Iw= diff --git a/shared/config/logging.go b/shared/config/logging.go index fb49d5d..fd10ce2 100644 --- a/shared/config/logging.go +++ b/shared/config/logging.go @@ -33,7 +33,7 @@ func (l Logging) Logger() zerolog.Logger { TimeFormat: "15:04:05.000", }).Level(l.LogLevel) case LoggingFormatJSON: - log.Logger = zerolog.New(os.Stderr).With().Timestamp().Logger() + log.Logger = zerolog.New(os.Stderr).With().Timestamp().Logger().Level(l.LogLevel) } return log.Logger } diff --git a/shared/healthandmetrics/metrics-reader.go b/shared/healthandmetrics/metrics-reader.go index 9952a88..fc0838a 100644 --- a/shared/healthandmetrics/metrics-reader.go +++ b/shared/healthandmetrics/metrics-reader.go @@ -19,6 +19,12 @@ type MetricsObservable interface { type MetricsRead struct { ActiveConnections int + DelayMean int + DelayMedian int + Delay95Percentile int + Delay99Percentile int + DelayMax int + Raw []dto.MetricFamily } @@ -198,8 +204,23 @@ func (h httpPrometheusMetricsReader) Read(observable MetricsObservable) (*Metric Raw: metrics, } for _, result := range metrics { - if result.Name != nil && *result.Name == activeConnectionMetricsName && len(result.Metric) > 0 { + if result.Name == nil || len(result.Metric) == 0 { + continue + } + + switch *result.Name { + case activeConnectionMetricsName: results.ActiveConnections = int(*result.Metric[0].Gauge.Value) + case delayMeanMetricsName: + results.DelayMean = int(*result.Metric[0].Gauge.Value) + case delayMedianMetricsName: + results.DelayMedian = int(*result.Metric[0].Gauge.Value) + case delay95PercentileMetricsName: + results.Delay95Percentile = int(*result.Metric[0].Gauge.Value) + case delay99PercentileMetricsName: + results.Delay99Percentile = int(*result.Metric[0].Gauge.Value) + case delayMaxMetricsName: + results.DelayMax = int(*result.Metric[0].Gauge.Value) } } diff --git a/shared/healthandmetrics/metrics-reader_test.go b/shared/healthandmetrics/metrics-reader_test.go index fc3d906..b175b6f 100644 --- a/shared/healthandmetrics/metrics-reader_test.go +++ b/shared/healthandmetrics/metrics-reader_test.go @@ -5,6 +5,7 @@ import ( "testing" "time" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/stretchr/testify/assert" ) @@ -15,7 +16,7 @@ func (o observable) MetricsAddress() string { } func Test_httpPrometheusMetricsReader_Read(t *testing.T) { - server := NewServer("9132", true) + server := NewServer("9132", promhttp.Handler()) go server.ListenAndServe() defer server.Shutdown(context.Background()) diff --git a/shared/healthandmetrics/metrics.go b/shared/healthandmetrics/metrics.go index d39fc46..02f81a9 100644 --- a/shared/healthandmetrics/metrics.go +++ b/shared/healthandmetrics/metrics.go @@ -15,3 +15,38 @@ func EnableActiveConnectionsMetrics() { Help: "The number of active connections", }) } + +const delayMeanMetricsName = "delay_mean" +const delayMedianMetricsName = "delay_median" +const delay95PercentileMetricsName = "delay_95_percentile" +const delay99PercentileMetricsName = "delay_99_percentile" +const delayMaxMetricsName = "delay_max" + +var DelayMeanMetrics prometheus.Gauge +var DelayMedianMetrics prometheus.Gauge +var Delay95PercentileMetrics prometheus.Gauge +var Delay99PercentileMetrics prometheus.Gauge +var DelayMaxMetrics prometheus.Gauge + +func EnableDelayMetrics() { + DelayMeanMetrics = promauto.NewGauge(prometheus.GaugeOpts{ + Name: delayMeanMetricsName, + Help: "The mean delay in ms", + }) + DelayMedianMetrics = promauto.NewGauge(prometheus.GaugeOpts{ + Name: delayMedianMetricsName, + Help: "The median delay in ms", + }) + Delay95PercentileMetrics = promauto.NewGauge(prometheus.GaugeOpts{ + Name: delay95PercentileMetricsName, + Help: "The 95 percentile delay in ms", + }) + Delay99PercentileMetrics = promauto.NewGauge(prometheus.GaugeOpts{ + Name: delay99PercentileMetricsName, + Help: "The 99 percentile delay in ms", + }) + DelayMaxMetrics = promauto.NewGauge(prometheus.GaugeOpts{ + Name: delayMaxMetricsName, + Help: "The max delay in ms", + }) +} diff --git a/shared/healthandmetrics/server.go b/shared/healthandmetrics/server.go index 4b9865f..9b8e4d3 100644 --- a/shared/healthandmetrics/server.go +++ b/shared/healthandmetrics/server.go @@ -3,8 +3,6 @@ package healthandmetrics import ( "context" "net/http" - - "github.com/prometheus/client_golang/prometheus/promhttp" ) var ( @@ -25,14 +23,14 @@ type server struct { port string } -func NewServer(port string, enableMetrics bool) Server { +func NewServer(port string, metricsHandler http.Handler) Server { mux := http.NewServeMux() mux.HandleFunc(HealthCheckURL, func(w http.ResponseWriter, r *http.Request) { w.Write(healthCheckOKPayload) }) - if enableMetrics { - mux.Handle(MetricsURL, promhttp.Handler()) + if metricsHandler != nil { + mux.Handle(MetricsURL, metricsHandler) } return &server{ @@ -44,6 +42,6 @@ func NewServer(port string, enableMetrics bool) Server { } } -func (s server) Port() string { +func (s *server) Port() string { return s.port }