From 0fc4e2cdee0ca22a69677019d7a4c1cb0e5c47c9 Mon Sep 17 00:00:00 2001 From: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> Date: Wed, 25 Jun 2025 10:45:56 -0400 Subject: [PATCH 01/13] support header-based routing Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> --- api/connectclient/client.go | 41 + api/grpcclient/client.go | 71 -- api/server/http2_router.go | 57 -- api/server/http2_router_test.go | 71 -- api/server/router.go | 46 +- api/server/server.go | 34 +- api/server/server_test.go | 5 + connectproto/buf.gen.yaml | 8 + connectproto/buf.lock | 7 + connectproto/buf.yaml | 27 + {proto => connectproto}/pb/xsvm/service.pb.go | 6 +- .../pb/xsvm/xsvmconnect/service.connect.go | 141 ++++ {proto => connectproto}/xsvm/service.proto | 2 +- flake.nix | 1 + go.mod | 6 +- go.sum | 10 +- proto/pb/vm/vm.pb.go | 780 +++++++++--------- proto/pb/vm/vm_grpc.pb.go | 34 +- proto/pb/xsvm/service_grpc.pb.go | 179 ---- proto/vm/vm.proto | 15 +- scripts/lint.sh | 11 +- scripts/protobuf_codegen.sh | 50 +- .../vertex/vertexmock/linearizable_vm.go | 30 +- snow/engine/common/vm.go | 9 +- snow/engine/enginetest/vm.go | 70 +- .../snowman/block/blockmock/chain_vm.go | 30 +- .../engine/snowman/block/blockmock/full_vm.go | 30 +- tests/e2e/vms/xsvm.go | 59 +- utils/resource/usage.go | 21 + vms/avm/vm.go | 2 +- vms/example/xsvm/api/ping.go | 41 +- vms/example/xsvm/vm.go | 27 +- vms/platformvm/vm.go | 2 +- vms/rpcchainvm/vm_client.go | 4 +- vms/rpcchainvm/vm_server.go | 10 +- vms/rpcchainvm/vm_test.go | 58 ++ 36 files changed, 994 insertions(+), 1001 deletions(-) create mode 100644 api/connectclient/client.go delete mode 100644 api/grpcclient/client.go delete mode 100644 api/server/http2_router.go delete mode 100644 api/server/http2_router_test.go create mode 100644 connectproto/buf.gen.yaml create mode 100644 connectproto/buf.lock create mode 100644 connectproto/buf.yaml rename {proto => connectproto}/pb/xsvm/service.pb.go (97%) create mode 100644 connectproto/pb/xsvm/xsvmconnect/service.connect.go rename {proto => connectproto}/xsvm/service.proto (82%) delete mode 100644 proto/pb/xsvm/service_grpc.pb.go diff --git a/api/connectclient/client.go b/api/connectclient/client.go new file mode 100644 index 000000000000..1991db97d559 --- /dev/null +++ b/api/connectclient/client.go @@ -0,0 +1,41 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connectclient + +import ( + "context" + + "connectrpc.com/connect" + + "github.com/ava-labs/avalanchego/api/server" +) + +var _ connect.Interceptor = (*SetRouteHeaderInterceptor)(nil) + +// SetRouteHeaderInterceptor sets the api routing header for connect-rpc +// requests +type SetRouteHeaderInterceptor struct { + Route string +} + +func (s SetRouteHeaderInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, request connect.AnyRequest) (connect.AnyResponse, error) { + request.Header().Set(server.HTTPHeaderRoute, s.Route) + return next(ctx, request) + } +} + +func (s SetRouteHeaderInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { + return func(ctx context.Context, spec connect.Spec) connect.StreamingClientConn { + conn := next(ctx, spec) + conn.RequestHeader().Set(server.HTTPHeaderRoute, s.Route) + return conn + } +} + +func (SetRouteHeaderInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc { + return func(ctx context.Context, conn connect.StreamingHandlerConn) error { + return next(ctx, conn) + } +} diff --git a/api/grpcclient/client.go b/api/grpcclient/client.go deleted file mode 100644 index 31bf0c968040..000000000000 --- a/api/grpcclient/client.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package grpcclient - -import ( - "context" - "fmt" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - - "github.com/ava-labs/avalanchego/ids" -) - -// NewChainClient returns a grpc.ClientConn that sets the chain-id header for -// all requests -func NewChainClient(uri string, chainID ids.ID, opts ...grpc.DialOption) (*grpc.ClientConn, error) { - dialOpts := []grpc.DialOption{ - grpc.WithUnaryInterceptor(SetChainIDHeaderUnaryClientInterceptor(chainID)), - grpc.WithStreamInterceptor(SetChainIDHeaderStreamClientInterceptor(chainID)), - } - - dialOpts = append(dialOpts, opts...) - - conn, err := grpc.NewClient(uri, dialOpts...) - if err != nil { - return nil, fmt.Errorf("failed to initialize chain grpc client: %w", err) - } - - return conn, nil -} - -// SetChainIDHeaderUnaryClientInterceptor sets the chain-id header for unary -// requests -func SetChainIDHeaderUnaryClientInterceptor(chainID ids.ID) grpc.UnaryClientInterceptor { - return func( - ctx context.Context, - method string, - req any, - reply any, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption, - ) error { - ctx = newContextWithChainIDHeader(ctx, chainID) - return invoker(ctx, method, req, reply, cc, opts...) - } -} - -// SetChainIDHeaderStreamClientInterceptor sets the chain-id header for -// streaming requests -func SetChainIDHeaderStreamClientInterceptor(chainID ids.ID) grpc.StreamClientInterceptor { - return func( - ctx context.Context, - desc *grpc.StreamDesc, - cc *grpc.ClientConn, - method string, - streamer grpc.Streamer, - opts ...grpc.CallOption, - ) (grpc.ClientStream, error) { - ctx = newContextWithChainIDHeader(ctx, chainID) - return streamer(ctx, desc, cc, method, opts...) - } -} - -// newContextWithChainHeader sets the chain-id header which the server uses -// to route the client grpc request -func newContextWithChainIDHeader(ctx context.Context, chainID ids.ID) context.Context { - return metadata.AppendToOutgoingContext(ctx, "chain-id", chainID.String()) -} diff --git a/api/server/http2_router.go b/api/server/http2_router.go deleted file mode 100644 index ff630e4d443b..000000000000 --- a/api/server/http2_router.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package server - -import ( - "net/http" - "sync" - - "github.com/ava-labs/avalanchego/ids" -) - -var _ http.Handler = (*http2Router)(nil) - -type http2Router struct { - lock sync.RWMutex - handlers map[string]http.Handler -} - -func newHTTP2Router() *http2Router { - return &http2Router{ - handlers: make(map[string]http.Handler), - } -} - -func (h *http2Router) ServeHTTP(w http.ResponseWriter, r *http.Request) { - // the chain-id header must be set to route the request to the correct chain - // http2 handler - chainID := r.Header.Get("chain-id") - if len(chainID) == 0 { - w.WriteHeader(http.StatusBadRequest) - return - } - - h.lock.RLock() - handler, ok := h.handlers[chainID] - h.lock.RUnlock() - if !ok { - w.WriteHeader(http.StatusNotFound) - return - } - - handler.ServeHTTP(w, r) -} - -func (h *http2Router) Add(chainID ids.ID, handler http.Handler) bool { - h.lock.Lock() - defer h.lock.Unlock() - - chainIDStr := chainID.String() - if _, ok := h.handlers[chainIDStr]; ok { - return false - } - - h.handlers[chainIDStr] = handler - return true -} diff --git a/api/server/http2_router_test.go b/api/server/http2_router_test.go deleted file mode 100644 index 4123206405a7..000000000000 --- a/api/server/http2_router_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package server - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/ava-labs/avalanchego/ids" -) - -func TestHTTP2RouterAdd(t *testing.T) { - require := require.New(t) - h := newHTTP2Router() - handler := http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) - - require.True(h.Add(ids.Empty, handler)) - require.False(h.Add(ids.Empty, handler)) -} - -func TestHTTP2RouterServeHTTP(t *testing.T) { - tests := []struct { - name string - chainIDs []ids.ID - header http.Header - wantCode int - }{ - { - name: "missing chain-id header", - wantCode: http.StatusBadRequest, - }, - { - name: "unknown referenced chain-id", - header: http.Header{ - http.CanonicalHeaderKey("chain-id"): []string{ids.Empty.String()}, - }, - wantCode: http.StatusNotFound, - }, - { - name: "valid handler", - chainIDs: []ids.ID{ids.Empty}, - header: http.Header{ - http.CanonicalHeaderKey("chain-id"): []string{ids.Empty.String()}, - }, - wantCode: http.StatusOK, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require := require.New(t) - - h := newHTTP2Router() - handler := http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) - writer := httptest.NewRecorder() - request := httptest.NewRequest(http.MethodPost, "/", nil) - request.Header = tt.header - - for _, chainID := range tt.chainIDs { - require.True(h.Add(chainID, handler)) - } - - h.ServeHTTP(writer, request) - require.Equal(tt.wantCode, writer.Code) - }) - } -} diff --git a/api/server/router.go b/api/server/router.go index 6adadf608be4..abaec7cbcea4 100644 --- a/api/server/router.go +++ b/api/server/router.go @@ -14,6 +14,8 @@ import ( "github.com/ava-labs/avalanchego/utils/set" ) +const HTTPHeaderRoute = "Avalanche-Api-Route" + var ( errUnknownBaseURL = errors.New("unknown base url") errUnknownEndpoint = errors.New("unknown endpoint") @@ -25,9 +27,13 @@ type router struct { router *mux.Router routeLock sync.Mutex - reservedRoutes set.Set[string] // Reserves routes so that there can't be alias that conflict - aliases map[string][]string // Maps a route to a set of reserved routes - routes map[string]map[string]http.Handler // Maps routes to a handler + reservedRoutes set.Set[string] // Reserves routes so that there can't be alias that conflict + aliases map[string][]string // Maps a route to a set of reserved routes + // headerRoutes contains routes based on http headers + // aliasing is not currently supported + headerRoutes map[string]http.Handler + // legacy url-based routing + routes map[string]map[string]http.Handler // Maps routes to a handler } func newRouter() *router { @@ -35,6 +41,7 @@ func newRouter() *router { router: mux.NewRouter(), reservedRoutes: set.Set[string]{}, aliases: make(map[string][]string), + headerRoutes: make(map[string]http.Handler), routes: make(map[string]map[string]http.Handler), } } @@ -43,7 +50,28 @@ func (r *router) ServeHTTP(writer http.ResponseWriter, request *http.Request) { r.lock.RLock() defer r.lock.RUnlock() - r.router.ServeHTTP(writer, request) + route, ok := request.Header[HTTPHeaderRoute] + if !ok { + // If there is no routing header, fall-back to the legacy path-based + // routing + r.router.ServeHTTP(writer, request) + return + } + + // Request specified the routing header key but did not provide a + // corresponding value + if len(route) != 1 { + writer.WriteHeader(http.StatusBadRequest) + return + } + + handler, ok := r.headerRoutes[route[0]] + if !ok { + writer.WriteHeader(http.StatusNotFound) + return + } + + handler.ServeHTTP(writer, request) } func (r *router) GetHandler(base, endpoint string) (http.Handler, error) { @@ -61,6 +89,16 @@ func (r *router) GetHandler(base, endpoint string) (http.Handler, error) { return handler, nil } +func (r *router) AddHeaderRoute(route string, handler http.Handler) bool { + _, ok := r.headerRoutes[route] + if ok { + return false + } + + r.headerRoutes[route] = handler + return true +} + func (r *router) AddRouter(base, endpoint string, handler http.Handler) error { r.lock.Lock() defer r.lock.Unlock() diff --git a/api/server/server.go b/api/server/server.go index 6bbd0b610467..54211b485da8 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -88,8 +88,7 @@ type server struct { metrics *metrics // Maps endpoints to handlers - router *router - http2Router *http2Router + router *router srv *http.Server @@ -118,19 +117,9 @@ func New( router := newRouter() handler := wrapHandler(router, nodeID, allowedOrigins, allowedHosts) - http2Router := newHTTP2Router() - http2Handler := wrapHandler(http2Router, nodeID, allowedOrigins, allowedHosts) - httpServer := &http.Server{ Handler: h2c.NewHandler( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.ProtoMajor == 2 { - http2Handler.ServeHTTP(w, r) - return - } - - handler.ServeHTTP(w, r) - }), + handler, &http2.Server{ MaxConcurrentStreams: maxConcurrentStreams, }), @@ -151,7 +140,6 @@ func New( tracer: tracer, metrics: m, router: router, - http2Router: http2Router, srv: httpServer, listener: listener, }, nil @@ -163,10 +151,10 @@ func (s *server) Dispatch() error { func (s *server) RegisterChain(chainName string, ctx *snow.ConsensusContext, vm common.VM) { ctx.Lock.Lock() - handlers, err := vm.CreateHandlers(context.TODO()) + pathRouteHandlers, err := vm.CreateHandlers(context.TODO()) ctx.Lock.Unlock() if err != nil { - s.log.Error("failed to create handlers", + s.log.Error("failed to create path route handlers", zap.String("chainName", chainName), zap.Error(err), ) @@ -180,7 +168,7 @@ func (s *server) RegisterChain(chainName string, ctx *snow.ConsensusContext, vm defaultEndpoint := path.Join(constants.ChainAliasPrefix, ctx.ChainID.String()) // Register each endpoint - for extension, handler := range handlers { + for extension, handler := range pathRouteHandlers { // Validate that the route being added is valid // e.g. "/foo" and "" are ok but "\n" is not _, err := url.ParseRequestURI(extension) @@ -199,24 +187,24 @@ func (s *server) RegisterChain(chainName string, ctx *snow.ConsensusContext, vm } ctx.Lock.Lock() - http2Handler, err := vm.CreateHTTP2Handler(context.TODO()) + headerRouteHandler, err := vm.NewHTTPHandler(context.TODO()) ctx.Lock.Unlock() if err != nil { - s.log.Error("failed to create http2 handler", + s.log.Error("failed to create header route handler", zap.String("chainName", chainName), zap.Error(err), ) return } - if http2Handler == nil { + if headerRouteHandler == nil { return } - http2Handler = s.wrapMiddleware(chainName, http2Handler, ctx) - if !s.http2Router.Add(ctx.ChainID, http2Handler) { + headerRouteHandler = s.wrapMiddleware(chainName, headerRouteHandler, ctx) + if !s.router.AddHeaderRoute(ctx.ChainID.String(), headerRouteHandler) { s.log.Error( - "failed to add route to http2 handler", + "failed to add header route", zap.String("chainName", chainName), zap.Error(err), ) diff --git a/api/server/server_test.go b/api/server/server_test.go index 9b9ce22acb87..bb36cfc5eaa7 100644 --- a/api/server/server_test.go +++ b/api/server/server_test.go @@ -60,3 +60,8 @@ func TestRejectMiddleware(t *testing.T) { }) } } + +func TestHTTPHeaderRouteIsCanonical(t *testing.T) { + wantHeaderKey := http.CanonicalHeaderKey(HTTPHeaderRoute) + require.Equal(t, wantHeaderKey, HTTPHeaderRoute) +} diff --git a/connectproto/buf.gen.yaml b/connectproto/buf.gen.yaml new file mode 100644 index 000000000000..4b2593a88c7e --- /dev/null +++ b/connectproto/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: go + out: pb + opt: paths=source_relative + - plugin: connect-go + out: pb + opt: paths=source_relative diff --git a/connectproto/buf.lock b/connectproto/buf.lock new file mode 100644 index 000000000000..28962534c4d5 --- /dev/null +++ b/connectproto/buf.lock @@ -0,0 +1,7 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: prometheus + repository: client-model + commit: 1d56a02d481a412a83b3c4984eb90c2e diff --git a/connectproto/buf.yaml b/connectproto/buf.yaml new file mode 100644 index 000000000000..c333d8a0da3f --- /dev/null +++ b/connectproto/buf.yaml @@ -0,0 +1,27 @@ +version: v1 +name: buf.build/ava-labs/avalanche +build: + excludes: + # for golang we handle prometheus as a buf dep so we exclude it from generate, this proto + # file is required by languages such as rust. + - io/prometheus +breaking: + use: + - FILE +deps: + - buf.build/prometheus/client-model +lint: + use: + - STANDARD + except: + - SERVICE_SUFFIX # service requirement of +Service + - RPC_REQUEST_STANDARD_NAME # explicit +Request naming + - RPC_RESPONSE_STANDARD_NAME # explicit +Response naming + - PACKAGE_VERSION_SUFFIX # versioned naming .v1beta + # allows RPC requests or responses to be google.protobuf.Empty messages. This can be set if you + # want to allow messages to be void forever, that is they will never take any parameters. + rpc_allow_google_protobuf_empty_requests: true + rpc_allow_google_protobuf_empty_responses: true + # allows the same message type to be used for a single RPC's request and response type. + # TODO: this should not be tolerated and if it is only perscriptivly. + rpc_allow_same_request_response: true diff --git a/proto/pb/xsvm/service.pb.go b/connectproto/pb/xsvm/service.pb.go similarity index 97% rename from proto/pb/xsvm/service.pb.go rename to connectproto/pb/xsvm/service.pb.go index 738007b356cc..23bcddb3efe0 100644 --- a/proto/pb/xsvm/service.pb.go +++ b/connectproto/pb/xsvm/service.pb.go @@ -222,11 +222,11 @@ var file_xsvm_service_proto_rawDesc = []byte{ 0x72, 0x65, 0x61, 0x6d, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x2e, 0x78, 0x73, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x78, 0x73, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x28, 0x01, 0x30, 0x01, 0x42, 0x2f, 0x5a, 0x2d, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x28, 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x78, 0x73, 0x76, 0x6d, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, + 0x78, 0x73, 0x76, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/connectproto/pb/xsvm/xsvmconnect/service.connect.go b/connectproto/pb/xsvm/xsvmconnect/service.connect.go new file mode 100644 index 000000000000..1752bfea5c30 --- /dev/null +++ b/connectproto/pb/xsvm/xsvmconnect/service.connect.go @@ -0,0 +1,141 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: xsvm/service.proto + +package xsvmconnect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + xsvm "github.com/ava-labs/avalanchego/connectproto/pb/xsvm" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // PingName is the fully-qualified name of the Ping service. + PingName = "xsvm.Ping" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // PingPingProcedure is the fully-qualified name of the Ping's Ping RPC. + PingPingProcedure = "/xsvm.Ping/Ping" + // PingStreamPingProcedure is the fully-qualified name of the Ping's StreamPing RPC. + PingStreamPingProcedure = "/xsvm.Ping/StreamPing" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + pingServiceDescriptor = xsvm.File_xsvm_service_proto.Services().ByName("Ping") + pingPingMethodDescriptor = pingServiceDescriptor.Methods().ByName("Ping") + pingStreamPingMethodDescriptor = pingServiceDescriptor.Methods().ByName("StreamPing") +) + +// PingClient is a client for the xsvm.Ping service. +type PingClient interface { + Ping(context.Context, *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) + StreamPing(context.Context) *connect.BidiStreamForClient[xsvm.StreamPingRequest, xsvm.StreamPingReply] +} + +// NewPingClient constructs a client for the xsvm.Ping service. By default, it uses the Connect +// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed +// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewPingClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PingClient { + baseURL = strings.TrimRight(baseURL, "/") + return &pingClient{ + ping: connect.NewClient[xsvm.PingRequest, xsvm.PingReply]( + httpClient, + baseURL+PingPingProcedure, + connect.WithSchema(pingPingMethodDescriptor), + connect.WithClientOptions(opts...), + ), + streamPing: connect.NewClient[xsvm.StreamPingRequest, xsvm.StreamPingReply]( + httpClient, + baseURL+PingStreamPingProcedure, + connect.WithSchema(pingStreamPingMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// pingClient implements PingClient. +type pingClient struct { + ping *connect.Client[xsvm.PingRequest, xsvm.PingReply] + streamPing *connect.Client[xsvm.StreamPingRequest, xsvm.StreamPingReply] +} + +// Ping calls xsvm.Ping.Ping. +func (c *pingClient) Ping(ctx context.Context, req *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) { + return c.ping.CallUnary(ctx, req) +} + +// StreamPing calls xsvm.Ping.StreamPing. +func (c *pingClient) StreamPing(ctx context.Context) *connect.BidiStreamForClient[xsvm.StreamPingRequest, xsvm.StreamPingReply] { + return c.streamPing.CallBidiStream(ctx) +} + +// PingHandler is an implementation of the xsvm.Ping service. +type PingHandler interface { + Ping(context.Context, *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) + StreamPing(context.Context, *connect.BidiStream[xsvm.StreamPingRequest, xsvm.StreamPingReply]) error +} + +// NewPingHandler builds an HTTP handler from the service implementation. It returns the path on +// which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewPingHandler(svc PingHandler, opts ...connect.HandlerOption) (string, http.Handler) { + pingPingHandler := connect.NewUnaryHandler( + PingPingProcedure, + svc.Ping, + connect.WithSchema(pingPingMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + pingStreamPingHandler := connect.NewBidiStreamHandler( + PingStreamPingProcedure, + svc.StreamPing, + connect.WithSchema(pingStreamPingMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/xsvm.Ping/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case PingPingProcedure: + pingPingHandler.ServeHTTP(w, r) + case PingStreamPingProcedure: + pingStreamPingHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedPingHandler returns CodeUnimplemented from all methods. +type UnimplementedPingHandler struct{} + +func (UnimplementedPingHandler) Ping(context.Context, *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xsvm.Ping.Ping is not implemented")) +} + +func (UnimplementedPingHandler) StreamPing(context.Context, *connect.BidiStream[xsvm.StreamPingRequest, xsvm.StreamPingReply]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xsvm.Ping.StreamPing is not implemented")) +} diff --git a/proto/xsvm/service.proto b/connectproto/xsvm/service.proto similarity index 82% rename from proto/xsvm/service.proto rename to connectproto/xsvm/service.proto index 5d6329356f59..f5cf2b6bbccc 100644 --- a/proto/xsvm/service.proto +++ b/connectproto/xsvm/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package xsvm; -option go_package = "github.com/ava-labs/avalanchego/proto/pb/xsvm"; +option go_package = "github.com/ava-labs/avalanchego/connectproto/pb/xsvm"; service Ping { rpc Ping(PingRequest) returns (PingReply); diff --git a/flake.nix b/flake.nix index e4a2580520dd..a595e399ff7b 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,7 @@ buf protoc-gen-go protoc-gen-go-grpc + protoc-gen-connect-go # Solidity compiler solc diff --git a/go.mod b/go.mod index 994d4d925800..2d7aaba8a226 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,12 @@ module github.com/ava-labs/avalanchego go 1.23.9 require ( + connectrpc.com/connect v1.18.1 + connectrpc.com/grpcreflect v1.3.0 github.com/DataDog/zstd v1.5.2 github.com/StephenButtolph/canoto v0.17.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.15.3-rc.0 + github.com/ava-labs/coreth v0.15.3-rc.0.0.20250709210608-f3f7ff873b40 github.com/ava-labs/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60 github.com/ava-labs/libevm v1.13.14-0.3.0.rc.1 github.com/btcsuite/btcd/btcutil v1.1.3 @@ -79,6 +81,8 @@ require ( k8s.io/utils v0.0.0-20230726121419-3b25d923346b ) +require github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8 // indirect + require ( github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect diff --git a/go.sum b/go.sum index 4ae552ab05fa..76c1cdfcd61d 100644 --- a/go.sum +++ b/go.sum @@ -35,6 +35,10 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= +connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= +connectrpc.com/grpcreflect v1.3.0 h1:Y4V+ACf8/vOb1XOc251Qun7jMB75gCUNw6llvB9csXc= +connectrpc.com/grpcreflect v1.3.0/go.mod h1:nfloOtCS8VUQOQ1+GTdFzVg2CJo4ZGaat8JIovCtDYs= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -66,8 +70,10 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ava-labs/coreth v0.15.3-rc.0 h1:OD554F6lyPP0y8emTW3ffKoPx7Dnn8tuNP/tD3OQVnA= -github.com/ava-labs/coreth v0.15.3-rc.0/go.mod h1:vDlKR8FRuAtecXepgrZ7NPo5ZNb2LPTh+fb8yfouofA= +github.com/ava-labs/coreth v0.15.3-rc.0.0.20250709210608-f3f7ff873b40 h1:wt8q61uI3E045Ss/1QH8VgV4++jho1dnKd8Cd5TzZAI= +github.com/ava-labs/coreth v0.15.3-rc.0.0.20250709210608-f3f7ff873b40/go.mod h1:lRvQF7FErz3kVMhKOy/sSl4889ZiD77l6jpchjY/zLQ= +github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8 h1:f0ZbAiRE1srMiv/0DuXvPQZwgYbLC9OgAWbQUCMebTE= +github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8/go.mod h1:j6spQFNSBAfcXKt9g0xbObW/8tMlGP4bFjPIsJmDg/o= github.com/ava-labs/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60 h1:EL66gtXOAwR/4KYBjOV03LTWgkEXvLePribLlJNu4g0= github.com/ava-labs/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60/go.mod h1:/7qKobTfbzBu7eSTVaXMTr56yTYk4j2Px6/8G+idxHo= github.com/ava-labs/libevm v1.13.14-0.3.0.rc.1 h1:vBMYo+Iazw0rGTr+cwjkBdh5eadLPlv4ywI4lKye3CA= diff --git a/proto/pb/vm/vm.pb.go b/proto/pb/vm/vm.pb.go index b00357006c9d..4f848f510db8 100644 --- a/proto/pb/vm/vm.pb.go +++ b/proto/pb/vm/vm.pb.go @@ -800,30 +800,31 @@ func (x *CreateHandlersResponse) GetHandlers() []*Handler { return nil } -type CreateHTTP2HandlerResponse struct { +type Handler struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // server_addr is the address of the gRPC server which serves the // HTTP service - ServerAddr string `protobuf:"bytes,1,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"` + ServerAddr string `protobuf:"bytes,2,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"` } -func (x *CreateHTTP2HandlerResponse) Reset() { - *x = CreateHTTP2HandlerResponse{} +func (x *Handler) Reset() { + *x = Handler{} mi := &file_vm_vm_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *CreateHTTP2HandlerResponse) String() string { +func (x *Handler) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateHTTP2HandlerResponse) ProtoMessage() {} +func (*Handler) ProtoMessage() {} -func (x *CreateHTTP2HandlerResponse) ProtoReflect() protoreflect.Message { +func (x *Handler) ProtoReflect() protoreflect.Message { mi := &file_vm_vm_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -835,43 +836,49 @@ func (x *CreateHTTP2HandlerResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateHTTP2HandlerResponse.ProtoReflect.Descriptor instead. -func (*CreateHTTP2HandlerResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use Handler.ProtoReflect.Descriptor instead. +func (*Handler) Descriptor() ([]byte, []int) { return file_vm_vm_proto_rawDescGZIP(), []int{6} } -func (x *CreateHTTP2HandlerResponse) GetServerAddr() string { +func (x *Handler) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +func (x *Handler) GetServerAddr() string { if x != nil { return x.ServerAddr } return "" } -type Handler struct { +type NewHTTPHandlerResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // server_addr is the address of the gRPC server which serves the // HTTP service - ServerAddr string `protobuf:"bytes,2,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"` + ServerAddr string `protobuf:"bytes,1,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"` } -func (x *Handler) Reset() { - *x = Handler{} +func (x *NewHTTPHandlerResponse) Reset() { + *x = NewHTTPHandlerResponse{} mi := &file_vm_vm_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Handler) String() string { +func (x *NewHTTPHandlerResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Handler) ProtoMessage() {} +func (*NewHTTPHandlerResponse) ProtoMessage() {} -func (x *Handler) ProtoReflect() protoreflect.Message { +func (x *NewHTTPHandlerResponse) ProtoReflect() protoreflect.Message { mi := &file_vm_vm_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -883,19 +890,12 @@ func (x *Handler) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Handler.ProtoReflect.Descriptor instead. -func (*Handler) Descriptor() ([]byte, []int) { +// Deprecated: Use NewHTTPHandlerResponse.ProtoReflect.Descriptor instead. +func (*NewHTTPHandlerResponse) Descriptor() ([]byte, []int) { return file_vm_vm_proto_rawDescGZIP(), []int{7} } -func (x *Handler) GetPrefix() string { - if x != nil { - return x.Prefix - } - return "" -} - -func (x *Handler) GetServerAddr() string { +func (x *NewHTTPHandlerResponse) GetServerAddr() string { if x != nil { return x.ServerAddr } @@ -3045,379 +3045,379 @@ var file_vm_vm_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x6d, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, - 0x22, 0x3d, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x32, 0x48, + 0x22, 0x42, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x22, 0x39, 0x0a, 0x16, 0x4e, 0x65, 0x77, 0x48, 0x54, 0x54, 0x50, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x22, - 0x42, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x22, 0x3d, 0x0a, 0x14, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x76, - 0x6d, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x51, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x00, 0x52, 0x0c, 0x70, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x22, 0x29, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x3d, 0x0a, 0x14, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x76, 0x6d, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x51, + 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0c, 0x70, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, + 0x0a, 0x0f, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x0a, + 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x29, 0x0a, + 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, + 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x21, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, + 0x64, 0x22, 0xe4, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x03, 0x65, + 0x72, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, + 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x26, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x50, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x68, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc3, 0x01, 0x0a, - 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, - 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe4, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, - 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x2e, 0x0a, 0x13, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x26, 0x0a, 0x14, - 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x4f, - 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x24, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x0e, + 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x4f, 0x0a, 0x13, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x24, 0x0a, 0x12, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x24, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x99, 0x01, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x64, 0x65, + 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x91, 0x01, 0x0a, + 0x13, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, + 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x64, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, + 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x36, - 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x64, 0x65, - 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x91, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x11, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, + 0x67, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x0c, 0x41, 0x70, - 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, - 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, - 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x69, - 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0xb3, 0x01, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x4e, 0x75, 0x6d, 0x12, 0x26, - 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x52, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x22, - 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6b, 0x73, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6b, - 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x19, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x6d, - 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, - 0x19, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, - 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x03, 0x65, 0x72, 0x72, 0x22, 0x5d, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, - 0x69, 0x6c, 0x79, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, - 0x69, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x7f, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, - 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0xb3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, + 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, + 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, + 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, + 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x35, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6b, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6b, 0x73, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, + 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, + 0x22, 0x5d, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x61, 0x6d, + 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, + 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x22, + 0x51, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, + 0x72, 0x72, 0x22, 0x7f, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, + 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, + 0x65, 0x72, 0x72, 0x22, 0x78, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, + 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, + 0x18, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, + 0x60, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x78, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, - 0x72, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, - 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, - 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x51, 0x0a, - 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4d, - 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, - 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, - 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x03, - 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, - 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x10, 0x03, 0x2a, 0x6b, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x24, - 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, - 0x4e, 0x43, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, - 0x45, 0x44, 0x10, 0x03, 0x2a, 0x5c, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, - 0x41, 0x47, 0x45, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, - 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, - 0x10, 0x02, 0x32, 0xa1, 0x10, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x32, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1e, 0x2e, - 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x32, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, - 0x0c, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e, + 0x72, 0x22, 0x30, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, + 0x72, 0x22, 0x31, 0x0a, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x03, + 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x51, 0x0a, 0x04, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, + 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, + 0x44, 0x45, 0x5f, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x03, 0x2a, 0x65, 0x0a, 0x05, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, + 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, + 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x4f, + 0x50, 0x10, 0x03, 0x2a, 0x6b, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4c, 0x4f, + 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x03, + 0x2a, 0x5c, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x4d, + 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, + 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x1f, 0x0a, + 0x1b, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, + 0x59, 0x4e, 0x43, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x32, 0x99, + 0x10, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, + 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x68, 0x75, + 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, - 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x39, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x2e, 0x76, - 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0d, - 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, - 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x4e, + 0x65, 0x77, 0x48, 0x54, 0x54, 0x50, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x4e, 0x65, 0x77, 0x48, 0x54, + 0x54, 0x50, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x57, + 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x12, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, + 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x17, + 0x2e, 0x76, 0x6d, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x34, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x3b, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, + 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x76, + 0x6d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x11, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x10, 0x41, 0x70, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x17, + 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x39, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x41, 0x70, + 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x12, 0x10, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, + 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x34, 0x0a, 0x06, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6e, + 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, + 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x48, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, + 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x1a, 0x47, + 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x79, 0x1a, 0x26, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, + 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, - 0x0a, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x76, 0x6d, - 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, - 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x41, - 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x2e, 0x76, 0x6d, 0x2e, - 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, - 0x73, 0x69, 0x70, 0x12, 0x10, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, - 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, - 0x06, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, - 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x2e, 0x76, 0x6d, - 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, - 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, - 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4f, 0x6e, - 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x26, 0x2e, - 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, - 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, - 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, - 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, + 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, + 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, + 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x6d, 0x2e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x53, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x70, 0x62, 0x2f, 0x76, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -3445,8 +3445,8 @@ var file_vm_vm_proto_goTypes = []any{ (*SetStateRequest)(nil), // 7: vm.SetStateRequest (*SetStateResponse)(nil), // 8: vm.SetStateResponse (*CreateHandlersResponse)(nil), // 9: vm.CreateHandlersResponse - (*CreateHTTP2HandlerResponse)(nil), // 10: vm.CreateHTTP2HandlerResponse - (*Handler)(nil), // 11: vm.Handler + (*Handler)(nil), // 10: vm.Handler + (*NewHTTPHandlerResponse)(nil), // 11: vm.NewHTTPHandlerResponse (*WaitForEventResponse)(nil), // 12: vm.WaitForEventResponse (*BuildBlockRequest)(nil), // 13: vm.BuildBlockRequest (*BuildBlockResponse)(nil), // 14: vm.BuildBlockResponse @@ -3506,7 +3506,7 @@ var file_vm_vm_proto_depIdxs = []int32{ 48, // 15: vm.InitializeResponse.timestamp:type_name -> google.protobuf.Timestamp 0, // 16: vm.SetStateRequest.state:type_name -> vm.State 48, // 17: vm.SetStateResponse.timestamp:type_name -> google.protobuf.Timestamp - 11, // 18: vm.CreateHandlersResponse.handlers:type_name -> vm.Handler + 10, // 18: vm.CreateHandlersResponse.handlers:type_name -> vm.Handler 2, // 19: vm.WaitForEventResponse.message:type_name -> vm.Message 48, // 20: vm.BuildBlockResponse.timestamp:type_name -> google.protobuf.Timestamp 48, // 21: vm.ParseBlockResponse.timestamp:type_name -> google.protobuf.Timestamp @@ -3528,7 +3528,7 @@ var file_vm_vm_proto_depIdxs = []int32{ 7, // 37: vm.VM.SetState:input_type -> vm.SetStateRequest 50, // 38: vm.VM.Shutdown:input_type -> google.protobuf.Empty 50, // 39: vm.VM.CreateHandlers:input_type -> google.protobuf.Empty - 50, // 40: vm.VM.CreateHTTP2Handler:input_type -> google.protobuf.Empty + 50, // 40: vm.VM.NewHTTPHandler:input_type -> google.protobuf.Empty 50, // 41: vm.VM.WaitForEvent:input_type -> google.protobuf.Empty 30, // 42: vm.VM.Connected:input_type -> vm.ConnectedRequest 31, // 43: vm.VM.Disconnected:input_type -> vm.DisconnectedRequest @@ -3559,7 +3559,7 @@ var file_vm_vm_proto_depIdxs = []int32{ 8, // 68: vm.VM.SetState:output_type -> vm.SetStateResponse 50, // 69: vm.VM.Shutdown:output_type -> google.protobuf.Empty 9, // 70: vm.VM.CreateHandlers:output_type -> vm.CreateHandlersResponse - 10, // 71: vm.VM.CreateHTTP2Handler:output_type -> vm.CreateHTTP2HandlerResponse + 11, // 71: vm.VM.NewHTTPHandler:output_type -> vm.NewHTTPHandlerResponse 12, // 72: vm.VM.WaitForEvent:output_type -> vm.WaitForEventResponse 50, // 73: vm.VM.Connected:output_type -> google.protobuf.Empty 50, // 74: vm.VM.Disconnected:output_type -> google.protobuf.Empty diff --git a/proto/pb/vm/vm_grpc.pb.go b/proto/pb/vm/vm_grpc.pb.go index 66ccefd6158a..7f243ca9cf90 100644 --- a/proto/pb/vm/vm_grpc.pb.go +++ b/proto/pb/vm/vm_grpc.pb.go @@ -24,7 +24,7 @@ const ( VM_SetState_FullMethodName = "/vm.VM/SetState" VM_Shutdown_FullMethodName = "/vm.VM/Shutdown" VM_CreateHandlers_FullMethodName = "/vm.VM/CreateHandlers" - VM_CreateHTTP2Handler_FullMethodName = "/vm.VM/CreateHTTP2Handler" + VM_NewHTTPHandler_FullMethodName = "/vm.VM/NewHTTPHandler" VM_WaitForEvent_FullMethodName = "/vm.VM/WaitForEvent" VM_Connected_FullMethodName = "/vm.VM/Connected" VM_Disconnected_FullMethodName = "/vm.VM/Disconnected" @@ -65,9 +65,10 @@ type VMClient interface { SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*SetStateResponse, error) // Shutdown is called when the node is shutting down. Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Creates the HTTP handlers for custom chain network calls. + // Creates the HTTP handlers for custom chain network calls. Requests are routed based on the specified path. CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) - CreateHTTP2Handler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHTTP2HandlerResponse, error) + // Creates the HTTP handler for custom chain network calls. Requests are routed based on the route header. + NewHTTPHandler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewHTTPHandlerResponse, error) // WaitForEvent blocks until receiving the next event from the VM. WaitForEvent(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*WaitForEventResponse, error) Connected(ctx context.Context, in *ConnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -166,9 +167,9 @@ func (c *vMClient) CreateHandlers(ctx context.Context, in *emptypb.Empty, opts . return out, nil } -func (c *vMClient) CreateHTTP2Handler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHTTP2HandlerResponse, error) { - out := new(CreateHTTP2HandlerResponse) - err := c.cc.Invoke(ctx, VM_CreateHTTP2Handler_FullMethodName, in, out, opts...) +func (c *vMClient) NewHTTPHandler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewHTTPHandlerResponse, error) { + out := new(NewHTTPHandlerResponse) + err := c.cc.Invoke(ctx, VM_NewHTTPHandler_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -421,9 +422,10 @@ type VMServer interface { SetState(context.Context, *SetStateRequest) (*SetStateResponse, error) // Shutdown is called when the node is shutting down. Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) - // Creates the HTTP handlers for custom chain network calls. + // Creates the HTTP handlers for custom chain network calls. Requests are routed based on the specified path. CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) - CreateHTTP2Handler(context.Context, *emptypb.Empty) (*CreateHTTP2HandlerResponse, error) + // Creates the HTTP handler for custom chain network calls. Requests are routed based on the route header. + NewHTTPHandler(context.Context, *emptypb.Empty) (*NewHTTPHandlerResponse, error) // WaitForEvent blocks until receiving the next event from the VM. WaitForEvent(context.Context, *emptypb.Empty) (*WaitForEventResponse, error) Connected(context.Context, *ConnectedRequest) (*emptypb.Empty, error) @@ -495,8 +497,8 @@ func (UnimplementedVMServer) Shutdown(context.Context, *emptypb.Empty) (*emptypb func (UnimplementedVMServer) CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateHandlers not implemented") } -func (UnimplementedVMServer) CreateHTTP2Handler(context.Context, *emptypb.Empty) (*CreateHTTP2HandlerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateHTTP2Handler not implemented") +func (UnimplementedVMServer) NewHTTPHandler(context.Context, *emptypb.Empty) (*NewHTTPHandlerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NewHTTPHandler not implemented") } func (UnimplementedVMServer) WaitForEvent(context.Context, *emptypb.Empty) (*WaitForEventResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WaitForEvent not implemented") @@ -661,20 +663,20 @@ func _VM_CreateHandlers_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _VM_CreateHTTP2Handler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _VM_NewHTTPHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(VMServer).CreateHTTP2Handler(ctx, in) + return srv.(VMServer).NewHTTPHandler(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: VM_CreateHTTP2Handler_FullMethodName, + FullMethod: VM_NewHTTPHandler_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VMServer).CreateHTTP2Handler(ctx, req.(*emptypb.Empty)) + return srv.(VMServer).NewHTTPHandler(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } @@ -1171,8 +1173,8 @@ var VM_ServiceDesc = grpc.ServiceDesc{ Handler: _VM_CreateHandlers_Handler, }, { - MethodName: "CreateHTTP2Handler", - Handler: _VM_CreateHTTP2Handler_Handler, + MethodName: "NewHTTPHandler", + Handler: _VM_NewHTTPHandler_Handler, }, { MethodName: "WaitForEvent", diff --git a/proto/pb/xsvm/service_grpc.pb.go b/proto/pb/xsvm/service_grpc.pb.go deleted file mode 100644 index 3a3c2e4cbf00..000000000000 --- a/proto/pb/xsvm/service_grpc.pb.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: xsvm/service.proto - -package xsvm - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - Ping_Ping_FullMethodName = "/xsvm.Ping/Ping" - Ping_StreamPing_FullMethodName = "/xsvm.Ping/StreamPing" -) - -// PingClient is the client API for Ping service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type PingClient interface { - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) - StreamPing(ctx context.Context, opts ...grpc.CallOption) (Ping_StreamPingClient, error) -} - -type pingClient struct { - cc grpc.ClientConnInterface -} - -func NewPingClient(cc grpc.ClientConnInterface) PingClient { - return &pingClient{cc} -} - -func (c *pingClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) { - out := new(PingReply) - err := c.cc.Invoke(ctx, Ping_Ping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pingClient) StreamPing(ctx context.Context, opts ...grpc.CallOption) (Ping_StreamPingClient, error) { - stream, err := c.cc.NewStream(ctx, &Ping_ServiceDesc.Streams[0], Ping_StreamPing_FullMethodName, opts...) - if err != nil { - return nil, err - } - x := &pingStreamPingClient{stream} - return x, nil -} - -type Ping_StreamPingClient interface { - Send(*StreamPingRequest) error - Recv() (*StreamPingReply, error) - grpc.ClientStream -} - -type pingStreamPingClient struct { - grpc.ClientStream -} - -func (x *pingStreamPingClient) Send(m *StreamPingRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *pingStreamPingClient) Recv() (*StreamPingReply, error) { - m := new(StreamPingReply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// PingServer is the server API for Ping service. -// All implementations must embed UnimplementedPingServer -// for forward compatibility -type PingServer interface { - Ping(context.Context, *PingRequest) (*PingReply, error) - StreamPing(Ping_StreamPingServer) error - mustEmbedUnimplementedPingServer() -} - -// UnimplementedPingServer must be embedded to have forward compatible implementations. -type UnimplementedPingServer struct { -} - -func (UnimplementedPingServer) Ping(context.Context, *PingRequest) (*PingReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} -func (UnimplementedPingServer) StreamPing(Ping_StreamPingServer) error { - return status.Errorf(codes.Unimplemented, "method StreamPing not implemented") -} -func (UnimplementedPingServer) mustEmbedUnimplementedPingServer() {} - -// UnsafePingServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PingServer will -// result in compilation errors. -type UnsafePingServer interface { - mustEmbedUnimplementedPingServer() -} - -func RegisterPingServer(s grpc.ServiceRegistrar, srv PingServer) { - s.RegisterService(&Ping_ServiceDesc, srv) -} - -func _Ping_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PingServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Ping_Ping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PingServer).Ping(ctx, req.(*PingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Ping_StreamPing_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(PingServer).StreamPing(&pingStreamPingServer{stream}) -} - -type Ping_StreamPingServer interface { - Send(*StreamPingReply) error - Recv() (*StreamPingRequest, error) - grpc.ServerStream -} - -type pingStreamPingServer struct { - grpc.ServerStream -} - -func (x *pingStreamPingServer) Send(m *StreamPingReply) error { - return x.ServerStream.SendMsg(m) -} - -func (x *pingStreamPingServer) Recv() (*StreamPingRequest, error) { - m := new(StreamPingRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// Ping_ServiceDesc is the grpc.ServiceDesc for Ping service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Ping_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "xsvm.Ping", - HandlerType: (*PingServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Ping", - Handler: _Ping_Ping_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamPing", - Handler: _Ping_StreamPing_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "xsvm/service.proto", -} diff --git a/proto/vm/vm.proto b/proto/vm/vm.proto index d54e95d2f954..2b1b71adbf59 100644 --- a/proto/vm/vm.proto +++ b/proto/vm/vm.proto @@ -19,9 +19,10 @@ service VM { rpc SetState(SetStateRequest) returns (SetStateResponse); // Shutdown is called when the node is shutting down. rpc Shutdown(google.protobuf.Empty) returns (google.protobuf.Empty); - // Creates the HTTP handlers for custom chain network calls. + // Creates the HTTP handlers for custom chain network calls. Requests are routed based on the specified path. rpc CreateHandlers(google.protobuf.Empty) returns (CreateHandlersResponse); - rpc CreateHTTP2Handler(google.protobuf.Empty) returns (CreateHTTP2HandlerResponse); + // Creates the HTTP handler for custom chain network calls. Requests are routed based on the route header. + rpc NewHTTPHandler(google.protobuf.Empty) returns (NewHTTPHandlerResponse); // WaitForEvent blocks until receiving the next event from the VM. rpc WaitForEvent(google.protobuf.Empty) returns (WaitForEventResponse); rpc Connected(ConnectedRequest) returns (google.protobuf.Empty); @@ -161,17 +162,17 @@ message CreateHandlersResponse { repeated Handler handlers = 1; } -message CreateHTTP2HandlerResponse { +message Handler { + string prefix = 1; // server_addr is the address of the gRPC server which serves the // HTTP service - string server_addr = 1; + string server_addr = 2; } -message Handler { - string prefix = 1; +message NewHTTPHandlerResponse { // server_addr is the address of the gRPC server which serves the // HTTP service - string server_addr = 2; + string server_addr = 1; } message WaitForEventResponse { diff --git a/scripts/lint.sh b/scripts/lint.sh index 717c0491c079..81610d63e955 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -41,7 +41,16 @@ function test_golangci_lint { _addlicense_flags=${ADDLICENSE_FLAGS:-"--verify --debug"} function test_license_header { local files=() - while IFS= read -r line; do files+=("$line"); done < <(find . -type f -name '*.go' ! -name '*.pb.go' ! -name 'mock_*.go' ! -name 'mocks_*.go' ! -path './**/*mock/*.go' ! -name '*.canoto.go' ! -name '*.bindings.go') + while IFS= read -r line; do files+=("$line"); done < <( + find . -type f -name '*.go' \ + ! -name '*.pb.go' \ + ! -name '*.connect.go' \ + ! -name 'mock_*.go' \ + ! -name 'mocks_*.go' \ + ! -path './**/*mock/*.go' \ + ! -name '*.canoto.go' \ + ! -name '*.bindings.go' + ) # shellcheck disable=SC2086 go run github.com/palantir/go-license@v1.25.0 \ diff --git a/scripts/protobuf_codegen.sh b/scripts/protobuf_codegen.sh index 7e97c4efc152..c80ca48b9f8d 100755 --- a/scripts/protobuf_codegen.sh +++ b/scripts/protobuf_codegen.sh @@ -30,25 +30,31 @@ if [[ $(protoc-gen-go-grpc --version | cut -f2 -d' ') != "${PROTOC_GEN_GO_GRPC_V exit 255 fi -TARGET=$PWD/proto -if [ -n "${1:-}" ]; then - TARGET="$1" -fi - -# move to api directory -cd "$TARGET" - -echo "Running protobuf fmt..." -buf format -w - -echo "Running protobuf lint check..." -if ! buf lint; then - echo "ERROR: protobuf linter failed" - exit 1 -fi - -echo "Re-generating protobuf..." -if ! buf generate; then - echo "ERROR: protobuf generation failed" - exit 1 -fi +BUF_MODULES=("proto" "connectproto") + +REPO_ROOT=$PWD +for BUF_MODULE in "${BUF_MODULES[@]}"; do + TARGET=$REPO_ROOT/$BUF_MODULE + if [ -n "${1:-}" ]; then + TARGET="$1" + fi + + # move to buf module directory + cd "$TARGET" + + echo "Generating for buf module $BUF_MODULE" + echo "Running protobuf fmt for..." + buf format -w + + echo "Running protobuf lint check..." + if ! buf lint; then + echo "ERROR: protobuf linter failed" + exit 1 + fi + + echo "Re-generating protobuf..." + if ! buf generate; then + echo "ERROR: protobuf generation failed" + exit 1 + fi +done diff --git a/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go b/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go index bba46fd50c2a..f1aad1f68a51 100644 --- a/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go +++ b/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go @@ -134,21 +134,6 @@ func (mr *LinearizableVMMockRecorder) Connected(ctx, nodeID, nodeVersion any) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*LinearizableVM)(nil).Connected), ctx, nodeID, nodeVersion) } -// CreateHTTP2Handler mocks base method. -func (m *LinearizableVM) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHTTP2Handler", ctx) - ret0, _ := ret[0].(http.Handler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateHTTP2Handler indicates an expected call of CreateHTTP2Handler. -func (mr *LinearizableVMMockRecorder) CreateHTTP2Handler(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHTTP2Handler", reflect.TypeOf((*LinearizableVM)(nil).CreateHTTP2Handler), ctx) -} - // CreateHandlers mocks base method. func (m *LinearizableVM) CreateHandlers(arg0 context.Context) (map[string]http.Handler, error) { m.ctrl.T.Helper() @@ -266,6 +251,21 @@ func (mr *LinearizableVMMockRecorder) Linearize(ctx, stopVertexID any) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Linearize", reflect.TypeOf((*LinearizableVM)(nil).Linearize), ctx, stopVertexID) } +// NewHTTPHandler mocks base method. +func (m *LinearizableVM) NewHTTPHandler(ctx context.Context) (http.Handler, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewHTTPHandler", ctx) + ret0, _ := ret[0].(http.Handler) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NewHTTPHandler indicates an expected call of NewHTTPHandler. +func (mr *LinearizableVMMockRecorder) NewHTTPHandler(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHTTPHandler", reflect.TypeOf((*LinearizableVM)(nil).NewHTTPHandler), ctx) +} + // ParseBlock mocks base method. func (m *LinearizableVM) ParseBlock(ctx context.Context, blockBytes []byte) (snowman.Block, error) { m.ctrl.T.Helper() diff --git a/snow/engine/common/vm.go b/snow/engine/common/vm.go index e6152f4cd6ee..f2fe42fc76ac 100644 --- a/snow/engine/common/vm.go +++ b/snow/engine/common/vm.go @@ -64,6 +64,8 @@ type VM interface { // Version returns the version of the VM. Version(context.Context) (string, error) + // Deprecated: implementations should expose apis through NewHTTPHandler. + // // Creates the HTTP handlers for custom chain network calls. // // This exposes handlers that the outside world can use to communicate with @@ -77,9 +79,10 @@ type VM interface { // information about their accounts. CreateHandlers(context.Context) (map[string]http.Handler, error) - // CreateHTTP2Handler returns the http/2 handler to register into the - // avalanchego api server. - CreateHTTP2Handler(ctx context.Context) (http.Handler, error) + // NewHTTPHandler returns the handler to register into the avalanchego http + // server. The server.HTTPHeaderRoute header must be specified with this VM's + // corresponding chain id by clients to route requests to this handler. + NewHTTPHandler(ctx context.Context) (http.Handler, error) // WaitForEvent blocks until either the given context is cancelled, or a message is returned. WaitForEvent(ctx context.Context) (Message, error) diff --git a/snow/engine/enginetest/vm.go b/snow/engine/enginetest/vm.go index ac0610074dbc..8b9c33cdb6b8 100644 --- a/snow/engine/enginetest/vm.go +++ b/snow/engine/enginetest/vm.go @@ -20,19 +20,19 @@ import ( ) var ( - errInitialize = errors.New("unexpectedly called Initialize") - errSetState = errors.New("unexpectedly called SetState") - errShutdown = errors.New("unexpectedly called Shutdown") - errCreateHandlers = errors.New("unexpectedly called CreateHandlers") - errCreateHTTP2Handler = errors.New("unexpectedly called CreateHTTP2Handler") - errHealthCheck = errors.New("unexpectedly called HealthCheck") - errConnected = errors.New("unexpectedly called Connected") - errDisconnected = errors.New("unexpectedly called Disconnected") - errVersion = errors.New("unexpectedly called Version") - errAppRequest = errors.New("unexpectedly called AppRequest") - errAppResponse = errors.New("unexpectedly called AppResponse") - errAppRequestFailed = errors.New("unexpectedly called AppRequestFailed") - errAppGossip = errors.New("unexpectedly called AppGossip") + errInitialize = errors.New("unexpectedly called Initialize") + errSetState = errors.New("unexpectedly called SetState") + errShutdown = errors.New("unexpectedly called Shutdown") + errCreateHandlers = errors.New("unexpectedly called CreateHandlers") + errNewHTTPHandler = errors.New("unexpectedly called NewHTTPHandler") + errHealthCheck = errors.New("unexpectedly called HealthCheck") + errConnected = errors.New("unexpectedly called Connected") + errDisconnected = errors.New("unexpectedly called Disconnected") + errVersion = errors.New("unexpectedly called Version") + errAppRequest = errors.New("unexpectedly called AppRequest") + errAppResponse = errors.New("unexpectedly called AppResponse") + errAppRequestFailed = errors.New("unexpectedly called AppRequestFailed") + errAppGossip = errors.New("unexpectedly called AppGossip") _ common.VM = (*VM)(nil) ) @@ -42,24 +42,24 @@ type VM struct { T *testing.T CantInitialize, CantSetState, - CantShutdown, CantCreateHandlers, CantCreateHTTP2Handler, + CantShutdown, CantCreateHandlers, CantNewHTTPHandler, CantHealthCheck, CantConnected, CantDisconnected, CantVersion, CantAppRequest, CantAppResponse, CantAppGossip, CantAppRequestFailed bool - InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, fxs []*common.Fx, appSender common.AppSender) error - SetStateF func(ctx context.Context, state snow.State) error - ShutdownF func(context.Context) error - CreateHandlersF func(context.Context) (map[string]http.Handler, error) - CreateHTTP2HandlerF func(context.Context) (http.Handler, error) - ConnectedF func(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error - DisconnectedF func(ctx context.Context, nodeID ids.NodeID) error - HealthCheckF func(context.Context) (interface{}, error) - AppRequestF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, msg []byte) error - AppResponseF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error - AppGossipF func(ctx context.Context, nodeID ids.NodeID, msg []byte) error - AppRequestFailedF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, appErr *common.AppError) error - VersionF func(context.Context) (string, error) - WaitForEventF common.Subscription + InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, fxs []*common.Fx, appSender common.AppSender) error + SetStateF func(ctx context.Context, state snow.State) error + ShutdownF func(context.Context) error + CreateHandlersF func(context.Context) (map[string]http.Handler, error) + NewHTTPHandlerF func(context.Context) (http.Handler, error) + ConnectedF func(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error + DisconnectedF func(ctx context.Context, nodeID ids.NodeID) error + HealthCheckF func(context.Context) (interface{}, error) + AppRequestF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, msg []byte) error + AppResponseF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error + AppGossipF func(ctx context.Context, nodeID ids.NodeID, msg []byte) error + AppRequestFailedF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, appErr *common.AppError) error + VersionF func(context.Context) (string, error) + WaitForEventF common.Subscription } func (vm *VM) WaitForEvent(ctx context.Context) (common.Message, error) { @@ -75,6 +75,7 @@ func (vm *VM) Default(cant bool) { vm.CantSetState = cant vm.CantShutdown = cant vm.CantCreateHandlers = cant + vm.CantNewHTTPHandler = cant vm.CantHealthCheck = cant vm.CantAppRequest = cant vm.CantAppRequestFailed = cant @@ -141,7 +142,7 @@ func (vm *VM) Shutdown(ctx context.Context) error { func (vm *VM) CreateHandlers(ctx context.Context) (map[string]http.Handler, error) { if vm.CreateHandlersF != nil { - return vm.CreateHandlersF(ctx) + return vm.CreateHandlers(ctx) } if vm.CantCreateHandlers && vm.T != nil { require.FailNow(vm.T, errCreateHandlers.Error()) @@ -149,14 +150,13 @@ func (vm *VM) CreateHandlers(ctx context.Context) (map[string]http.Handler, erro return nil, nil } -func (vm *VM) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - if vm.CreateHandlersF != nil { - return vm.CreateHTTP2HandlerF(ctx) +func (vm *VM) NewHTTPHandler(ctx context.Context) (http.Handler, error) { + if vm.NewHTTPHandlerF != nil { + return vm.NewHTTPHandlerF(ctx) } - if vm.CantCreateHTTP2Handler && vm.T != nil { - require.FailNow(vm.T, errCreateHTTP2Handler.Error()) + if vm.CantNewHTTPHandler && vm.T != nil { + require.FailNow(vm.T, errNewHTTPHandler.Error()) } - return nil, nil } diff --git a/snow/engine/snowman/block/blockmock/chain_vm.go b/snow/engine/snowman/block/blockmock/chain_vm.go index 071b4fbbfb8b..f6c26e1a6129 100644 --- a/snow/engine/snowman/block/blockmock/chain_vm.go +++ b/snow/engine/snowman/block/blockmock/chain_vm.go @@ -133,21 +133,6 @@ func (mr *ChainVMMockRecorder) Connected(ctx, nodeID, nodeVersion any) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*ChainVM)(nil).Connected), ctx, nodeID, nodeVersion) } -// CreateHTTP2Handler mocks base method. -func (m *ChainVM) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHTTP2Handler", ctx) - ret0, _ := ret[0].(http.Handler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateHTTP2Handler indicates an expected call of CreateHTTP2Handler. -func (mr *ChainVMMockRecorder) CreateHTTP2Handler(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHTTP2Handler", reflect.TypeOf((*ChainVM)(nil).CreateHTTP2Handler), ctx) -} - // CreateHandlers mocks base method. func (m *ChainVM) CreateHandlers(arg0 context.Context) (map[string]http.Handler, error) { m.ctrl.T.Helper() @@ -251,6 +236,21 @@ func (mr *ChainVMMockRecorder) LastAccepted(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastAccepted", reflect.TypeOf((*ChainVM)(nil).LastAccepted), arg0) } +// NewHTTPHandler mocks base method. +func (m *ChainVM) NewHTTPHandler(ctx context.Context) (http.Handler, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewHTTPHandler", ctx) + ret0, _ := ret[0].(http.Handler) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NewHTTPHandler indicates an expected call of NewHTTPHandler. +func (mr *ChainVMMockRecorder) NewHTTPHandler(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHTTPHandler", reflect.TypeOf((*ChainVM)(nil).NewHTTPHandler), ctx) +} + // ParseBlock mocks base method. func (m *ChainVM) ParseBlock(ctx context.Context, blockBytes []byte) (snowman.Block, error) { m.ctrl.T.Helper() diff --git a/snow/engine/snowman/block/blockmock/full_vm.go b/snow/engine/snowman/block/blockmock/full_vm.go index 1a92b550c8a3..d459520ba357 100644 --- a/snow/engine/snowman/block/blockmock/full_vm.go +++ b/snow/engine/snowman/block/blockmock/full_vm.go @@ -149,21 +149,6 @@ func (mr *FullVMMockRecorder) Connected(ctx, nodeID, nodeVersion any) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*FullVM)(nil).Connected), ctx, nodeID, nodeVersion) } -// CreateHTTP2Handler mocks base method. -func (m *FullVM) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHTTP2Handler", ctx) - ret0, _ := ret[0].(http.Handler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateHTTP2Handler indicates an expected call of CreateHTTP2Handler. -func (mr *FullVMMockRecorder) CreateHTTP2Handler(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHTTP2Handler", reflect.TypeOf((*FullVM)(nil).CreateHTTP2Handler), ctx) -} - // CreateHandlers mocks base method. func (m *FullVM) CreateHandlers(arg0 context.Context) (map[string]http.Handler, error) { m.ctrl.T.Helper() @@ -327,6 +312,21 @@ func (mr *FullVMMockRecorder) LastAccepted(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastAccepted", reflect.TypeOf((*FullVM)(nil).LastAccepted), arg0) } +// NewHTTPHandler mocks base method. +func (m *FullVM) NewHTTPHandler(ctx context.Context) (http.Handler, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewHTTPHandler", ctx) + ret0, _ := ret[0].(http.Handler) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NewHTTPHandler indicates an expected call of NewHTTPHandler. +func (mr *FullVMMockRecorder) NewHTTPHandler(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHTTPHandler", reflect.TypeOf((*FullVM)(nil).NewHTTPHandler), ctx) +} + // ParseBlock mocks base method. func (m *FullVM) ParseBlock(ctx context.Context, blockBytes []byte) (snowman.Block, error) { m.ctrl.T.Helper() diff --git a/tests/e2e/vms/xsvm.go b/tests/e2e/vms/xsvm.go index d622f3a241f4..2efa06115002 100644 --- a/tests/e2e/vms/xsvm.go +++ b/tests/e2e/vms/xsvm.go @@ -4,19 +4,24 @@ package vms import ( + "context" + "crypto/tls" "fmt" - "strings" + "net" + "net/http" "time" + "connectrpc.com/connect" "github.com/onsi/ginkgo/v2" "github.com/stretchr/testify/require" "go.uber.org/zap" + "golang.org/x/net/http2" "golang.org/x/sync/errgroup" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" + "github.com/ava-labs/avalanchego/api/connectclient" + "github.com/ava-labs/avalanchego/connectproto/pb/xsvm" + "github.com/ava-labs/avalanchego/connectproto/pb/xsvm/xsvmconnect" "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/proto/pb/xsvm" "github.com/ava-labs/avalanchego/tests/fixture/e2e" "github.com/ava-labs/avalanchego/tests/fixture/subnet" "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" @@ -196,32 +201,42 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { node, err := network.GetNode(nodeID) require.NoError(err) - uri := strings.TrimPrefix(node.URI, "http://") - chainID := network.GetSubnet(subnetAName).Chains[0].ChainID - client, conn, err := api.NewPingClient( - uri, - chainID, - grpc.WithTransportCredentials(insecure.NewCredentials()), + httpClient := &http.Client{ + Transport: &http2.Transport{ + AllowHTTP: true, + DialTLSContext: func(_ context.Context, network, addr string, _ *tls.Config) (net.Conn, error) { + // Skip TLS to use h2c + return net.Dial(network, addr) + }, + }, + } + + chainID := network.GetSubnet(subnetAName).Chains[0].ChainID.String() + client := xsvmconnect.NewPingClient( + httpClient, + node.URI, + connect.WithInterceptors( + connectclient.SetRouteHeaderInterceptor{Route: chainID}, + ), ) - require.NoError(err) - ginkgo.DeferCleanup(func() { - require.NoError(conn.Close()) - }) tc.By("serving unary rpc") msg := "foobar" - reply, err := client.Ping(tc.DefaultContext(), &xsvm.PingRequest{ - Message: msg, - }) + request := &connect.Request[xsvm.PingRequest]{ + Msg: &xsvm.PingRequest{ + Message: msg, + }, + } + + reply, err := client.Ping(tc.DefaultContext(), request) require.NoError(err) - require.Equal(msg, reply.Message) + require.Equal(msg, reply.Msg.Message) tc.By("serving bidirectional streaming rpc") - stream, err := client.StreamPing(tc.DefaultContext()) - require.NoError(err) + stream := client.StreamPing(tc.DefaultContext()) ginkgo.DeferCleanup(func() { - require.NoError(stream.CloseSend()) + require.NoError(stream.CloseRequest()) }) // Stream pings to the server and block until all events are received @@ -246,7 +261,7 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { eg.Go(func() error { for i := 0; i < n; i++ { - reply, err := stream.Recv() + reply, err := stream.Receive() if err != nil { return err } diff --git a/utils/resource/usage.go b/utils/resource/usage.go index 32ffbfe4aa85..833f2de538b5 100644 --- a/utils/resource/usage.go +++ b/utils/resource/usage.go @@ -22,6 +22,7 @@ var ( lnHalf = math.Log(.5) _ Manager = (*manager)(nil) + _ Manager = (*NoManager)(nil) ) type CPUUser interface { @@ -66,6 +67,26 @@ type Manager interface { Shutdown() } +type NoManager struct{} + +func (NoManager) CPUUsage() float64 { + return 0 +} + +func (NoManager) DiskUsage() (read float64, write float64) { + return 0, 0 +} + +func (NoManager) AvailableDiskBytes() uint64 { + return 0 +} + +func (NoManager) TrackProcess(int) {} + +func (NoManager) UntrackProcess(int) {} + +func (NoManager) Shutdown() {} + type manager struct { log logging.Logger processMetrics *metrics diff --git a/vms/avm/vm.go b/vms/avm/vm.go index 406c65b00220..883709151145 100644 --- a/vms/avm/vm.go +++ b/vms/avm/vm.go @@ -317,7 +317,7 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { }, err } -func (*VM) CreateHTTP2Handler(context.Context) (http.Handler, error) { +func (*VM) NewHTTPHandler(context.Context) (http.Handler, error) { return nil, nil } diff --git a/vms/example/xsvm/api/ping.go b/vms/example/xsvm/api/ping.go index f8c901c759e1..3abbc9e5ad3a 100644 --- a/vms/example/xsvm/api/ping.go +++ b/vms/example/xsvm/api/ping.go @@ -9,33 +9,32 @@ import ( "fmt" "io" + "connectrpc.com/connect" "go.uber.org/zap" - "google.golang.org/grpc" - "github.com/ava-labs/avalanchego/api/grpcclient" - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/proto/pb/xsvm" + "github.com/ava-labs/avalanchego/connectproto/pb/xsvm" + "github.com/ava-labs/avalanchego/connectproto/pb/xsvm/xsvmconnect" "github.com/ava-labs/avalanchego/utils/logging" ) -var _ xsvm.PingServer = (*PingService)(nil) +var _ xsvmconnect.PingHandler = (*PingService)(nil) type PingService struct { - xsvm.UnsafePingServer - Log logging.Logger } -func (p *PingService) Ping(_ context.Context, request *xsvm.PingRequest) (*xsvm.PingReply, error) { - p.Log.Debug("ping", zap.String("message", request.Message)) - return &xsvm.PingReply{ - Message: request.Message, - }, nil +func (p *PingService) Ping(_ context.Context, request *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) { + p.Log.Debug("ping", zap.String("message", request.Msg.Message)) + return connect.NewResponse[xsvm.PingReply]( + &xsvm.PingReply{ + Message: request.Msg.Message, + }, + ), nil } -func (p *PingService) StreamPing(server xsvm.Ping_StreamPingServer) error { +func (p *PingService) StreamPing(_ context.Context, server *connect.BidiStream[xsvm.StreamPingRequest, xsvm.StreamPingReply]) error { for { - request, err := server.Recv() + request, err := server.Receive() if errors.Is(err, io.EOF) { // Client closed the send stream return nil @@ -53,17 +52,3 @@ func (p *PingService) StreamPing(server xsvm.Ping_StreamPingServer) error { } } } - -// NewPingClient returns a client for PingService -func NewPingClient( - uri string, - chainID ids.ID, - opts ...grpc.DialOption, -) (xsvm.PingClient, *grpc.ClientConn, error) { - conn, err := grpcclient.NewChainClient(uri, chainID, opts...) - if err != nil { - return nil, nil, err - } - - return xsvm.NewPingClient(conn), conn, nil -} diff --git a/vms/example/xsvm/vm.go b/vms/example/xsvm/vm.go index 99f89e67b2b0..f5bf39c3618a 100644 --- a/vms/example/xsvm/vm.go +++ b/vms/example/xsvm/vm.go @@ -8,18 +8,17 @@ import ( "fmt" "net/http" + "connectrpc.com/grpcreflect" "github.com/gorilla/rpc/v2" "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" + "github.com/ava-labs/avalanchego/connectproto/pb/xsvm/xsvmconnect" "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/versiondb" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/acp118" - "github.com/ava-labs/avalanchego/proto/pb/xsvm" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/consensus/snowman" "github.com/ava-labs/avalanchego/snow/engine/common" @@ -142,7 +141,7 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { server := rpc.NewServer() server.RegisterCodec(json.NewCodec(), "application/json") server.RegisterCodec(json.NewCodec(), "application/json;charset=UTF-8") - api := api.NewServer( + jsonRPCAPI := api.NewServer( vm.chainContext, vm.genesis, vm.db, @@ -151,14 +150,22 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { ) return map[string]http.Handler{ "": server, - }, server.RegisterService(api, constants.XSVMName) + }, server.RegisterService(jsonRPCAPI, constants.XSVMName) } -func (vm *VM) CreateHTTP2Handler(context.Context) (http.Handler, error) { - server := grpc.NewServer() - server.RegisterService(&xsvm.Ping_ServiceDesc, &api.PingService{Log: vm.chainContext.Log}) - reflection.Register(server) - return server, nil +func (vm *VM) NewHTTPHandler(context.Context) (http.Handler, error) { + mux := http.NewServeMux() + + reflectionPattern, reflectionHandler := grpcreflect.NewHandlerV1( + grpcreflect.NewStaticReflector(xsvmconnect.PingName), + ) + mux.Handle(reflectionPattern, reflectionHandler) + + pingService := &api.PingService{Log: vm.chainContext.Log} + pingPath, pingHandler := xsvmconnect.NewPingHandler(pingService) + mux.Handle(pingPath, pingHandler) + + return mux, nil } func (*VM) HealthCheck(context.Context) (interface{}, error) { diff --git a/vms/platformvm/vm.go b/vms/platformvm/vm.go index ead74a7a0947..0b3c4375b133 100644 --- a/vms/platformvm/vm.go +++ b/vms/platformvm/vm.go @@ -453,7 +453,7 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { }, err } -func (*VM) CreateHTTP2Handler(context.Context) (http.Handler, error) { +func (*VM) NewHTTPHandler(context.Context) (http.Handler, error) { return nil, nil } diff --git a/vms/rpcchainvm/vm_client.go b/vms/rpcchainvm/vm_client.go index 0734f978f9de..d9e08146a4ba 100644 --- a/vms/rpcchainvm/vm_client.go +++ b/vms/rpcchainvm/vm_client.go @@ -387,8 +387,8 @@ func (vm *VMClient) CreateHandlers(ctx context.Context) (map[string]http.Handler return handlers, nil } -func (vm *VMClient) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - resp, err := vm.client.CreateHTTP2Handler(ctx, &emptypb.Empty{}) +func (vm *VMClient) NewHTTPHandler(ctx context.Context) (http.Handler, error) { + resp, err := vm.client.NewHTTPHandler(ctx, &emptypb.Empty{}) if err != nil { return nil, err } diff --git a/vms/rpcchainvm/vm_server.go b/vms/rpcchainvm/vm_server.go index 1c8f222763a1..954c68a1b6a1 100644 --- a/vms/rpcchainvm/vm_server.go +++ b/vms/rpcchainvm/vm_server.go @@ -345,22 +345,20 @@ func (vm *VMServer) CreateHandlers(ctx context.Context, _ *emptypb.Empty) (*vmpb return resp, nil } -func (vm *VMServer) CreateHTTP2Handler(ctx context.Context, _ *emptypb.Empty) (*vmpb.CreateHTTP2HandlerResponse, error) { - handler, err := vm.vm.CreateHTTP2Handler(ctx) +func (vm *VMServer) NewHTTPHandler(ctx context.Context, _ *emptypb.Empty) (*vmpb.NewHTTPHandlerResponse, error) { + handler, err := vm.vm.NewHTTPHandler(ctx) if err != nil { return nil, err } - // The vm does not expose an HTTP2 handler if handler == nil { - return &vmpb.CreateHTTP2HandlerResponse{}, nil + return &vmpb.NewHTTPHandlerResponse{}, nil } serverListener, err := grpcutils.NewListener() if err != nil { return nil, err } - server := grpcutils.NewServer() vm.serverCloser.Add(server) httppb.RegisterHTTPServer(server, ghttp.NewServer(handler)) @@ -368,7 +366,7 @@ func (vm *VMServer) CreateHTTP2Handler(ctx context.Context, _ *emptypb.Empty) (* // Start HTTP service go grpcutils.Serve(serverListener, server) - return &vmpb.CreateHTTP2HandlerResponse{ + return &vmpb.NewHTTPHandlerResponse{ ServerAddr: serverListener.Addr().String(), }, nil } diff --git a/vms/rpcchainvm/vm_test.go b/vms/rpcchainvm/vm_test.go index 6041db3689c8..78f7fbb76c23 100644 --- a/vms/rpcchainvm/vm_test.go +++ b/vms/rpcchainvm/vm_test.go @@ -6,6 +6,9 @@ package rpcchainvm import ( "context" "fmt" + "net" + "net/http" + "net/http/httptest" "os" "os/exec" "reflect" @@ -15,10 +18,17 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" + "google.golang.org/grpc" + "google.golang.org/grpc/test/bufconn" + "github.com/ava-labs/avalanchego/api/metrics" + "github.com/ava-labs/avalanchego/snow/engine/enginetest" "github.com/ava-labs/avalanchego/snow/engine/snowman/block" "github.com/ava-labs/avalanchego/snow/engine/snowman/block/blockmock" + "github.com/ava-labs/avalanchego/snow/engine/snowman/block/blocktest" + "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/avalanchego/utils/logging" + "github.com/ava-labs/avalanchego/utils/resource" "github.com/ava-labs/avalanchego/vms/rpcchainvm/grpcutils" "github.com/ava-labs/avalanchego/vms/rpcchainvm/runtime" "github.com/ava-labs/avalanchego/vms/rpcchainvm/runtime/subprocess" @@ -200,3 +210,51 @@ func TestRuntimeSubprocessBootstrap(t *testing.T) { }) } } + +func TestNewHTTPHandler(t *testing.T) { + require := require.New(t) + + grpcServer := grpc.NewServer() + listener := bufconn.Listen(1024) + + serverVM := &blocktest.VM{ + VM: enginetest.VM{ + NewHTTPHandlerF: func(context.Context) (http.Handler, error) { + return http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusOK) + }), nil + }, + }, + } + + server := NewServer(serverVM, utils.NewAtomic[bool](false)) + vmpb.RegisterVMServer(grpcServer, server) + + go func() { + _ = grpcServer.Serve(listener) + }() + + cc, err := grpc.DialContext(context.Background(), "bufnet", + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { + return listener.Dial() + }), + grpc.WithInsecure(), + ) + require.NoError(err) + + client := NewClient( + cc, + runtime.NewManager(), + 123, + resource.NoManager{}, + metrics.NewLabelGatherer(""), + logging.NoLog{}, + ) + + handler, err := client.NewHTTPHandler(context.Background()) + require.NoError(err) + + w := httptest.NewRecorder() + handler.ServeHTTP(w, httptest.NewRequest(http.MethodGet, "/", nil)) + require.Equal(http.StatusOK, w.Code) +} From a8bcd6c85c1cf05393699473bdd2bd341459dec5 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Thu, 10 Jul 2025 14:34:11 -0400 Subject: [PATCH 02/13] nit --- api/admin/connecthandler/admin_connect.go | 264 +++ api/admin/service.go | 19 +- api/health/connecthandler/health_connect.go | 128 ++ api/info/connecthandler/info_connect.go | 325 ++++ api/info/service.go | 86 +- api/info/service_test.go | 2 +- api/metrics/connecthandler/metrics_connect.go | 77 + api/server/server.go | 5 + indexer/indexer.go | 2 +- indexer/indexer_test.go | 16 +- network/README.md | 4 +- node/node.go | 143 +- proto/admin/v1/service.proto | 98 + proto/health/v1/service.proto | 57 + proto/info/v1/service.proto | 126 ++ proto/io/reader/reader.proto | 2 +- proto/metrics/v1/service.proto | 21 + .../v1/adminv1connect/service.connect.go | 426 +++++ proto/pb/admin/v1/service.pb.go | 1447 +++++++++++++++ proto/pb/admin/v1/service_grpc.pb.go | 516 ++++++ .../v1/healthv1connect/service.connect.go | 167 ++ proto/pb/health/v1/service.pb.go | 576 ++++++ proto/pb/health/v1/service_grpc.pb.go | 183 ++ .../info/v1/infov1connect/service.connect.go | 396 ++++ proto/pb/info/v1/service.pb.go | 1647 +++++++++++++++++ proto/pb/info/v1/service_grpc.pb.go | 479 +++++ proto/pb/io/reader/reader.pb.go | 46 +- .../v1/metricsv1connect/service.connect.go | 112 ++ proto/pb/metrics/v1/service.pb.go | 271 +++ proto/pb/metrics/v1/service_grpc.pb.go | 109 ++ tests/e2e/connect/connect_suite_test.go | 16 + tests/e2e/connect/info_test.go | 75 + tests/e2e/connect/suite_test.go | 46 + tests/e2e/vms/xsvm.go | 28 +- 34 files changed, 7760 insertions(+), 155 deletions(-) create mode 100644 api/admin/connecthandler/admin_connect.go create mode 100644 api/health/connecthandler/health_connect.go create mode 100644 api/info/connecthandler/info_connect.go create mode 100644 api/metrics/connecthandler/metrics_connect.go create mode 100644 proto/admin/v1/service.proto create mode 100644 proto/health/v1/service.proto create mode 100644 proto/info/v1/service.proto create mode 100644 proto/metrics/v1/service.proto create mode 100644 proto/pb/admin/v1/adminv1connect/service.connect.go create mode 100644 proto/pb/admin/v1/service.pb.go create mode 100644 proto/pb/admin/v1/service_grpc.pb.go create mode 100644 proto/pb/health/v1/healthv1connect/service.connect.go create mode 100644 proto/pb/health/v1/service.pb.go create mode 100644 proto/pb/health/v1/service_grpc.pb.go create mode 100644 proto/pb/info/v1/infov1connect/service.connect.go create mode 100644 proto/pb/info/v1/service.pb.go create mode 100644 proto/pb/info/v1/service_grpc.pb.go create mode 100644 proto/pb/metrics/v1/metricsv1connect/service.connect.go create mode 100644 proto/pb/metrics/v1/service.pb.go create mode 100644 proto/pb/metrics/v1/service_grpc.pb.go create mode 100644 tests/e2e/connect/connect_suite_test.go create mode 100644 tests/e2e/connect/info_test.go create mode 100644 tests/e2e/connect/suite_test.go diff --git a/api/admin/connecthandler/admin_connect.go b/api/admin/connecthandler/admin_connect.go new file mode 100644 index 000000000000..b7e36648413e --- /dev/null +++ b/api/admin/connecthandler/admin_connect.go @@ -0,0 +1,264 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connecthandler + +import ( + "context" + "encoding/json" + "fmt" + + "connectrpc.com/connect" + + "github.com/ava-labs/avalanchego/api" + "github.com/ava-labs/avalanchego/api/admin" + "github.com/ava-labs/avalanchego/proto/pb/admin/v1/adminv1connect" + "github.com/ava-labs/avalanchego/utils/logging" + + adminv1 "github.com/ava-labs/avalanchego/proto/pb/admin/v1" +) + +var _ adminv1connect.AdminServiceHandler = (*connectAdminService)(nil) + +type connectAdminService struct { + admin *admin.Admin +} + +// NewConnectAdminService returns a ConnectRPC handler for the Admin API +func NewConnectAdminService(admin *admin.Admin) adminv1connect.AdminServiceHandler { + return &connectAdminService{ + admin: admin, + } +} + +// StartCPUProfiler starts a CPU profile writing to the specified file +func (c *connectAdminService) StartCPUProfiler( + _ context.Context, + _ *connect.Request[adminv1.StartCPUProfilerRequest], +) (*connect.Response[adminv1.StartCPUProfilerResponse], error) { + if err := c.admin.StartCPUProfiler(nil, nil, &api.EmptyReply{}); err != nil { + return nil, err + } + + return connect.NewResponse(&adminv1.StartCPUProfilerResponse{}), nil +} + +// StopCPUProfiler stops the CPU profile +func (c *connectAdminService) StopCPUProfiler( + _ context.Context, + _ *connect.Request[adminv1.StopCPUProfilerRequest], +) (*connect.Response[adminv1.StopCPUProfilerResponse], error) { + if err := c.admin.StopCPUProfiler(nil, nil, &api.EmptyReply{}); err != nil { + return nil, err + } + + return connect.NewResponse(&adminv1.StopCPUProfilerResponse{}), nil +} + +// MemoryProfile runs a memory profile writing to the specified file +func (c *connectAdminService) MemoryProfile( + _ context.Context, + _ *connect.Request[adminv1.MemoryProfileRequest], +) (*connect.Response[adminv1.MemoryProfileResponse], error) { + if err := c.admin.MemoryProfile(nil, nil, &api.EmptyReply{}); err != nil { + return nil, err + } + + return connect.NewResponse(&adminv1.MemoryProfileResponse{}), nil +} + +// LockProfile runs a lock profile writing to the specified file +func (c *connectAdminService) LockProfile( + _ context.Context, + _ *connect.Request[adminv1.LockProfileRequest], +) (*connect.Response[adminv1.LockProfileResponse], error) { + if err := c.admin.LockProfile(nil, nil, &api.EmptyReply{}); err != nil { + return nil, err + } + + return connect.NewResponse(&adminv1.LockProfileResponse{}), nil +} + +// Alias attempts to alias an HTTP endpoint to a new name +func (c *connectAdminService) Alias( + _ context.Context, + request *connect.Request[adminv1.AliasRequest], +) (*connect.Response[adminv1.AliasResponse], error) { + jsonRequest := &admin.AliasArgs{ + Endpoint: request.Msg.Endpoint, + Alias: request.Msg.Alias, + } + + if err := c.admin.Alias(nil, jsonRequest, &api.EmptyReply{}); err != nil { + return nil, err + } + + return connect.NewResponse(&adminv1.AliasResponse{}), nil +} + +// AliasChain attempts to alias a chain to a new name +func (c *connectAdminService) AliasChain( + _ context.Context, + request *connect.Request[adminv1.AliasChainRequest], +) (*connect.Response[adminv1.AliasChainResponse], error) { + jsonRequest := &admin.AliasChainArgs{ + Chain: request.Msg.Chain, + Alias: request.Msg.Alias, + } + + if err := c.admin.AliasChain(nil, jsonRequest, &api.EmptyReply{}); err != nil { + return nil, err + } + + return connect.NewResponse(&adminv1.AliasChainResponse{}), nil +} + +// GetChainAliases returns the aliases of the chain +func (c *connectAdminService) GetChainAliases( + _ context.Context, + request *connect.Request[adminv1.GetChainAliasesRequest], +) (*connect.Response[adminv1.GetChainAliasesResponse], error) { + jsonRequest := &admin.GetChainAliasesArgs{ + Chain: request.Msg.Chain, + } + + var jsonResponse admin.GetChainAliasesReply + if err := c.admin.GetChainAliases(nil, jsonRequest, &jsonResponse); err != nil { + return nil, err + } + + Response := &adminv1.GetChainAliasesResponse{ + Aliases: jsonResponse.Aliases, + } + + return connect.NewResponse(Response), nil +} + +// Stacktrace returns the current global stacktrace +func (c *connectAdminService) Stacktrace( + _ context.Context, + _ *connect.Request[adminv1.StacktraceRequest], +) (*connect.Response[adminv1.StacktraceResponse], error) { + if err := c.admin.Stacktrace(nil, nil, &api.EmptyReply{}); err != nil { + return nil, err + } + + return connect.NewResponse(&adminv1.StacktraceResponse{}), nil +} + +// SetLoggerLevel sets the log level and/or display level for loggers +func (c *connectAdminService) SetLoggerLevel( + _ context.Context, + request *connect.Request[adminv1.SetLoggerLevelRequest], +) (*connect.Response[adminv1.SetLoggerLevelResponse], error) { + jsonRequest := &admin.SetLoggerLevelArgs{ + LoggerName: request.Msg.LoggerName, + } + + if request.Msg.LogLevel != "" { + logLevel, err := logging.ToLevel(request.Msg.LogLevel) + if err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("invalid log level: %w", err)) + } + jsonRequest.LogLevel = &logLevel + } + + if request.Msg.DisplayLevel != "" { + displayLevel, err := logging.ToLevel(request.Msg.DisplayLevel) + if err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("invalid display level: %w", err)) + } + jsonRequest.DisplayLevel = &displayLevel + } + + var jsonResponse admin.LoggerLevelReply + if err := c.admin.SetLoggerLevel(nil, jsonRequest, &jsonResponse); err != nil { + return nil, err + } + + protoLoggerLevels := make(map[string]*adminv1.LogAndDisplayLevels) + + for name, levels := range jsonResponse.LoggerLevels { + protoLoggerLevels[name] = &adminv1.LogAndDisplayLevels{ + LogLevel: levels.LogLevel.String(), + DisplayLevel: levels.DisplayLevel.String(), + } + } + + return connect.NewResponse(&adminv1.SetLoggerLevelResponse{ + LoggerLevels: protoLoggerLevels, + }), nil +} + +// GetLoggerLevel returns the log level and display level of all loggers +func (c *connectAdminService) GetLoggerLevel( + _ context.Context, + request *connect.Request[adminv1.GetLoggerLevelRequest], +) (*connect.Response[adminv1.GetLoggerLevelResponse], error) { + jsonRequest := &admin.GetLoggerLevelArgs{ + LoggerName: request.Msg.LoggerName, + } + + var jsonResponse admin.LoggerLevelReply + if err := c.admin.GetLoggerLevel(nil, jsonRequest, &jsonResponse); err != nil { + return nil, err + } + + protoLoggerLevels := make(map[string]*adminv1.LogAndDisplayLevels) + + for name, levels := range jsonResponse.LoggerLevels { + protoLoggerLevels[name] = &adminv1.LogAndDisplayLevels{ + LogLevel: levels.LogLevel.String(), + DisplayLevel: levels.DisplayLevel.String(), + } + } + + return connect.NewResponse(&adminv1.GetLoggerLevelResponse{ + LoggerLevels: protoLoggerLevels, + }), nil +} + +// GetConfig returns the config that the node was started with +func (c *connectAdminService) GetConfig( + _ context.Context, + _ *connect.Request[adminv1.GetConfigRequest], +) (*connect.Response[adminv1.GetConfigResponse], error) { + var jsonResponse interface{} + if err := c.admin.GetConfig(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + // Convert the config to JSON + configJSON, err := json.Marshal(jsonResponse) + if err != nil { + return nil, err + } + + Response := &adminv1.GetConfigResponse{ + ConfigJson: string(configJSON), + } + + return connect.NewResponse(Response), nil +} + +// DBGet returns the value of a database entry +func (c *connectAdminService) DBGet( + _ context.Context, + request *connect.Request[adminv1.DBGetRequest], +) (*connect.Response[adminv1.DBGetResponse], error) { + jsonRequest := &admin.DBGetArgs{ + Key: request.Msg.Key, + } + + var jsonResponse admin.DBGetReply + if err := c.admin.DbGet(nil, jsonRequest, &jsonResponse); err != nil { + return nil, err + } + + Response := &adminv1.DBGetResponse{ + Value: jsonResponse.Value, + ErrorCode: adminv1.ErrorCode(jsonResponse.ErrorCode), + } + + return connect.NewResponse(Response), nil +} diff --git a/api/admin/service.go b/api/admin/service.go index 097545ceaaad..f27c6417835a 100644 --- a/api/admin/service.go +++ b/api/admin/service.go @@ -59,21 +59,18 @@ type Config struct { type Admin struct { Config lock sync.RWMutex - profiler profiler.Profiler + Profiler profiler.Profiler } // NewService returns a new admin API service. // All of the fields in [config] must be set. -func NewService(config Config) (http.Handler, error) { +func NewService(admin *Admin) (http.Handler, error) { server := rpc.NewServer() codec := json.NewCodec() server.RegisterCodec(codec, "application/json") server.RegisterCodec(codec, "application/json;charset=UTF-8") return server, server.RegisterService( - &Admin{ - Config: config, - profiler: profiler.New(config.ProfileDir), - }, + admin, "admin", ) } @@ -88,7 +85,7 @@ func (a *Admin) StartCPUProfiler(_ *http.Request, _ *struct{}, _ *api.EmptyReply a.lock.Lock() defer a.lock.Unlock() - return a.profiler.StartCPUProfiler() + return a.Profiler.StartCPUProfiler() } // StopCPUProfiler stops the cpu profile @@ -101,7 +98,7 @@ func (a *Admin) StopCPUProfiler(_ *http.Request, _ *struct{}, _ *api.EmptyReply) a.lock.Lock() defer a.lock.Unlock() - return a.profiler.StopCPUProfiler() + return a.Profiler.StopCPUProfiler() } // MemoryProfile runs a memory profile writing to the specified file @@ -114,7 +111,7 @@ func (a *Admin) MemoryProfile(_ *http.Request, _ *struct{}, _ *api.EmptyReply) e a.lock.Lock() defer a.lock.Unlock() - return a.profiler.MemoryProfile() + return a.Profiler.MemoryProfile() } // LockProfile runs a mutex profile writing to the specified file @@ -127,7 +124,7 @@ func (a *Admin) LockProfile(_ *http.Request, _ *struct{}, _ *api.EmptyReply) err a.lock.Lock() defer a.lock.Unlock() - return a.profiler.LockProfile() + return a.Profiler.LockProfile() } // AliasArgs are the arguments for calling Alias @@ -391,7 +388,7 @@ type DBGetReply struct { ErrorCode rpcdbpb.Error `json:"errorCode"` } -//nolint:staticcheck // renaming this method to DBGet would change the API method from "dbGet" to "dBGet" +//nolint:stylecheck // renaming this method to DBGet would change the API method from "dbGet" to "dBGet" func (a *Admin) DbGet(_ *http.Request, args *DBGetArgs, reply *DBGetReply) error { a.Log.Debug("API called", zap.String("service", "admin"), diff --git a/api/health/connecthandler/health_connect.go b/api/health/connecthandler/health_connect.go new file mode 100644 index 000000000000..785e0a580c1c --- /dev/null +++ b/api/health/connecthandler/health_connect.go @@ -0,0 +1,128 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connecthandler + +import ( + "context" + "time" + + "connectrpc.com/connect" + "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/ava-labs/avalanchego/api/health" + "github.com/ava-labs/avalanchego/proto/pb/health/v1/healthv1connect" + + healthv1 "github.com/ava-labs/avalanchego/proto/pb/health/v1" +) + +var _ healthv1connect.HealthServiceHandler = (*connectHealthService)(nil) + +type connectHealthService struct { + service health.Health +} + +// NewConnectHealthService returns a ConnectRPC handler for the Health API +func NewConnectHealthService(healthService health.Health) healthv1connect.HealthServiceHandler { + return &connectHealthService{ + service: healthService, + } +} + +func (c *connectHealthService) Readiness( + _ context.Context, + request *connect.Request[healthv1.ReadinessRequest], +) (*connect.Response[healthv1.ReadinessResponse], error) { + checks, healthy := c.service.Readiness(request.Msg.Tags...) + + checksProto := convertResults(checks) + + out := &healthv1.ReadinessResponse{ + Checks: checksProto, + Healthy: healthy, + } + + return connect.NewResponse(out), nil +} + +func (c *connectHealthService) Health( + _ context.Context, + request *connect.Request[healthv1.HealthRequest], +) (*connect.Response[healthv1.HealthResponse], error) { + checks, healthy := c.service.Health(request.Msg.Tags...) + + checksProto := convertResults(checks) + + out := &healthv1.HealthResponse{ + Checks: checksProto, + Healthy: healthy, + } + + return connect.NewResponse(out), nil +} + +func (c *connectHealthService) Liveness( + _ context.Context, + request *connect.Request[healthv1.LivenessRequest], +) (*connect.Response[healthv1.LivenessResponse], error) { + checks, healthy := c.service.Liveness(request.Msg.Tags...) + + checksProto := convertResults(checks) + + out := &healthv1.LivenessResponse{ + Checks: checksProto, + Healthy: healthy, + } + + return connect.NewResponse(out), nil +} + +// convertResult transforms a health.Result into a healthv1.Result +func convertResult(r health.Result) *healthv1.Result { + result := &healthv1.Result{ + ContiguousFailures: r.ContiguousFailures, + DurationNs: r.Duration.Nanoseconds(), + } + + // Handle message field (from the Details field) + if r.Details != nil { + if m, ok := r.Details.(map[string]interface{}); ok { + if structMsg, err := structpb.NewStruct(m); err == nil { + result.Message = structMsg + } + } else if msg, ok := r.Details.(string); ok { + // Convert string to a Struct with a single field "value" + result.Message, _ = structpb.NewStruct(map[string]interface{}{ + "value": msg, + }) + } + } + + if r.Error != nil { + result.Error = *r.Error + } + + if !r.Timestamp.IsZero() { + result.Timestamp = timestamppb.New(r.Timestamp) + } + + // Set time of first failure if exists and not nil + if r.TimeOfFirstFailure != nil { + result.TimeOfFirstFailure = timestamppb.New(*r.TimeOfFirstFailure) + } else { + // Use zero time if TimeOfFirstFailure is nil + result.TimeOfFirstFailure = timestamppb.New(time.Time{}) + } + + return result +} + +// convertResults transforms a map of health.Result into a map of *healthv1.Result +func convertResults(results map[string]health.Result) map[string]*healthv1.Result { + converted := make(map[string]*healthv1.Result) + for name, res := range results { + converted[name] = convertResult(res) + } + return converted +} diff --git a/api/info/connecthandler/info_connect.go b/api/info/connecthandler/info_connect.go new file mode 100644 index 000000000000..7d813f714379 --- /dev/null +++ b/api/info/connecthandler/info_connect.go @@ -0,0 +1,325 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connecthandler + +import ( + "context" + "fmt" + "time" + + "connectrpc.com/connect" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/ava-labs/avalanchego/api/info" + "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" + "github.com/ava-labs/avalanchego/upgrade" + + v1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" +) + +var _ infov1connect.InfoServiceHandler = (*connectInfoService)(nil) + +type connectInfoService struct { + *info.Info +} + +// NewConnectInfoService returns a ConnectRPC handler for the Info API +func NewConnectInfoService(info *info.Info) infov1connect.InfoServiceHandler { + return &connectInfoService{ + Info: info, + } +} + +// GetNodeVersion returns the semantic version, database version, RPC protocol version, +// Git commit hash, and the list of VM versions this node is running +func (c *connectInfoService) GetNodeVersion( + _ context.Context, + _ *connect.Request[v1.GetNodeVersionRequest], +) (*connect.Response[v1.GetNodeVersionResponse], error) { + var jsonResponse info.GetNodeVersionReply + if err := c.Info.GetNodeVersion(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + // Convert VM versions map to protobuf format + vmVersions := make(map[string]string) + for id, version := range jsonResponse.VMVersions { + vmVersions[id] = version + } + + response := &v1.GetNodeVersionResponse{ + Version: jsonResponse.Version, + DatabaseVersion: jsonResponse.DatabaseVersion, + RpcProtocolVersion: uint32(jsonResponse.RPCProtocolVersion), + GitCommit: jsonResponse.GitCommit, + VmVersions: vmVersions, + } + + return connect.NewResponse(response), nil +} + +// GetNodeID returns this node's unique identifier and proof-of-possession bytes +func (c *connectInfoService) GetNodeID( + _ context.Context, + _ *connect.Request[v1.GetNodeIDRequest], +) (*connect.Response[v1.GetNodeIDResponse], error) { + var jsonResponse info.GetNodeIDReply + if err := c.Info.GetNodeID(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + nodePOP := []byte{} + if jsonResponse.NodePOP != nil { + p := jsonResponse.NodePOP + nodePOP = make([]byte, len(p.PublicKey)+len(p.ProofOfPossession)) + copy(nodePOP[0:len(p.PublicKey)], p.PublicKey[:]) + copy(nodePOP[len(p.PublicKey):], p.ProofOfPossession[:]) + } + + response := &v1.GetNodeIDResponse{ + NodeId: jsonResponse.NodeID.String(), + NodePop: nodePOP, + } + + return connect.NewResponse(response), nil +} + +// GetNodeIP returns the primary IP address this node uses for P2P networking.\ +func (c *connectInfoService) GetNodeIP( + _ context.Context, + _ *connect.Request[v1.GetNodeIPRequest], +) (*connect.Response[v1.GetNodeIPResponse], error) { + var jsonResponse info.GetNodeIPReply + if err := c.Info.GetNodeIP(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + response := &v1.GetNodeIPResponse{ + Ip: jsonResponse.IP.String(), + } + + return connect.NewResponse(response), nil +} + +// GetNetworkID returns the numeric ID of the Avalanche network this node is connected to +func (c *connectInfoService) GetNetworkID( + _ context.Context, + _ *connect.Request[v1.GetNetworkIDRequest], +) (*connect.Response[v1.GetNetworkIDResponse], error) { + var jsonResponse info.GetNetworkIDReply + if err := c.Info.GetNetworkID(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + response := &v1.GetNetworkIDResponse{ + NetworkId: uint32(jsonResponse.NetworkID), + } + + return connect.NewResponse(response), nil +} + +// GetNetworkName returns the name of the network +func (c *connectInfoService) GetNetworkName( + _ context.Context, + _ *connect.Request[v1.GetNetworkNameRequest], +) (*connect.Response[v1.GetNetworkNameResponse], error) { + var jsonResponse info.GetNetworkNameReply + if err := c.Info.GetNetworkName(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + response := &v1.GetNetworkNameResponse{ + NetworkName: jsonResponse.NetworkName, + } + + return connect.NewResponse(response), nil +} + +// GetBlockchainID maps an ID string to its canonical chain ID +func (c *connectInfoService) GetBlockchainID( + _ context.Context, + request *connect.Request[v1.GetBlockchainIDRequest], +) (*connect.Response[v1.GetBlockchainIDResponse], error) { + jsonRequest := info.GetBlockchainIDArgs{ + Alias: request.Msg.Alias, + } + + var jsonResponse info.GetBlockchainIDReply + if err := c.Info.GetBlockchainID(nil, &jsonRequest, &jsonResponse); err != nil { + return nil, err + } + + response := &v1.GetBlockchainIDResponse{ + BlockchainId: jsonResponse.BlockchainID.String(), + } + + return connect.NewResponse(response), nil +} + +// Peers returns metadata (IP, nodeID, version, uptimes, subnets, etc.) for the given peer node IDs +func (c *connectInfoService) Peers( + _ context.Context, + request *connect.Request[v1.PeersRequest], +) (*connect.Response[v1.PeersResponse], error) { + nodeIDs := make([]ids.NodeID, 0, len(request.Msg.NodeIds)) + for _, nodeIDStr := range request.Msg.NodeIds { + nodeID, err := ids.NodeIDFromString(nodeIDStr) + if err != nil { + return nil, connect.NewError( + connect.CodeInvalidArgument, fmt.Errorf("invalid nodeID %s: %w", nodeIDStr, err)) + } + nodeIDs = append(nodeIDs, nodeID) + } + + jsonRequest := info.PeersArgs{ + NodeIDs: nodeIDs, + } + + var jsonResponse info.PeersReply + if err := c.Info.Peers(nil, &jsonRequest, &jsonResponse); err != nil { + return nil, err + } + + peers := make([]*v1.PeerInfo, 0, len(jsonResponse.Peers)) + for _, peer := range jsonResponse.Peers { + // Convert TrackedSubnets (set.Set[ids.ID]) to []string + trackedSubnetsIDs := peer.TrackedSubnets.List() + trackedSubnets := make([]string, len(trackedSubnetsIDs)) + for i, id := range trackedSubnetsIDs { + trackedSubnets[i] = id.String() + } + + benched := make([]string, len(peer.Benched)) + copy(benched, peer.Benched) + + peers = append(peers, &v1.PeerInfo{ + Ip: peer.IP.String(), + PublicIp: peer.PublicIP.String(), + NodeId: peer.ID.String(), + Version: peer.Version, + LastSent: formatTime(peer.LastSent), + LastReceived: formatTime(peer.LastReceived), + Benched: benched, + ObservedUptime: uint32(peer.ObservedUptime), + TrackedSubnets: trackedSubnets, + }) + } + + response := &v1.PeersResponse{ + NumPeers: uint32(jsonResponse.NumPeers), + Peers: peers, + } + + return connect.NewResponse(response), nil +} + +// formatTime formats a time.Time object to a string in "YYYY-MM-DDThh:mm:ssZ" format +func formatTime(t time.Time) string { + return t.Format(time.RFC3339) +} + +// IsBootstrapped returns whether the named chain has finished its bootstrap process on this node +func (c *connectInfoService) IsBootstrapped( + _ context.Context, + request *connect.Request[v1.IsBootstrappedRequest], +) (*connect.Response[v1.IsBootstrappedResponse], error) { + // Use the chain from the request + jsonRequest := info.IsBootstrappedArgs{ + Chain: request.Msg.Chain, + } + + var jsonResponse info.IsBootstrappedResponse + if err := c.Info.IsBootstrapped(nil, &jsonRequest, &jsonResponse); err != nil { + return nil, err + } + + response := &v1.IsBootstrappedResponse{ + IsBootstrapped: jsonResponse.IsBootstrapped, + } + + return connect.NewResponse(response), nil +} + +// Upgrades returns all the scheduled upgrade activation times and parameters for this node +func (c *connectInfoService) Upgrades( + _ context.Context, + _ *connect.Request[v1.UpgradesRequest], +) (*connect.Response[v1.UpgradesResponse], error) { + var config upgrade.Config + if err := c.Info.Upgrades(nil, nil, &config); err != nil { + return nil, err + } + + response := &v1.UpgradesResponse{ + ApricotPhase1Time: timestamppb.New(config.ApricotPhase1Time), + ApricotPhase2Time: timestamppb.New(config.ApricotPhase2Time), + ApricotPhase3Time: timestamppb.New(config.ApricotPhase3Time), + ApricotPhase4Time: timestamppb.New(config.ApricotPhase4Time), + ApricotPhase4MinPChainHeight: config.ApricotPhase4MinPChainHeight, + ApricotPhase5Time: timestamppb.New(config.ApricotPhase5Time), + ApricotPhasePre6Time: timestamppb.New(config.ApricotPhasePre6Time), + ApricotPhase6Time: timestamppb.New(config.ApricotPhase6Time), + ApricotPhasePost6Time: timestamppb.New(config.ApricotPhasePost6Time), + BanffTime: timestamppb.New(config.BanffTime), + CortinaTime: timestamppb.New(config.CortinaTime), + CortinaXChainStopVertexId: config.CortinaXChainStopVertexID.String(), + DurangoTime: timestamppb.New(config.DurangoTime), + EtnaTime: timestamppb.New(config.EtnaTime), + FortunaTime: timestamppb.New(config.FortunaTime), + GraniteTime: timestamppb.New(config.GraniteTime), + } + + return connect.NewResponse(response), nil +} + +// Uptime returns this node's uptime metrics (rewarding stake %, weighted average %, etc.) +func (c *connectInfoService) Uptime( + _ context.Context, + _ *connect.Request[v1.UptimeRequest], +) (*connect.Response[v1.UptimeResponse], error) { + var jsonResponse info.UptimeResponse + if err := c.Info.Uptime(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + response := &v1.UptimeResponse{ + RewardingStakePercentage: float64(jsonResponse.RewardingStakePercentage), + WeightedAveragePercentage: float64(jsonResponse.WeightedAveragePercentage), + } + + return connect.NewResponse(response), nil +} + +// GetVMs returns a map of VM IDs to their known aliases, plus FXs information +func (c *connectInfoService) GetVMs( + _ context.Context, + _ *connect.Request[v1.GetVMsRequest], +) (*connect.Response[v1.GetVMsResponse], error) { + var jsonResponse info.GetVMsReply + if err := c.Info.GetVMs(nil, nil, &jsonResponse); err != nil { + return nil, err + } + + // Convert the VM map from JSON-RPC format to protobuf format + vms := make(map[string]*v1.VMAliases) + for vmID, aliases := range jsonResponse.VMs { + vms[vmID.String()] = &v1.VMAliases{ + Aliases: aliases, + } + } + + // Convert the FXs map from JSON-RPC format to protobuf format + fxs := make(map[string]string) + for fxID, name := range jsonResponse.Fxs { + fxs[fxID.String()] = name + } + + response := &v1.GetVMsResponse{ + Vms: vms, + Fxs: fxs, + } + + return connect.NewResponse(response), nil +} diff --git a/api/info/service.go b/api/info/service.go index 14d88ca1d3b8..1e09c7e1a599 100644 --- a/api/info/service.go +++ b/api/info/service.go @@ -68,13 +68,13 @@ var ( // Info is the API service for unprivileged info on a node type Info struct { Parameters - log logging.Logger - validators validators.Manager - myIP *utils.Atomic[netip.AddrPort] - networking network.Network - chainManager chains.Manager - vmManager vms.Manager - benchlist benchlist.Manager + Log logging.Logger + Validators validators.Manager + MyIP *utils.Atomic[netip.AddrPort] + Networking network.Network + ChainManager chains.Manager + VmManager vms.Manager + Benchlist benchlist.Manager } type Parameters struct { @@ -89,31 +89,13 @@ type Parameters struct { CreateAssetTxFee uint64 } -func NewService( - parameters Parameters, - log logging.Logger, - validators validators.Manager, - chainManager chains.Manager, - vmManager vms.Manager, - myIP *utils.Atomic[netip.AddrPort], - network network.Network, - benchlist benchlist.Manager, -) (http.Handler, error) { +func NewService(info *Info) (http.Handler, error) { server := rpc.NewServer() codec := json.NewCodec() server.RegisterCodec(codec, "application/json") server.RegisterCodec(codec, "application/json;charset=UTF-8") return server, server.RegisterService( - &Info{ - Parameters: parameters, - log: log, - validators: validators, - chainManager: chainManager, - vmManager: vmManager, - myIP: myIP, - networking: network, - benchlist: benchlist, - }, + info, "info", ) } @@ -129,12 +111,12 @@ type GetNodeVersionReply struct { // GetNodeVersion returns the version this node is running func (i *Info) GetNodeVersion(_ *http.Request, _ *struct{}, reply *GetNodeVersionReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNodeVersion"), ) - vmVersions, err := i.vmManager.Versions() + vmVersions, err := i.VmManager.Versions() if err != nil { return err } @@ -155,7 +137,7 @@ type GetNodeIDReply struct { // GetNodeID returns the node ID of this node func (i *Info) GetNodeID(_ *http.Request, _ *struct{}, reply *GetNodeIDReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNodeID"), ) @@ -177,18 +159,18 @@ type GetNodeIPReply struct { // GetNodeIP returns the IP of this node func (i *Info) GetNodeIP(_ *http.Request, _ *struct{}, reply *GetNodeIPReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNodeIP"), ) - reply.IP = i.myIP.Get() + reply.IP = i.MyIP.Get() return nil } // GetNetworkID returns the network ID this node is running on func (i *Info) GetNetworkID(_ *http.Request, _ *struct{}, reply *GetNetworkIDReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNetworkID"), ) @@ -204,7 +186,7 @@ type GetNetworkNameReply struct { // GetNetworkName returns the network name this node is running on func (i *Info) GetNetworkName(_ *http.Request, _ *struct{}, reply *GetNetworkNameReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNetworkName"), ) @@ -225,12 +207,12 @@ type GetBlockchainIDReply struct { // GetBlockchainID returns the blockchain ID that resolves the alias that was supplied func (i *Info) GetBlockchainID(_ *http.Request, args *GetBlockchainIDArgs, reply *GetBlockchainIDReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getBlockchainID"), ) - bID, err := i.chainManager.Lookup(args.Alias) + bID, err := i.ChainManager.Lookup(args.Alias) reply.BlockchainID = bID return err } @@ -256,18 +238,18 @@ type PeersReply struct { // Peers returns the list of current validators func (i *Info) Peers(_ *http.Request, args *PeersArgs, reply *PeersReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "peers"), ) - peers := i.networking.PeerInfo(args.NodeIDs) + peers := i.Networking.PeerInfo(args.NodeIDs) peerInfo := make([]Peer, len(peers)) for index, peer := range peers { - benchedIDs := i.benchlist.GetBenched(peer.ID) + benchedIDs := i.Benchlist.GetBenched(peer.ID) benchedAliases := make([]string, len(benchedIDs)) for idx, id := range benchedIDs { - alias, err := i.chainManager.PrimaryAlias(id) + alias, err := i.ChainManager.PrimaryAlias(id) if err != nil { return fmt.Errorf("failed to get primary alias for chain ID %s: %w", id, err) } @@ -300,7 +282,7 @@ type IsBootstrappedResponse struct { // IsBootstrapped returns nil and sets [reply.IsBootstrapped] == true iff [args.Chain] exists and is done bootstrapping // Returns an error if the chain doesn't exist func (i *Info) IsBootstrapped(_ *http.Request, args *IsBootstrappedArgs, reply *IsBootstrappedResponse) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "isBootstrapped"), logging.UserString("chain", args.Chain), @@ -309,17 +291,17 @@ func (i *Info) IsBootstrapped(_ *http.Request, args *IsBootstrappedArgs, reply * if args.Chain == "" { return errNoChainProvided } - chainID, err := i.chainManager.Lookup(args.Chain) + chainID, err := i.ChainManager.Lookup(args.Chain) if err != nil { return fmt.Errorf("there is no chain with alias/ID '%s'", args.Chain) } - reply.IsBootstrapped = i.chainManager.IsBootstrapped(chainID) + reply.IsBootstrapped = i.ChainManager.IsBootstrapped(chainID) return nil } // Upgrades returns the upgrade schedule this node is running. func (i *Info) Upgrades(_ *http.Request, _ *struct{}, reply *upgrade.Config) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "upgrades"), ) @@ -346,12 +328,12 @@ type UptimeResponse struct { } func (i *Info) Uptime(_ *http.Request, _ *struct{}, reply *UptimeResponse) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "uptime"), ) - result, err := i.networking.NodeUptime() + result, err := i.Networking.NodeUptime() if err != nil { return fmt.Errorf("couldn't get node uptime: %w", err) } @@ -382,15 +364,15 @@ func (a *ACPsReply) getACP(acpNum uint32) *ACP { } func (i *Info) Acps(_ *http.Request, _ *struct{}, reply *ACPsReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "acps"), ) reply.ACPs = make(map[uint32]*ACP, constants.CurrentACPs.Len()) - peers := i.networking.PeerInfo(nil) + peers := i.Networking.PeerInfo(nil) for _, peer := range peers { - weight := json.Uint64(i.validators.GetWeight(constants.PrimaryNetworkID, peer.ID)) + weight := json.Uint64(i.Validators.GetWeight(constants.PrimaryNetworkID, peer.ID)) if weight == 0 { continue } @@ -407,7 +389,7 @@ func (i *Info) Acps(_ *http.Request, _ *struct{}, reply *ACPsReply) error { } } - totalWeight, err := i.validators.TotalWeight(constants.PrimaryNetworkID) + totalWeight, err := i.Validators.TotalWeight(constants.PrimaryNetworkID) if err != nil { return err } @@ -432,7 +414,7 @@ type GetTxFeeResponse struct { // GetTxFee returns the transaction fee in nAVAX. func (i *Info) GetTxFee(_ *http.Request, _ *struct{}, reply *GetTxFeeResponse) error { - i.log.Warn("deprecated API called", + i.Log.Warn("deprecated API called", zap.String("service", "info"), zap.String("method", "getTxFee"), ) @@ -458,7 +440,7 @@ type GetVMsReply struct { // GetVMs lists the virtual machines installed on the node func (i *Info) GetVMs(_ *http.Request, _ *struct{}, reply *GetVMsReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getVMs"), ) diff --git a/api/info/service_test.go b/api/info/service_test.go index 85a3fdf177c7..071829656f9f 100644 --- a/api/info/service_test.go +++ b/api/info/service_test.go @@ -30,7 +30,7 @@ func initGetVMsTest(t *testing.T) *getVMsTest { Parameters: Parameters{ VMManager: mockVMManager, }, - log: logging.NoLog{}, + Log: logging.NoLog{}, }, mockVMManager: mockVMManager, } diff --git a/api/metrics/connecthandler/metrics_connect.go b/api/metrics/connecthandler/metrics_connect.go new file mode 100644 index 000000000000..99b823c80d72 --- /dev/null +++ b/api/metrics/connecthandler/metrics_connect.go @@ -0,0 +1,77 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connecthandler + +import ( + "context" + + "connectrpc.com/connect" + "github.com/prometheus/client_golang/prometheus" + + "github.com/ava-labs/avalanchego/proto/pb/metrics/v1/metricsv1connect" + + metricsv1 "github.com/ava-labs/avalanchego/proto/pb/metrics/v1" + dto "github.com/prometheus/client_model/go" +) + +var _ metricsv1connect.MetricsServiceHandler = (*connectMetricsService)(nil) + +type connectMetricsService struct { + service prometheus.Gatherer +} + +func NewConnectMetricsService(service prometheus.Gatherer) metricsv1connect.MetricsServiceHandler { + return &connectMetricsService{ + service: service, + } +} + +func (c *connectMetricsService) GetMetrics( + _ context.Context, + _ *connect.Request[metricsv1.MetricsRequest], +) (*connect.Response[metricsv1.MetricsResponse], error) { + mfs, err := c.service.Gather() + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + var metricsProtoList []*metricsv1.Metric + + for _, mf := range mfs { + for _, m := range mf.Metric { + labels := make(map[string]string, len(m.Label)) + for _, label := range m.Label { + labels[label.GetName()] = label.GetValue() + } + + var value float64 + switch mf.GetType() { + case dto.MetricType_COUNTER: + if m.Counter != nil { + value = m.Counter.GetValue() + } + case dto.MetricType_GAUGE: + if m.Gauge != nil { + value = m.Gauge.GetValue() + } + default: + // Handles Counter, Gauge, and Untyped metrics. + // Histograms and Summaries require custom serialization. + continue + } + + metricsProtoList = append(metricsProtoList, &metricsv1.Metric{ + Name: mf.GetName(), + Type: mf.GetType().String(), + Help: mf.GetHelp(), + Value: value, + Labels: labels, + }) + } + } + + return connect.NewResponse(&metricsv1.MetricsResponse{ + Metrics: metricsProtoList, + }), nil +} diff --git a/api/server/server.go b/api/server/server.go index 54211b485da8..16d1019ab7fc 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -65,6 +65,7 @@ type Server interface { // That is, add pairs to server so that API calls can be // made to the VM. RegisterChain(chainName string, ctx *snow.ConsensusContext, vm common.VM) + AddHeaderRoute(route string, handler http.Handler) bool // Shutdown this server Shutdown() error } @@ -211,6 +212,10 @@ func (s *server) RegisterChain(chainName string, ctx *snow.ConsensusContext, vm } } +func (s *server) AddHeaderRoute(route string, handler http.Handler) bool { + return s.router.AddHeaderRoute(route, handler) +} + func (s *server) addChainRoute(chainName string, handler http.Handler, ctx *snow.ConsensusContext, base, endpoint string) error { url := fmt.Sprintf("%s/%s", baseURL, base) s.log.Info("adding route", diff --git a/indexer/indexer.go b/indexer/indexer.go index c20f13f6fd76..3d2f42b9defc 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -337,7 +337,7 @@ func (i *indexer) registerChainHelper( _ = index.Close() return nil, err } - if err := i.pathAdder.AddRoute(apiServer, "index/"+name, "/"+endpoint); err != nil { + if err := i.pathAdder.AddRoute(apiServer, "index/"+name+"/"+endpoint, name); err != nil { _ = index.Close() return nil, err } diff --git a/indexer/indexer_test.go b/indexer/indexer_test.go index 6958d8851a86..167cc8877e19 100644 --- a/indexer/indexer_test.go +++ b/indexer/indexer_test.go @@ -33,13 +33,11 @@ var ( type apiServerMock struct { timesCalled int - bases []string endpoints []string } -func (a *apiServerMock) AddRoute(_ http.Handler, base, endpoint string) error { +func (a *apiServerMock) AddRoute(_ http.Handler, endpoint, _ string) error { a.timesCalled++ - a.bases = append(a.bases, base) a.endpoints = append(a.endpoints, endpoint) return nil } @@ -171,8 +169,7 @@ func TestIndexer(t *testing.T) { require.NoError(err) require.True(previouslyIndexed) require.Equal(1, server.timesCalled) - require.Equal("index/chain1", server.bases[0]) - require.Equal("/block", server.endpoints[0]) + require.Equal("index/chain1/block", server.endpoints[0]) require.Len(idxr.blockIndices, 1) require.Empty(idxr.txIndices) require.Empty(idxr.vtxIndices) @@ -254,7 +251,7 @@ func TestIndexer(t *testing.T) { require.NoError(err) require.Equal(blkID, container.ID) require.Equal(1, server.timesCalled) // block index for chain - require.Contains(server.endpoints, "/block") + require.Contains(server.endpoints, "index/chain1/block") // Register a DAG chain snow2Ctx := snowtest.Context(t, snowtest.XChainID) @@ -269,10 +266,9 @@ func TestIndexer(t *testing.T) { idxr.RegisterChain("chain2", chain2Ctx, dagVM) require.NoError(err) require.Equal(4, server.timesCalled) // block index for chain, block index for dag, vtx index, tx index - require.Contains(server.bases, "index/chain2") - require.Contains(server.endpoints, "/block") - require.Contains(server.endpoints, "/vtx") - require.Contains(server.endpoints, "/tx") + require.Contains(server.endpoints, "index/chain2/block") + require.Contains(server.endpoints, "index/chain2/vtx") + require.Contains(server.endpoints, "index/chain2/tx") require.Len(idxr.blockIndices, 2) require.Len(idxr.txIndices, 1) require.Len(idxr.vtxIndices, 1) diff --git a/network/README.md b/network/README.md index 6968e22783f9..b36f9b44aae2 100644 --- a/network/README.md +++ b/network/README.md @@ -36,7 +36,7 @@ Peers communicate by enqueuing messages between one another. Each peer on either sequenceDiagram actor Morty actor Rick - loop + loop Morty->>Rick: Write outbound messages Rick->>Morty: Read incoming messages end @@ -221,4 +221,4 @@ sequenceDiagram Note right of Rick: Summer isn't in the bloom filter Rick->>Morty: PeerList - Contains Summer ``` -This case is suboptimal, because `Rick` told `Morty` about `Summer` multiple times. If this case were to happen consistently, `Rick` may waste a significant amount of bandwidth trying to teach `Morty` about `Summer`. \ No newline at end of file +This case is suboptimal, because `Rick` told `Morty` about `Summer` multiple times. If this case were to happen consistently, `Rick` may waste a significant amount of bandwidth trying to teach `Morty` about `Summer`. diff --git a/node/node.go b/node/node.go index c10719c13669..3f2cc2088d44 100644 --- a/node/node.go +++ b/node/node.go @@ -13,6 +13,7 @@ import ( "io" "io/fs" "net" + "net/http" "net/netip" "os" "path/filepath" @@ -20,6 +21,7 @@ import ( "sync" "time" + "connectrpc.com/grpcreflect" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -46,6 +48,10 @@ import ( "github.com/ava-labs/avalanchego/network/dialer" "github.com/ava-labs/avalanchego/network/peer" "github.com/ava-labs/avalanchego/network/throttling" + "github.com/ava-labs/avalanchego/proto/pb/admin/v1/adminv1connect" + "github.com/ava-labs/avalanchego/proto/pb/health/v1/healthv1connect" + "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" + "github.com/ava-labs/avalanchego/proto/pb/metrics/v1/metricsv1connect" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/networking/benchlist" "github.com/ava-labs/avalanchego/snow/networking/router" @@ -77,6 +83,10 @@ import ( "github.com/ava-labs/avalanchego/vms/registry" "github.com/ava-labs/avalanchego/vms/rpcchainvm/runtime" + adminconnect "github.com/ava-labs/avalanchego/api/admin/connecthandler" + healthconnect "github.com/ava-labs/avalanchego/api/health/connecthandler" + infoconnect "github.com/ava-labs/avalanchego/api/info/connecthandler" + metricsconnect "github.com/ava-labs/avalanchego/api/metrics/connecthandler" databasefactory "github.com/ava-labs/avalanchego/database/factory" avmconfig "github.com/ava-labs/avalanchego/vms/avm/config" platformconfig "github.com/ava-labs/avalanchego/vms/platformvm/config" @@ -1271,13 +1281,27 @@ func (n *Node) initMetricsAPI() error { n.Log.Info("initializing metrics API") + metricsServicePattern, metricsServiceHandler := metricsv1connect.NewMetricsServiceHandler( + metricsconnect.NewConnectMetricsService(n.MetricsGatherer), + ) + + reflectionPattern, reflectionHandler := grpcreflect.NewHandlerV1( + grpcreflect.NewStaticReflector(metricsv1connect.MetricsServiceName), + ) + + mux := http.NewServeMux() + mux.Handle(reflectionPattern, reflectionHandler) + mux.Handle(metricsServicePattern, metricsServiceHandler) + + n.APIServer.AddHeaderRoute("metrics", mux) + return n.APIServer.AddRoute( promhttp.HandlerFor( n.MetricsGatherer, promhttp.HandlerOpts{}, ), "metrics", - "", + "metrics", ) } @@ -1289,26 +1313,45 @@ func (n *Node) initAdminAPI() error { return nil } n.Log.Info("initializing admin API") - service, err := admin.NewService( - admin.Config{ - Log: n.Log, - DB: n.DB, - ChainManager: n.chainManager, - HTTPServer: n.APIServer, - ProfileDir: n.Config.ProfilerConfig.Dir, - LogFactory: n.LogFactory, - NodeConfig: n.Config, - VMManager: n.VMManager, - VMRegistry: n.VMRegistry, - }, - ) + + config := admin.Config{ + Log: n.Log, + DB: n.DB, + ChainManager: n.chainManager, + HTTPServer: n.APIServer, + ProfileDir: n.Config.ProfilerConfig.Dir, + LogFactory: n.LogFactory, + NodeConfig: n.Config, + VMManager: n.VMManager, + VMRegistry: n.VMRegistry, + } + + adminReceiver := &admin.Admin{ + Config: config, + Profiler: profiler.New(config.ProfileDir), + } + + service, err := admin.NewService(adminReceiver) if err != nil { return err } + + adminServicePattern, adminServiceHandler := adminv1connect.NewAdminServiceHandler( + adminconnect.NewConnectAdminService(adminReceiver), + ) + reflectionPattern, reflectionHandler := grpcreflect.NewHandlerV1( + grpcreflect.NewStaticReflector(adminv1connect.AdminServiceName), + ) + + mux := http.NewServeMux() + mux.Handle(reflectionPattern, reflectionHandler) + mux.Handle(adminServicePattern, adminServiceHandler) + n.APIServer.AddHeaderRoute("admin", mux) + return n.APIServer.AddRoute( service, "admin", - "", + "admin", ) } @@ -1349,33 +1392,47 @@ func (n *Node) initInfoAPI() error { return fmt.Errorf("problem creating proof of possession: %w", err) } - service, err := info.NewService( - info.Parameters{ - Version: version.CurrentApp, - NodeID: n.ID, - NodePOP: pop, - NetworkID: n.Config.NetworkID, - VMManager: n.VMManager, - Upgrades: n.Config.UpgradeConfig, - + infoReceiver := &info.Info{ + Parameters: info.Parameters{ + Version: version.CurrentApp, + NodeID: n.ID, + NodePOP: pop, + NetworkID: n.Config.NetworkID, + VMManager: n.VMManager, + Upgrades: n.Config.UpgradeConfig, TxFee: n.Config.TxFee, CreateAssetTxFee: n.Config.CreateAssetTxFee, }, - n.Log, - n.vdrs, - n.chainManager, - n.VMManager, - n.Config.NetworkConfig.MyIPPort, - n.Net, - n.benchlistManager, - ) + Log: n.Log, + Validators: n.vdrs, + ChainManager: n.chainManager, + VmManager: n.VMManager, + MyIP: n.Config.NetworkConfig.MyIPPort, + Networking: n.Net, + Benchlist: n.benchlistManager, + } + + service, err := info.NewService(infoReceiver) if err != nil { return err } + + infoPattern, infoConnHandler := infov1connect.NewInfoServiceHandler( + infoconnect.NewConnectInfoService(infoReceiver), + ) + reflectionPattern, reflectionHandler := grpcreflect.NewHandlerV1( + grpcreflect.NewStaticReflector(infov1connect.InfoServiceName), + ) + + mux := http.NewServeMux() + mux.Handle(reflectionPattern, reflectionHandler) + mux.Handle(infoPattern, infoConnHandler) + n.APIServer.AddHeaderRoute("info", mux) + return n.APIServer.AddRoute( service, "info", - "", + "info", ) } @@ -1400,6 +1457,18 @@ func (n *Node) initHealthAPI() error { return nil } + healthServicePattern, healthServiceHandler := healthv1connect.NewHealthServiceHandler( + healthconnect.NewConnectHealthService(n.health), + ) + reflectionPattern, reflectionHandler := grpcreflect.NewHandlerV1( + grpcreflect.NewStaticReflector(healthv1connect.HealthServiceName), + ) + + mux := http.NewServeMux() + mux.Handle(reflectionPattern, reflectionHandler) + mux.Handle(healthServicePattern, healthServiceHandler) + n.APIServer.AddHeaderRoute("health", mux) + n.Log.Info("initializing Health API") err = n.health.RegisterHealthCheck("network", n.Net, health.ApplicationTag) if err != nil { @@ -1478,7 +1547,7 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( handler, "health", - "", + "health", ) if err != nil { return err @@ -1486,8 +1555,8 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( health.NewGetHandler(n.health.Readiness), + "health/readiness", "health", - "/readiness", ) if err != nil { return err @@ -1495,8 +1564,8 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( health.NewGetHandler(n.health.Health), + "health/health", "health", - "/health", ) if err != nil { return err @@ -1504,8 +1573,8 @@ func (n *Node) initHealthAPI() error { return n.APIServer.AddRoute( health.NewGetHandler(n.health.Liveness), + "health/liveness", "health", - "/liveness", ) } diff --git a/proto/admin/v1/service.proto b/proto/admin/v1/service.proto new file mode 100644 index 000000000000..881e31cb8ec6 --- /dev/null +++ b/proto/admin/v1/service.proto @@ -0,0 +1,98 @@ +syntax = "proto3"; +package admin.v1; + +option go_package = "github.com/ava-labs/avalanchego/proto/pb/admin/v1;adminv1"; + +// AdminService is the API service for node admin management +service AdminService { + rpc StartCPUProfiler(StartCPUProfilerRequest) returns (StartCPUProfilerResponse); + rpc StopCPUProfiler(StopCPUProfilerRequest) returns (StopCPUProfilerResponse); + rpc MemoryProfile(MemoryProfileRequest) returns (MemoryProfileResponse); + rpc LockProfile(LockProfileRequest) returns (LockProfileResponse); + rpc Alias(AliasRequest) returns (AliasResponse); + rpc AliasChain(AliasChainRequest) returns (AliasChainResponse); + rpc GetChainAliases(GetChainAliasesRequest) returns (GetChainAliasesResponse); + rpc Stacktrace(StacktraceRequest) returns (StacktraceResponse); + rpc SetLoggerLevel(SetLoggerLevelRequest) returns (SetLoggerLevelResponse); + rpc GetLoggerLevel(GetLoggerLevelRequest) returns (GetLoggerLevelResponse); + rpc GetConfig(GetConfigRequest) returns (GetConfigResponse); + rpc DBGet(DBGetRequest) returns (DBGetResponse); +} + +message StartCPUProfilerRequest {} +message StartCPUProfilerResponse {} + +message StopCPUProfilerRequest {} +message StopCPUProfilerResponse {} + +message MemoryProfileRequest {} +message MemoryProfileResponse {} + +message LockProfileRequest {} +message LockProfileResponse {} + +message AliasRequest { + string endpoint = 1; + string alias = 2; +} +message AliasResponse {} + +message AliasChainRequest { + string chain = 1; + string alias = 2; +} +message AliasChainResponse {} + +message GetChainAliasesRequest { + string chain = 1; +} +message GetChainAliasesResponse { + repeated string aliases = 1; +} + +message StacktraceRequest {} +message StacktraceResponse {} + +message SetLoggerLevelRequest { + string logger_name = 1; + string log_level = 2; + string display_level = 3; +} +message SetLoggerLevelResponse { + map logger_levels = 1; +} + +message GetLoggerLevelRequest { + string logger_name = 1; +} +message GetLoggerLevelResponse { + map logger_levels = 1; +} + +message GetConfigRequest {} +message GetConfigResponse { + string config_json = 1; +} + +message DBGetRequest { + string key = 1; +} +message DBGetResponse { + string value = 1; + ErrorCode error_code = 2; +} + +message LogAndDisplayLevels { + string log_level = 1; + string display_level = 2; +} + +message VMAliases { + repeated string aliases = 1; +} + +enum ErrorCode { + ERROR_CODE_UNSPECIFIED = 0; + ERROR_CODE_NOT_FOUND = 1; + ERROR_CODE_DATABASE_ERROR = 2; +} diff --git a/proto/health/v1/service.proto b/proto/health/v1/service.proto new file mode 100644 index 000000000000..435b30163bf1 --- /dev/null +++ b/proto/health/v1/service.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; +package health.v1; + +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/ava-labs/avalanchego/proto/pb/health/v1;healthv1"; + +// HealthService is the API service for health checks on a node +service HealthService { + rpc Readiness(ReadinessRequest) returns (ReadinessResponse); + rpc Liveness(LivenessRequest) returns (LivenessResponse); + rpc Health(HealthRequest) returns (HealthResponse); +} + +// Result is the result of a health check. +message Result { + google.protobuf.Struct message = 1; + // Error is the string representation of the error returned by the failing + // HealthCheck. The value is nil if the check passed. + string error = 2; + // Timestamp of the last HealthCheck. + google.protobuf.Timestamp timestamp = 3; + // Duration is the amount of time this HealthCheck last took to evaluate. + int64 duration_ns = 4; + // ContiguousFailures the HealthCheck has returned. + int64 contiguous_failures = 5; + // TimeOfFirstFailure of the HealthCheck. + google.protobuf.Timestamp time_of_first_failure = 6; +} + +message ReadinessResponse { + map checks = 1; + bool healthy = 2; +} + +message ReadinessRequest { + repeated string tags = 1; +} + +message LivenessResponse { + map checks = 1; + bool healthy = 2; +} + +message LivenessRequest { + repeated string tags = 1; +} + +message HealthResponse { + map checks = 1; + bool healthy = 2; +} + +message HealthRequest { + repeated string tags = 1; +} diff --git a/proto/info/v1/service.proto b/proto/info/v1/service.proto new file mode 100644 index 000000000000..a726aac6b1ea --- /dev/null +++ b/proto/info/v1/service.proto @@ -0,0 +1,126 @@ +syntax = "proto3"; +package info.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/ava-labs/avalanchego/proto/pb/info/v1;infov1"; + +// InfoService is the API service for unprivileged info on a node +service InfoService { + rpc GetNodeVersion(GetNodeVersionRequest) returns (GetNodeVersionResponse); + rpc GetNodeID(GetNodeIDRequest) returns (GetNodeIDResponse); + rpc GetNodeIP(GetNodeIPRequest) returns (GetNodeIPResponse); + rpc GetNetworkID(GetNetworkIDRequest) returns (GetNetworkIDResponse); + rpc GetNetworkName(GetNetworkNameRequest) returns (GetNetworkNameResponse); + rpc GetBlockchainID(GetBlockchainIDRequest) returns (GetBlockchainIDResponse); + rpc Peers(PeersRequest) returns (PeersResponse); + rpc IsBootstrapped(IsBootstrappedRequest) returns (IsBootstrappedResponse); + rpc Upgrades(UpgradesRequest) returns (UpgradesResponse); + rpc Uptime(UptimeRequest) returns (UptimeResponse); + rpc GetVMs(GetVMsRequest) returns (GetVMsResponse); +} + +message GetNodeVersionRequest {} +message GetNodeVersionResponse { + string version = 1; + string database_version = 2; + uint32 rpc_protocol_version = 3; + string git_commit = 4; + map vm_versions = 5; +} + +message GetNodeIDRequest {} +message GetNodeIDResponse { + string node_id = 1; + bytes node_pop = 2; +} + +message GetNodeIPRequest {} +message GetNodeIPResponse { + string ip = 1; +} + +message GetNetworkIDRequest {} +message GetNetworkIDResponse { + uint32 network_id = 1; +} + +message GetNetworkNameRequest {} +message GetNetworkNameResponse { + string network_name = 1; +} + +message GetBlockchainIDRequest { + string alias = 1; +} +message GetBlockchainIDResponse { + string blockchain_id = 1; +} + +message PeersRequest { + repeated string node_ids = 1; +} + +// PeerInfo provides metadata about a connected peer in the network +message PeerInfo { + string ip = 1; + string public_ip = 2; + string node_id = 3; + string version = 4; + string last_sent = 5; + string last_received = 6; + repeated string benched = 7; + uint32 observed_uptime = 8; + repeated string tracked_subnets = 9; +} + +message PeersResponse { + uint32 num_peers = 1; + repeated PeerInfo peers = 2; +} + +message IsBootstrappedRequest { + // Alias of the chain + // Can also be the string representation of the chain's ID + string chain = 1; +} +message IsBootstrappedResponse { + // True iff the chain exists and is done bootstrapping + bool is_bootstrapped = 1; +} + +message UpgradesRequest {} +message UpgradesResponse { + google.protobuf.Timestamp apricot_phase1_time = 1; + google.protobuf.Timestamp apricot_phase2_time = 2; + google.protobuf.Timestamp apricot_phase3_time = 3; + google.protobuf.Timestamp apricot_phase4_time = 4; + uint64 apricot_phase4_min_p_chain_height = 5; + google.protobuf.Timestamp apricot_phase5_time = 6; + google.protobuf.Timestamp apricot_phase_pre6_time = 7; + google.protobuf.Timestamp apricot_phase6_time = 8; + google.protobuf.Timestamp apricot_phase_post6_time = 9; + google.protobuf.Timestamp banff_time = 10; + google.protobuf.Timestamp cortina_time = 11; + string cortina_x_chain_stop_vertex_id = 12; + google.protobuf.Timestamp durango_time = 13; + google.protobuf.Timestamp etna_time = 14; + google.protobuf.Timestamp fortuna_time = 15; + google.protobuf.Timestamp granite_time = 16; +} + +message UptimeRequest {} +message UptimeResponse { + double rewarding_stake_percentage = 1; + double weighted_average_percentage = 2; +} + +message GetVMsRequest {} +message GetVMsResponse { + map vms = 1; + map fxs = 2; +} + +message VMAliases { + repeated string aliases = 1; +} diff --git a/proto/io/reader/reader.proto b/proto/io/reader/reader.proto index 8ac8806e96e0..4d85a4b9f0a2 100644 --- a/proto/io/reader/reader.proto +++ b/proto/io/reader/reader.proto @@ -18,7 +18,7 @@ message ReadResponse { // read is the payload in bytes bytes read = 1; // error is an error message - Error error = 2; + optional Error error = 2; } message Error { diff --git a/proto/metrics/v1/service.proto b/proto/metrics/v1/service.proto new file mode 100644 index 000000000000..d2f771477297 --- /dev/null +++ b/proto/metrics/v1/service.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package metrics.v1; + +option go_package = "github.com/ava-labs/avalanchego/proto/pb/metrics/v1;metricsv1"; + +service MetricsService { + rpc GetMetrics(MetricsRequest) returns (MetricsResponse); +} + +message MetricsRequest {} +message MetricsResponse { + repeated Metric metrics = 1; +} + +message Metric { + string name = 1; + string type = 2; + string help = 3; + double value = 4; + map labels = 5; +} diff --git a/proto/pb/admin/v1/adminv1connect/service.connect.go b/proto/pb/admin/v1/adminv1connect/service.connect.go new file mode 100644 index 000000000000..b3501229c29e --- /dev/null +++ b/proto/pb/admin/v1/adminv1connect/service.connect.go @@ -0,0 +1,426 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: admin/v1/service.proto + +package adminv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/ava-labs/avalanchego/proto/pb/admin/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // AdminServiceName is the fully-qualified name of the AdminService service. + AdminServiceName = "admin.v1.AdminService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // AdminServiceStartCPUProfilerProcedure is the fully-qualified name of the AdminService's + // StartCPUProfiler RPC. + AdminServiceStartCPUProfilerProcedure = "/admin.v1.AdminService/StartCPUProfiler" + // AdminServiceStopCPUProfilerProcedure is the fully-qualified name of the AdminService's + // StopCPUProfiler RPC. + AdminServiceStopCPUProfilerProcedure = "/admin.v1.AdminService/StopCPUProfiler" + // AdminServiceMemoryProfileProcedure is the fully-qualified name of the AdminService's + // MemoryProfile RPC. + AdminServiceMemoryProfileProcedure = "/admin.v1.AdminService/MemoryProfile" + // AdminServiceLockProfileProcedure is the fully-qualified name of the AdminService's LockProfile + // RPC. + AdminServiceLockProfileProcedure = "/admin.v1.AdminService/LockProfile" + // AdminServiceAliasProcedure is the fully-qualified name of the AdminService's Alias RPC. + AdminServiceAliasProcedure = "/admin.v1.AdminService/Alias" + // AdminServiceAliasChainProcedure is the fully-qualified name of the AdminService's AliasChain RPC. + AdminServiceAliasChainProcedure = "/admin.v1.AdminService/AliasChain" + // AdminServiceGetChainAliasesProcedure is the fully-qualified name of the AdminService's + // GetChainAliases RPC. + AdminServiceGetChainAliasesProcedure = "/admin.v1.AdminService/GetChainAliases" + // AdminServiceStacktraceProcedure is the fully-qualified name of the AdminService's Stacktrace RPC. + AdminServiceStacktraceProcedure = "/admin.v1.AdminService/Stacktrace" + // AdminServiceSetLoggerLevelProcedure is the fully-qualified name of the AdminService's + // SetLoggerLevel RPC. + AdminServiceSetLoggerLevelProcedure = "/admin.v1.AdminService/SetLoggerLevel" + // AdminServiceGetLoggerLevelProcedure is the fully-qualified name of the AdminService's + // GetLoggerLevel RPC. + AdminServiceGetLoggerLevelProcedure = "/admin.v1.AdminService/GetLoggerLevel" + // AdminServiceGetConfigProcedure is the fully-qualified name of the AdminService's GetConfig RPC. + AdminServiceGetConfigProcedure = "/admin.v1.AdminService/GetConfig" + // AdminServiceDBGetProcedure is the fully-qualified name of the AdminService's DBGet RPC. + AdminServiceDBGetProcedure = "/admin.v1.AdminService/DBGet" +) + +// AdminServiceClient is a client for the admin.v1.AdminService service. +type AdminServiceClient interface { + StartCPUProfiler(context.Context, *connect.Request[v1.StartCPUProfilerRequest]) (*connect.Response[v1.StartCPUProfilerResponse], error) + StopCPUProfiler(context.Context, *connect.Request[v1.StopCPUProfilerRequest]) (*connect.Response[v1.StopCPUProfilerResponse], error) + MemoryProfile(context.Context, *connect.Request[v1.MemoryProfileRequest]) (*connect.Response[v1.MemoryProfileResponse], error) + LockProfile(context.Context, *connect.Request[v1.LockProfileRequest]) (*connect.Response[v1.LockProfileResponse], error) + Alias(context.Context, *connect.Request[v1.AliasRequest]) (*connect.Response[v1.AliasResponse], error) + AliasChain(context.Context, *connect.Request[v1.AliasChainRequest]) (*connect.Response[v1.AliasChainResponse], error) + GetChainAliases(context.Context, *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) + Stacktrace(context.Context, *connect.Request[v1.StacktraceRequest]) (*connect.Response[v1.StacktraceResponse], error) + SetLoggerLevel(context.Context, *connect.Request[v1.SetLoggerLevelRequest]) (*connect.Response[v1.SetLoggerLevelResponse], error) + GetLoggerLevel(context.Context, *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) + GetConfig(context.Context, *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) + DBGet(context.Context, *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) +} + +// NewAdminServiceClient constructs a client for the admin.v1.AdminService service. By default, it +// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends +// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AdminServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + adminServiceMethods := v1.File_admin_v1_service_proto.Services().ByName("AdminService").Methods() + return &adminServiceClient{ + startCPUProfiler: connect.NewClient[v1.StartCPUProfilerRequest, v1.StartCPUProfilerResponse]( + httpClient, + baseURL+AdminServiceStartCPUProfilerProcedure, + connect.WithSchema(adminServiceMethods.ByName("StartCPUProfiler")), + connect.WithClientOptions(opts...), + ), + stopCPUProfiler: connect.NewClient[v1.StopCPUProfilerRequest, v1.StopCPUProfilerResponse]( + httpClient, + baseURL+AdminServiceStopCPUProfilerProcedure, + connect.WithSchema(adminServiceMethods.ByName("StopCPUProfiler")), + connect.WithClientOptions(opts...), + ), + memoryProfile: connect.NewClient[v1.MemoryProfileRequest, v1.MemoryProfileResponse]( + httpClient, + baseURL+AdminServiceMemoryProfileProcedure, + connect.WithSchema(adminServiceMethods.ByName("MemoryProfile")), + connect.WithClientOptions(opts...), + ), + lockProfile: connect.NewClient[v1.LockProfileRequest, v1.LockProfileResponse]( + httpClient, + baseURL+AdminServiceLockProfileProcedure, + connect.WithSchema(adminServiceMethods.ByName("LockProfile")), + connect.WithClientOptions(opts...), + ), + alias: connect.NewClient[v1.AliasRequest, v1.AliasResponse]( + httpClient, + baseURL+AdminServiceAliasProcedure, + connect.WithSchema(adminServiceMethods.ByName("Alias")), + connect.WithClientOptions(opts...), + ), + aliasChain: connect.NewClient[v1.AliasChainRequest, v1.AliasChainResponse]( + httpClient, + baseURL+AdminServiceAliasChainProcedure, + connect.WithSchema(adminServiceMethods.ByName("AliasChain")), + connect.WithClientOptions(opts...), + ), + getChainAliases: connect.NewClient[v1.GetChainAliasesRequest, v1.GetChainAliasesResponse]( + httpClient, + baseURL+AdminServiceGetChainAliasesProcedure, + connect.WithSchema(adminServiceMethods.ByName("GetChainAliases")), + connect.WithClientOptions(opts...), + ), + stacktrace: connect.NewClient[v1.StacktraceRequest, v1.StacktraceResponse]( + httpClient, + baseURL+AdminServiceStacktraceProcedure, + connect.WithSchema(adminServiceMethods.ByName("Stacktrace")), + connect.WithClientOptions(opts...), + ), + setLoggerLevel: connect.NewClient[v1.SetLoggerLevelRequest, v1.SetLoggerLevelResponse]( + httpClient, + baseURL+AdminServiceSetLoggerLevelProcedure, + connect.WithSchema(adminServiceMethods.ByName("SetLoggerLevel")), + connect.WithClientOptions(opts...), + ), + getLoggerLevel: connect.NewClient[v1.GetLoggerLevelRequest, v1.GetLoggerLevelResponse]( + httpClient, + baseURL+AdminServiceGetLoggerLevelProcedure, + connect.WithSchema(adminServiceMethods.ByName("GetLoggerLevel")), + connect.WithClientOptions(opts...), + ), + getConfig: connect.NewClient[v1.GetConfigRequest, v1.GetConfigResponse]( + httpClient, + baseURL+AdminServiceGetConfigProcedure, + connect.WithSchema(adminServiceMethods.ByName("GetConfig")), + connect.WithClientOptions(opts...), + ), + dBGet: connect.NewClient[v1.DBGetRequest, v1.DBGetResponse]( + httpClient, + baseURL+AdminServiceDBGetProcedure, + connect.WithSchema(adminServiceMethods.ByName("DBGet")), + connect.WithClientOptions(opts...), + ), + } +} + +// adminServiceClient implements AdminServiceClient. +type adminServiceClient struct { + startCPUProfiler *connect.Client[v1.StartCPUProfilerRequest, v1.StartCPUProfilerResponse] + stopCPUProfiler *connect.Client[v1.StopCPUProfilerRequest, v1.StopCPUProfilerResponse] + memoryProfile *connect.Client[v1.MemoryProfileRequest, v1.MemoryProfileResponse] + lockProfile *connect.Client[v1.LockProfileRequest, v1.LockProfileResponse] + alias *connect.Client[v1.AliasRequest, v1.AliasResponse] + aliasChain *connect.Client[v1.AliasChainRequest, v1.AliasChainResponse] + getChainAliases *connect.Client[v1.GetChainAliasesRequest, v1.GetChainAliasesResponse] + stacktrace *connect.Client[v1.StacktraceRequest, v1.StacktraceResponse] + setLoggerLevel *connect.Client[v1.SetLoggerLevelRequest, v1.SetLoggerLevelResponse] + getLoggerLevel *connect.Client[v1.GetLoggerLevelRequest, v1.GetLoggerLevelResponse] + getConfig *connect.Client[v1.GetConfigRequest, v1.GetConfigResponse] + dBGet *connect.Client[v1.DBGetRequest, v1.DBGetResponse] +} + +// StartCPUProfiler calls admin.v1.AdminService.StartCPUProfiler. +func (c *adminServiceClient) StartCPUProfiler(ctx context.Context, req *connect.Request[v1.StartCPUProfilerRequest]) (*connect.Response[v1.StartCPUProfilerResponse], error) { + return c.startCPUProfiler.CallUnary(ctx, req) +} + +// StopCPUProfiler calls admin.v1.AdminService.StopCPUProfiler. +func (c *adminServiceClient) StopCPUProfiler(ctx context.Context, req *connect.Request[v1.StopCPUProfilerRequest]) (*connect.Response[v1.StopCPUProfilerResponse], error) { + return c.stopCPUProfiler.CallUnary(ctx, req) +} + +// MemoryProfile calls admin.v1.AdminService.MemoryProfile. +func (c *adminServiceClient) MemoryProfile(ctx context.Context, req *connect.Request[v1.MemoryProfileRequest]) (*connect.Response[v1.MemoryProfileResponse], error) { + return c.memoryProfile.CallUnary(ctx, req) +} + +// LockProfile calls admin.v1.AdminService.LockProfile. +func (c *adminServiceClient) LockProfile(ctx context.Context, req *connect.Request[v1.LockProfileRequest]) (*connect.Response[v1.LockProfileResponse], error) { + return c.lockProfile.CallUnary(ctx, req) +} + +// Alias calls admin.v1.AdminService.Alias. +func (c *adminServiceClient) Alias(ctx context.Context, req *connect.Request[v1.AliasRequest]) (*connect.Response[v1.AliasResponse], error) { + return c.alias.CallUnary(ctx, req) +} + +// AliasChain calls admin.v1.AdminService.AliasChain. +func (c *adminServiceClient) AliasChain(ctx context.Context, req *connect.Request[v1.AliasChainRequest]) (*connect.Response[v1.AliasChainResponse], error) { + return c.aliasChain.CallUnary(ctx, req) +} + +// GetChainAliases calls admin.v1.AdminService.GetChainAliases. +func (c *adminServiceClient) GetChainAliases(ctx context.Context, req *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) { + return c.getChainAliases.CallUnary(ctx, req) +} + +// Stacktrace calls admin.v1.AdminService.Stacktrace. +func (c *adminServiceClient) Stacktrace(ctx context.Context, req *connect.Request[v1.StacktraceRequest]) (*connect.Response[v1.StacktraceResponse], error) { + return c.stacktrace.CallUnary(ctx, req) +} + +// SetLoggerLevel calls admin.v1.AdminService.SetLoggerLevel. +func (c *adminServiceClient) SetLoggerLevel(ctx context.Context, req *connect.Request[v1.SetLoggerLevelRequest]) (*connect.Response[v1.SetLoggerLevelResponse], error) { + return c.setLoggerLevel.CallUnary(ctx, req) +} + +// GetLoggerLevel calls admin.v1.AdminService.GetLoggerLevel. +func (c *adminServiceClient) GetLoggerLevel(ctx context.Context, req *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) { + return c.getLoggerLevel.CallUnary(ctx, req) +} + +// GetConfig calls admin.v1.AdminService.GetConfig. +func (c *adminServiceClient) GetConfig(ctx context.Context, req *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) { + return c.getConfig.CallUnary(ctx, req) +} + +// DBGet calls admin.v1.AdminService.DBGet. +func (c *adminServiceClient) DBGet(ctx context.Context, req *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) { + return c.dBGet.CallUnary(ctx, req) +} + +// AdminServiceHandler is an implementation of the admin.v1.AdminService service. +type AdminServiceHandler interface { + StartCPUProfiler(context.Context, *connect.Request[v1.StartCPUProfilerRequest]) (*connect.Response[v1.StartCPUProfilerResponse], error) + StopCPUProfiler(context.Context, *connect.Request[v1.StopCPUProfilerRequest]) (*connect.Response[v1.StopCPUProfilerResponse], error) + MemoryProfile(context.Context, *connect.Request[v1.MemoryProfileRequest]) (*connect.Response[v1.MemoryProfileResponse], error) + LockProfile(context.Context, *connect.Request[v1.LockProfileRequest]) (*connect.Response[v1.LockProfileResponse], error) + Alias(context.Context, *connect.Request[v1.AliasRequest]) (*connect.Response[v1.AliasResponse], error) + AliasChain(context.Context, *connect.Request[v1.AliasChainRequest]) (*connect.Response[v1.AliasChainResponse], error) + GetChainAliases(context.Context, *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) + Stacktrace(context.Context, *connect.Request[v1.StacktraceRequest]) (*connect.Response[v1.StacktraceResponse], error) + SetLoggerLevel(context.Context, *connect.Request[v1.SetLoggerLevelRequest]) (*connect.Response[v1.SetLoggerLevelResponse], error) + GetLoggerLevel(context.Context, *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) + GetConfig(context.Context, *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) + DBGet(context.Context, *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) +} + +// NewAdminServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + adminServiceMethods := v1.File_admin_v1_service_proto.Services().ByName("AdminService").Methods() + adminServiceStartCPUProfilerHandler := connect.NewUnaryHandler( + AdminServiceStartCPUProfilerProcedure, + svc.StartCPUProfiler, + connect.WithSchema(adminServiceMethods.ByName("StartCPUProfiler")), + connect.WithHandlerOptions(opts...), + ) + adminServiceStopCPUProfilerHandler := connect.NewUnaryHandler( + AdminServiceStopCPUProfilerProcedure, + svc.StopCPUProfiler, + connect.WithSchema(adminServiceMethods.ByName("StopCPUProfiler")), + connect.WithHandlerOptions(opts...), + ) + adminServiceMemoryProfileHandler := connect.NewUnaryHandler( + AdminServiceMemoryProfileProcedure, + svc.MemoryProfile, + connect.WithSchema(adminServiceMethods.ByName("MemoryProfile")), + connect.WithHandlerOptions(opts...), + ) + adminServiceLockProfileHandler := connect.NewUnaryHandler( + AdminServiceLockProfileProcedure, + svc.LockProfile, + connect.WithSchema(adminServiceMethods.ByName("LockProfile")), + connect.WithHandlerOptions(opts...), + ) + adminServiceAliasHandler := connect.NewUnaryHandler( + AdminServiceAliasProcedure, + svc.Alias, + connect.WithSchema(adminServiceMethods.ByName("Alias")), + connect.WithHandlerOptions(opts...), + ) + adminServiceAliasChainHandler := connect.NewUnaryHandler( + AdminServiceAliasChainProcedure, + svc.AliasChain, + connect.WithSchema(adminServiceMethods.ByName("AliasChain")), + connect.WithHandlerOptions(opts...), + ) + adminServiceGetChainAliasesHandler := connect.NewUnaryHandler( + AdminServiceGetChainAliasesProcedure, + svc.GetChainAliases, + connect.WithSchema(adminServiceMethods.ByName("GetChainAliases")), + connect.WithHandlerOptions(opts...), + ) + adminServiceStacktraceHandler := connect.NewUnaryHandler( + AdminServiceStacktraceProcedure, + svc.Stacktrace, + connect.WithSchema(adminServiceMethods.ByName("Stacktrace")), + connect.WithHandlerOptions(opts...), + ) + adminServiceSetLoggerLevelHandler := connect.NewUnaryHandler( + AdminServiceSetLoggerLevelProcedure, + svc.SetLoggerLevel, + connect.WithSchema(adminServiceMethods.ByName("SetLoggerLevel")), + connect.WithHandlerOptions(opts...), + ) + adminServiceGetLoggerLevelHandler := connect.NewUnaryHandler( + AdminServiceGetLoggerLevelProcedure, + svc.GetLoggerLevel, + connect.WithSchema(adminServiceMethods.ByName("GetLoggerLevel")), + connect.WithHandlerOptions(opts...), + ) + adminServiceGetConfigHandler := connect.NewUnaryHandler( + AdminServiceGetConfigProcedure, + svc.GetConfig, + connect.WithSchema(adminServiceMethods.ByName("GetConfig")), + connect.WithHandlerOptions(opts...), + ) + adminServiceDBGetHandler := connect.NewUnaryHandler( + AdminServiceDBGetProcedure, + svc.DBGet, + connect.WithSchema(adminServiceMethods.ByName("DBGet")), + connect.WithHandlerOptions(opts...), + ) + return "/admin.v1.AdminService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case AdminServiceStartCPUProfilerProcedure: + adminServiceStartCPUProfilerHandler.ServeHTTP(w, r) + case AdminServiceStopCPUProfilerProcedure: + adminServiceStopCPUProfilerHandler.ServeHTTP(w, r) + case AdminServiceMemoryProfileProcedure: + adminServiceMemoryProfileHandler.ServeHTTP(w, r) + case AdminServiceLockProfileProcedure: + adminServiceLockProfileHandler.ServeHTTP(w, r) + case AdminServiceAliasProcedure: + adminServiceAliasHandler.ServeHTTP(w, r) + case AdminServiceAliasChainProcedure: + adminServiceAliasChainHandler.ServeHTTP(w, r) + case AdminServiceGetChainAliasesProcedure: + adminServiceGetChainAliasesHandler.ServeHTTP(w, r) + case AdminServiceStacktraceProcedure: + adminServiceStacktraceHandler.ServeHTTP(w, r) + case AdminServiceSetLoggerLevelProcedure: + adminServiceSetLoggerLevelHandler.ServeHTTP(w, r) + case AdminServiceGetLoggerLevelProcedure: + adminServiceGetLoggerLevelHandler.ServeHTTP(w, r) + case AdminServiceGetConfigProcedure: + adminServiceGetConfigHandler.ServeHTTP(w, r) + case AdminServiceDBGetProcedure: + adminServiceDBGetHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedAdminServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedAdminServiceHandler struct{} + +func (UnimplementedAdminServiceHandler) StartCPUProfiler(context.Context, *connect.Request[v1.StartCPUProfilerRequest]) (*connect.Response[v1.StartCPUProfilerResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.StartCPUProfiler is not implemented")) +} + +func (UnimplementedAdminServiceHandler) StopCPUProfiler(context.Context, *connect.Request[v1.StopCPUProfilerRequest]) (*connect.Response[v1.StopCPUProfilerResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.StopCPUProfiler is not implemented")) +} + +func (UnimplementedAdminServiceHandler) MemoryProfile(context.Context, *connect.Request[v1.MemoryProfileRequest]) (*connect.Response[v1.MemoryProfileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.MemoryProfile is not implemented")) +} + +func (UnimplementedAdminServiceHandler) LockProfile(context.Context, *connect.Request[v1.LockProfileRequest]) (*connect.Response[v1.LockProfileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.LockProfile is not implemented")) +} + +func (UnimplementedAdminServiceHandler) Alias(context.Context, *connect.Request[v1.AliasRequest]) (*connect.Response[v1.AliasResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.Alias is not implemented")) +} + +func (UnimplementedAdminServiceHandler) AliasChain(context.Context, *connect.Request[v1.AliasChainRequest]) (*connect.Response[v1.AliasChainResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.AliasChain is not implemented")) +} + +func (UnimplementedAdminServiceHandler) GetChainAliases(context.Context, *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.GetChainAliases is not implemented")) +} + +func (UnimplementedAdminServiceHandler) Stacktrace(context.Context, *connect.Request[v1.StacktraceRequest]) (*connect.Response[v1.StacktraceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.Stacktrace is not implemented")) +} + +func (UnimplementedAdminServiceHandler) SetLoggerLevel(context.Context, *connect.Request[v1.SetLoggerLevelRequest]) (*connect.Response[v1.SetLoggerLevelResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.SetLoggerLevel is not implemented")) +} + +func (UnimplementedAdminServiceHandler) GetLoggerLevel(context.Context, *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.GetLoggerLevel is not implemented")) +} + +func (UnimplementedAdminServiceHandler) GetConfig(context.Context, *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.GetConfig is not implemented")) +} + +func (UnimplementedAdminServiceHandler) DBGet(context.Context, *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.DBGet is not implemented")) +} diff --git a/proto/pb/admin/v1/service.pb.go b/proto/pb/admin/v1/service.pb.go new file mode 100644 index 000000000000..37c6e5af5805 --- /dev/null +++ b/proto/pb/admin/v1/service.pb.go @@ -0,0 +1,1447 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc (unknown) +// source: admin/v1/service.proto + +package adminv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ErrorCode int32 + +const ( + ErrorCode_ERROR_CODE_UNSPECIFIED ErrorCode = 0 + ErrorCode_ERROR_CODE_NOT_FOUND ErrorCode = 1 + ErrorCode_ERROR_CODE_DATABASE_ERROR ErrorCode = 2 +) + +// Enum value maps for ErrorCode. +var ( + ErrorCode_name = map[int32]string{ + 0: "ERROR_CODE_UNSPECIFIED", + 1: "ERROR_CODE_NOT_FOUND", + 2: "ERROR_CODE_DATABASE_ERROR", + } + ErrorCode_value = map[string]int32{ + "ERROR_CODE_UNSPECIFIED": 0, + "ERROR_CODE_NOT_FOUND": 1, + "ERROR_CODE_DATABASE_ERROR": 2, + } +) + +func (x ErrorCode) Enum() *ErrorCode { + p := new(ErrorCode) + *p = x + return p +} + +func (x ErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_admin_v1_service_proto_enumTypes[0].Descriptor() +} + +func (ErrorCode) Type() protoreflect.EnumType { + return &file_admin_v1_service_proto_enumTypes[0] +} + +func (x ErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCode.Descriptor instead. +func (ErrorCode) EnumDescriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{0} +} + +type StartCPUProfilerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StartCPUProfilerRequest) Reset() { + *x = StartCPUProfilerRequest{} + mi := &file_admin_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartCPUProfilerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartCPUProfilerRequest) ProtoMessage() {} + +func (x *StartCPUProfilerRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartCPUProfilerRequest.ProtoReflect.Descriptor instead. +func (*StartCPUProfilerRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{0} +} + +type StartCPUProfilerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StartCPUProfilerResponse) Reset() { + *x = StartCPUProfilerResponse{} + mi := &file_admin_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartCPUProfilerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartCPUProfilerResponse) ProtoMessage() {} + +func (x *StartCPUProfilerResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartCPUProfilerResponse.ProtoReflect.Descriptor instead. +func (*StartCPUProfilerResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{1} +} + +type StopCPUProfilerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopCPUProfilerRequest) Reset() { + *x = StopCPUProfilerRequest{} + mi := &file_admin_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StopCPUProfilerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopCPUProfilerRequest) ProtoMessage() {} + +func (x *StopCPUProfilerRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopCPUProfilerRequest.ProtoReflect.Descriptor instead. +func (*StopCPUProfilerRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{2} +} + +type StopCPUProfilerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopCPUProfilerResponse) Reset() { + *x = StopCPUProfilerResponse{} + mi := &file_admin_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StopCPUProfilerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopCPUProfilerResponse) ProtoMessage() {} + +func (x *StopCPUProfilerResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopCPUProfilerResponse.ProtoReflect.Descriptor instead. +func (*StopCPUProfilerResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{3} +} + +type MemoryProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MemoryProfileRequest) Reset() { + *x = MemoryProfileRequest{} + mi := &file_admin_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoryProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryProfileRequest) ProtoMessage() {} + +func (x *MemoryProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoryProfileRequest.ProtoReflect.Descriptor instead. +func (*MemoryProfileRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{4} +} + +type MemoryProfileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MemoryProfileResponse) Reset() { + *x = MemoryProfileResponse{} + mi := &file_admin_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoryProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryProfileResponse) ProtoMessage() {} + +func (x *MemoryProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoryProfileResponse.ProtoReflect.Descriptor instead. +func (*MemoryProfileResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{5} +} + +type LockProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LockProfileRequest) Reset() { + *x = LockProfileRequest{} + mi := &file_admin_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LockProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LockProfileRequest) ProtoMessage() {} + +func (x *LockProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LockProfileRequest.ProtoReflect.Descriptor instead. +func (*LockProfileRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{6} +} + +type LockProfileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LockProfileResponse) Reset() { + *x = LockProfileResponse{} + mi := &file_admin_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LockProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LockProfileResponse) ProtoMessage() {} + +func (x *LockProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LockProfileResponse.ProtoReflect.Descriptor instead. +func (*LockProfileResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{7} +} + +type AliasRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` +} + +func (x *AliasRequest) Reset() { + *x = AliasRequest{} + mi := &file_admin_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AliasRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AliasRequest) ProtoMessage() {} + +func (x *AliasRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AliasRequest.ProtoReflect.Descriptor instead. +func (*AliasRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *AliasRequest) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *AliasRequest) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +type AliasResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AliasResponse) Reset() { + *x = AliasResponse{} + mi := &file_admin_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AliasResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AliasResponse) ProtoMessage() {} + +func (x *AliasResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AliasResponse.ProtoReflect.Descriptor instead. +func (*AliasResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{9} +} + +type AliasChainRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` +} + +func (x *AliasChainRequest) Reset() { + *x = AliasChainRequest{} + mi := &file_admin_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AliasChainRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AliasChainRequest) ProtoMessage() {} + +func (x *AliasChainRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AliasChainRequest.ProtoReflect.Descriptor instead. +func (*AliasChainRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *AliasChainRequest) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +func (x *AliasChainRequest) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +type AliasChainResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AliasChainResponse) Reset() { + *x = AliasChainResponse{} + mi := &file_admin_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AliasChainResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AliasChainResponse) ProtoMessage() {} + +func (x *AliasChainResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AliasChainResponse.ProtoReflect.Descriptor instead. +func (*AliasChainResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{11} +} + +type GetChainAliasesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` +} + +func (x *GetChainAliasesRequest) Reset() { + *x = GetChainAliasesRequest{} + mi := &file_admin_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetChainAliasesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChainAliasesRequest) ProtoMessage() {} + +func (x *GetChainAliasesRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChainAliasesRequest.ProtoReflect.Descriptor instead. +func (*GetChainAliasesRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{12} +} + +func (x *GetChainAliasesRequest) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +type GetChainAliasesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` +} + +func (x *GetChainAliasesResponse) Reset() { + *x = GetChainAliasesResponse{} + mi := &file_admin_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetChainAliasesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChainAliasesResponse) ProtoMessage() {} + +func (x *GetChainAliasesResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChainAliasesResponse.ProtoReflect.Descriptor instead. +func (*GetChainAliasesResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{13} +} + +func (x *GetChainAliasesResponse) GetAliases() []string { + if x != nil { + return x.Aliases + } + return nil +} + +type StacktraceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StacktraceRequest) Reset() { + *x = StacktraceRequest{} + mi := &file_admin_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StacktraceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StacktraceRequest) ProtoMessage() {} + +func (x *StacktraceRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StacktraceRequest.ProtoReflect.Descriptor instead. +func (*StacktraceRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{14} +} + +type StacktraceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StacktraceResponse) Reset() { + *x = StacktraceResponse{} + mi := &file_admin_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StacktraceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StacktraceResponse) ProtoMessage() {} + +func (x *StacktraceResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StacktraceResponse.ProtoReflect.Descriptor instead. +func (*StacktraceResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{15} +} + +type SetLoggerLevelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LoggerName string `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"` + LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` + DisplayLevel string `protobuf:"bytes,3,opt,name=display_level,json=displayLevel,proto3" json:"display_level,omitempty"` +} + +func (x *SetLoggerLevelRequest) Reset() { + *x = SetLoggerLevelRequest{} + mi := &file_admin_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetLoggerLevelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetLoggerLevelRequest) ProtoMessage() {} + +func (x *SetLoggerLevelRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetLoggerLevelRequest.ProtoReflect.Descriptor instead. +func (*SetLoggerLevelRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{16} +} + +func (x *SetLoggerLevelRequest) GetLoggerName() string { + if x != nil { + return x.LoggerName + } + return "" +} + +func (x *SetLoggerLevelRequest) GetLogLevel() string { + if x != nil { + return x.LogLevel + } + return "" +} + +func (x *SetLoggerLevelRequest) GetDisplayLevel() string { + if x != nil { + return x.DisplayLevel + } + return "" +} + +type SetLoggerLevelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LoggerLevels map[string]*LogAndDisplayLevels `protobuf:"bytes,1,rep,name=logger_levels,json=loggerLevels,proto3" json:"logger_levels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SetLoggerLevelResponse) Reset() { + *x = SetLoggerLevelResponse{} + mi := &file_admin_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetLoggerLevelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetLoggerLevelResponse) ProtoMessage() {} + +func (x *SetLoggerLevelResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetLoggerLevelResponse.ProtoReflect.Descriptor instead. +func (*SetLoggerLevelResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{17} +} + +func (x *SetLoggerLevelResponse) GetLoggerLevels() map[string]*LogAndDisplayLevels { + if x != nil { + return x.LoggerLevels + } + return nil +} + +type GetLoggerLevelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LoggerName string `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"` +} + +func (x *GetLoggerLevelRequest) Reset() { + *x = GetLoggerLevelRequest{} + mi := &file_admin_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLoggerLevelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLoggerLevelRequest) ProtoMessage() {} + +func (x *GetLoggerLevelRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLoggerLevelRequest.ProtoReflect.Descriptor instead. +func (*GetLoggerLevelRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{18} +} + +func (x *GetLoggerLevelRequest) GetLoggerName() string { + if x != nil { + return x.LoggerName + } + return "" +} + +type GetLoggerLevelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LoggerLevels map[string]*LogAndDisplayLevels `protobuf:"bytes,1,rep,name=logger_levels,json=loggerLevels,proto3" json:"logger_levels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetLoggerLevelResponse) Reset() { + *x = GetLoggerLevelResponse{} + mi := &file_admin_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLoggerLevelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLoggerLevelResponse) ProtoMessage() {} + +func (x *GetLoggerLevelResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLoggerLevelResponse.ProtoReflect.Descriptor instead. +func (*GetLoggerLevelResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{19} +} + +func (x *GetLoggerLevelResponse) GetLoggerLevels() map[string]*LogAndDisplayLevels { + if x != nil { + return x.LoggerLevels + } + return nil +} + +type GetConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetConfigRequest) Reset() { + *x = GetConfigRequest{} + mi := &file_admin_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigRequest) ProtoMessage() {} + +func (x *GetConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigRequest.ProtoReflect.Descriptor instead. +func (*GetConfigRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{20} +} + +type GetConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConfigJson string `protobuf:"bytes,1,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"` +} + +func (x *GetConfigResponse) Reset() { + *x = GetConfigResponse{} + mi := &file_admin_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigResponse) ProtoMessage() {} + +func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead. +func (*GetConfigResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{21} +} + +func (x *GetConfigResponse) GetConfigJson() string { + if x != nil { + return x.ConfigJson + } + return "" +} + +type DBGetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *DBGetRequest) Reset() { + *x = DBGetRequest{} + mi := &file_admin_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DBGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBGetRequest) ProtoMessage() {} + +func (x *DBGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBGetRequest.ProtoReflect.Descriptor instead. +func (*DBGetRequest) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{22} +} + +func (x *DBGetRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type DBGetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + ErrorCode ErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=admin.v1.ErrorCode" json:"error_code,omitempty"` +} + +func (x *DBGetResponse) Reset() { + *x = DBGetResponse{} + mi := &file_admin_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DBGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBGetResponse) ProtoMessage() {} + +func (x *DBGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBGetResponse.ProtoReflect.Descriptor instead. +func (*DBGetResponse) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{23} +} + +func (x *DBGetResponse) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *DBGetResponse) GetErrorCode() ErrorCode { + if x != nil { + return x.ErrorCode + } + return ErrorCode_ERROR_CODE_UNSPECIFIED +} + +type LogAndDisplayLevels struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LogLevel string `protobuf:"bytes,1,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` + DisplayLevel string `protobuf:"bytes,2,opt,name=display_level,json=displayLevel,proto3" json:"display_level,omitempty"` +} + +func (x *LogAndDisplayLevels) Reset() { + *x = LogAndDisplayLevels{} + mi := &file_admin_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogAndDisplayLevels) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogAndDisplayLevels) ProtoMessage() {} + +func (x *LogAndDisplayLevels) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogAndDisplayLevels.ProtoReflect.Descriptor instead. +func (*LogAndDisplayLevels) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{24} +} + +func (x *LogAndDisplayLevels) GetLogLevel() string { + if x != nil { + return x.LogLevel + } + return "" +} + +func (x *LogAndDisplayLevels) GetDisplayLevel() string { + if x != nil { + return x.DisplayLevel + } + return "" +} + +type VMAliases struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` +} + +func (x *VMAliases) Reset() { + *x = VMAliases{} + mi := &file_admin_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VMAliases) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMAliases) ProtoMessage() {} + +func (x *VMAliases) ProtoReflect() protoreflect.Message { + mi := &file_admin_v1_service_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VMAliases.ProtoReflect.Descriptor instead. +func (*VMAliases) Descriptor() ([]byte, []int) { + return file_admin_v1_service_proto_rawDescGZIP(), []int{25} +} + +func (x *VMAliases) GetAliases() []string { + if x != nil { + return x.Aliases + } + return nil +} + +var File_admin_v1_service_proto protoreflect.FileDescriptor + +var file_admin_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1a, 0x0a, + 0x18, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x6f, + 0x70, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x50, 0x55, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, + 0x0a, 0x14, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x14, 0x0a, 0x12, 0x4c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x0c, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x0f, + 0x0a, 0x0d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3f, 0x0a, 0x11, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x22, 0x14, 0x0a, 0x12, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x14, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7a, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x23, 0x0a, + 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, + 0x0d, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x1a, 0x5e, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x41, 0x6e, 0x64, 0x44, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0d, 0x6c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x73, 0x1a, 0x5e, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0x20, + 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x22, 0x59, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x57, 0x0a, 0x13, 0x4c, + 0x6f, 0x67, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x22, 0x25, 0x0a, 0x09, 0x56, 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x2a, 0x60, 0x0a, 0x09, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x1d, + 0x0a, 0x19, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, + 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xad, 0x07, + 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, + 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x12, 0x21, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0f, 0x53, 0x74, 0x6f, + 0x70, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x50, 0x55, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x50, + 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x38, 0x0a, 0x05, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x53, 0x74, + 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x44, 0x42, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3b, 0x5a, + 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, + 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, + 0x76, 0x31, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_admin_v1_service_proto_rawDescOnce sync.Once + file_admin_v1_service_proto_rawDescData = file_admin_v1_service_proto_rawDesc +) + +func file_admin_v1_service_proto_rawDescGZIP() []byte { + file_admin_v1_service_proto_rawDescOnce.Do(func() { + file_admin_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_admin_v1_service_proto_rawDescData) + }) + return file_admin_v1_service_proto_rawDescData +} + +var file_admin_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_admin_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_admin_v1_service_proto_goTypes = []any{ + (ErrorCode)(0), // 0: admin.v1.ErrorCode + (*StartCPUProfilerRequest)(nil), // 1: admin.v1.StartCPUProfilerRequest + (*StartCPUProfilerResponse)(nil), // 2: admin.v1.StartCPUProfilerResponse + (*StopCPUProfilerRequest)(nil), // 3: admin.v1.StopCPUProfilerRequest + (*StopCPUProfilerResponse)(nil), // 4: admin.v1.StopCPUProfilerResponse + (*MemoryProfileRequest)(nil), // 5: admin.v1.MemoryProfileRequest + (*MemoryProfileResponse)(nil), // 6: admin.v1.MemoryProfileResponse + (*LockProfileRequest)(nil), // 7: admin.v1.LockProfileRequest + (*LockProfileResponse)(nil), // 8: admin.v1.LockProfileResponse + (*AliasRequest)(nil), // 9: admin.v1.AliasRequest + (*AliasResponse)(nil), // 10: admin.v1.AliasResponse + (*AliasChainRequest)(nil), // 11: admin.v1.AliasChainRequest + (*AliasChainResponse)(nil), // 12: admin.v1.AliasChainResponse + (*GetChainAliasesRequest)(nil), // 13: admin.v1.GetChainAliasesRequest + (*GetChainAliasesResponse)(nil), // 14: admin.v1.GetChainAliasesResponse + (*StacktraceRequest)(nil), // 15: admin.v1.StacktraceRequest + (*StacktraceResponse)(nil), // 16: admin.v1.StacktraceResponse + (*SetLoggerLevelRequest)(nil), // 17: admin.v1.SetLoggerLevelRequest + (*SetLoggerLevelResponse)(nil), // 18: admin.v1.SetLoggerLevelResponse + (*GetLoggerLevelRequest)(nil), // 19: admin.v1.GetLoggerLevelRequest + (*GetLoggerLevelResponse)(nil), // 20: admin.v1.GetLoggerLevelResponse + (*GetConfigRequest)(nil), // 21: admin.v1.GetConfigRequest + (*GetConfigResponse)(nil), // 22: admin.v1.GetConfigResponse + (*DBGetRequest)(nil), // 23: admin.v1.DBGetRequest + (*DBGetResponse)(nil), // 24: admin.v1.DBGetResponse + (*LogAndDisplayLevels)(nil), // 25: admin.v1.LogAndDisplayLevels + (*VMAliases)(nil), // 26: admin.v1.VMAliases + nil, // 27: admin.v1.SetLoggerLevelResponse.LoggerLevelsEntry + nil, // 28: admin.v1.GetLoggerLevelResponse.LoggerLevelsEntry +} +var file_admin_v1_service_proto_depIdxs = []int32{ + 27, // 0: admin.v1.SetLoggerLevelResponse.logger_levels:type_name -> admin.v1.SetLoggerLevelResponse.LoggerLevelsEntry + 28, // 1: admin.v1.GetLoggerLevelResponse.logger_levels:type_name -> admin.v1.GetLoggerLevelResponse.LoggerLevelsEntry + 0, // 2: admin.v1.DBGetResponse.error_code:type_name -> admin.v1.ErrorCode + 25, // 3: admin.v1.SetLoggerLevelResponse.LoggerLevelsEntry.value:type_name -> admin.v1.LogAndDisplayLevels + 25, // 4: admin.v1.GetLoggerLevelResponse.LoggerLevelsEntry.value:type_name -> admin.v1.LogAndDisplayLevels + 1, // 5: admin.v1.AdminService.StartCPUProfiler:input_type -> admin.v1.StartCPUProfilerRequest + 3, // 6: admin.v1.AdminService.StopCPUProfiler:input_type -> admin.v1.StopCPUProfilerRequest + 5, // 7: admin.v1.AdminService.MemoryProfile:input_type -> admin.v1.MemoryProfileRequest + 7, // 8: admin.v1.AdminService.LockProfile:input_type -> admin.v1.LockProfileRequest + 9, // 9: admin.v1.AdminService.Alias:input_type -> admin.v1.AliasRequest + 11, // 10: admin.v1.AdminService.AliasChain:input_type -> admin.v1.AliasChainRequest + 13, // 11: admin.v1.AdminService.GetChainAliases:input_type -> admin.v1.GetChainAliasesRequest + 15, // 12: admin.v1.AdminService.Stacktrace:input_type -> admin.v1.StacktraceRequest + 17, // 13: admin.v1.AdminService.SetLoggerLevel:input_type -> admin.v1.SetLoggerLevelRequest + 19, // 14: admin.v1.AdminService.GetLoggerLevel:input_type -> admin.v1.GetLoggerLevelRequest + 21, // 15: admin.v1.AdminService.GetConfig:input_type -> admin.v1.GetConfigRequest + 23, // 16: admin.v1.AdminService.DBGet:input_type -> admin.v1.DBGetRequest + 2, // 17: admin.v1.AdminService.StartCPUProfiler:output_type -> admin.v1.StartCPUProfilerResponse + 4, // 18: admin.v1.AdminService.StopCPUProfiler:output_type -> admin.v1.StopCPUProfilerResponse + 6, // 19: admin.v1.AdminService.MemoryProfile:output_type -> admin.v1.MemoryProfileResponse + 8, // 20: admin.v1.AdminService.LockProfile:output_type -> admin.v1.LockProfileResponse + 10, // 21: admin.v1.AdminService.Alias:output_type -> admin.v1.AliasResponse + 12, // 22: admin.v1.AdminService.AliasChain:output_type -> admin.v1.AliasChainResponse + 14, // 23: admin.v1.AdminService.GetChainAliases:output_type -> admin.v1.GetChainAliasesResponse + 16, // 24: admin.v1.AdminService.Stacktrace:output_type -> admin.v1.StacktraceResponse + 18, // 25: admin.v1.AdminService.SetLoggerLevel:output_type -> admin.v1.SetLoggerLevelResponse + 20, // 26: admin.v1.AdminService.GetLoggerLevel:output_type -> admin.v1.GetLoggerLevelResponse + 22, // 27: admin.v1.AdminService.GetConfig:output_type -> admin.v1.GetConfigResponse + 24, // 28: admin.v1.AdminService.DBGet:output_type -> admin.v1.DBGetResponse + 17, // [17:29] is the sub-list for method output_type + 5, // [5:17] 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 +} + +func init() { file_admin_v1_service_proto_init() } +func file_admin_v1_service_proto_init() { + if File_admin_v1_service_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_admin_v1_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 28, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_admin_v1_service_proto_goTypes, + DependencyIndexes: file_admin_v1_service_proto_depIdxs, + EnumInfos: file_admin_v1_service_proto_enumTypes, + MessageInfos: file_admin_v1_service_proto_msgTypes, + }.Build() + File_admin_v1_service_proto = out.File + file_admin_v1_service_proto_rawDesc = nil + file_admin_v1_service_proto_goTypes = nil + file_admin_v1_service_proto_depIdxs = nil +} diff --git a/proto/pb/admin/v1/service_grpc.pb.go b/proto/pb/admin/v1/service_grpc.pb.go new file mode 100644 index 000000000000..751c3db307e4 --- /dev/null +++ b/proto/pb/admin/v1/service_grpc.pb.go @@ -0,0 +1,516 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: admin/v1/service.proto + +package adminv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + AdminService_StartCPUProfiler_FullMethodName = "/admin.v1.AdminService/StartCPUProfiler" + AdminService_StopCPUProfiler_FullMethodName = "/admin.v1.AdminService/StopCPUProfiler" + AdminService_MemoryProfile_FullMethodName = "/admin.v1.AdminService/MemoryProfile" + AdminService_LockProfile_FullMethodName = "/admin.v1.AdminService/LockProfile" + AdminService_Alias_FullMethodName = "/admin.v1.AdminService/Alias" + AdminService_AliasChain_FullMethodName = "/admin.v1.AdminService/AliasChain" + AdminService_GetChainAliases_FullMethodName = "/admin.v1.AdminService/GetChainAliases" + AdminService_Stacktrace_FullMethodName = "/admin.v1.AdminService/Stacktrace" + AdminService_SetLoggerLevel_FullMethodName = "/admin.v1.AdminService/SetLoggerLevel" + AdminService_GetLoggerLevel_FullMethodName = "/admin.v1.AdminService/GetLoggerLevel" + AdminService_GetConfig_FullMethodName = "/admin.v1.AdminService/GetConfig" + AdminService_DBGet_FullMethodName = "/admin.v1.AdminService/DBGet" +) + +// AdminServiceClient is the client API for AdminService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AdminServiceClient interface { + StartCPUProfiler(ctx context.Context, in *StartCPUProfilerRequest, opts ...grpc.CallOption) (*StartCPUProfilerResponse, error) + StopCPUProfiler(ctx context.Context, in *StopCPUProfilerRequest, opts ...grpc.CallOption) (*StopCPUProfilerResponse, error) + MemoryProfile(ctx context.Context, in *MemoryProfileRequest, opts ...grpc.CallOption) (*MemoryProfileResponse, error) + LockProfile(ctx context.Context, in *LockProfileRequest, opts ...grpc.CallOption) (*LockProfileResponse, error) + Alias(ctx context.Context, in *AliasRequest, opts ...grpc.CallOption) (*AliasResponse, error) + AliasChain(ctx context.Context, in *AliasChainRequest, opts ...grpc.CallOption) (*AliasChainResponse, error) + GetChainAliases(ctx context.Context, in *GetChainAliasesRequest, opts ...grpc.CallOption) (*GetChainAliasesResponse, error) + Stacktrace(ctx context.Context, in *StacktraceRequest, opts ...grpc.CallOption) (*StacktraceResponse, error) + SetLoggerLevel(ctx context.Context, in *SetLoggerLevelRequest, opts ...grpc.CallOption) (*SetLoggerLevelResponse, error) + GetLoggerLevel(ctx context.Context, in *GetLoggerLevelRequest, opts ...grpc.CallOption) (*GetLoggerLevelResponse, error) + GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) + DBGet(ctx context.Context, in *DBGetRequest, opts ...grpc.CallOption) (*DBGetResponse, error) +} + +type adminServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAdminServiceClient(cc grpc.ClientConnInterface) AdminServiceClient { + return &adminServiceClient{cc} +} + +func (c *adminServiceClient) StartCPUProfiler(ctx context.Context, in *StartCPUProfilerRequest, opts ...grpc.CallOption) (*StartCPUProfilerResponse, error) { + out := new(StartCPUProfilerResponse) + err := c.cc.Invoke(ctx, AdminService_StartCPUProfiler_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) StopCPUProfiler(ctx context.Context, in *StopCPUProfilerRequest, opts ...grpc.CallOption) (*StopCPUProfilerResponse, error) { + out := new(StopCPUProfilerResponse) + err := c.cc.Invoke(ctx, AdminService_StopCPUProfiler_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) MemoryProfile(ctx context.Context, in *MemoryProfileRequest, opts ...grpc.CallOption) (*MemoryProfileResponse, error) { + out := new(MemoryProfileResponse) + err := c.cc.Invoke(ctx, AdminService_MemoryProfile_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) LockProfile(ctx context.Context, in *LockProfileRequest, opts ...grpc.CallOption) (*LockProfileResponse, error) { + out := new(LockProfileResponse) + err := c.cc.Invoke(ctx, AdminService_LockProfile_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) Alias(ctx context.Context, in *AliasRequest, opts ...grpc.CallOption) (*AliasResponse, error) { + out := new(AliasResponse) + err := c.cc.Invoke(ctx, AdminService_Alias_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) AliasChain(ctx context.Context, in *AliasChainRequest, opts ...grpc.CallOption) (*AliasChainResponse, error) { + out := new(AliasChainResponse) + err := c.cc.Invoke(ctx, AdminService_AliasChain_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) GetChainAliases(ctx context.Context, in *GetChainAliasesRequest, opts ...grpc.CallOption) (*GetChainAliasesResponse, error) { + out := new(GetChainAliasesResponse) + err := c.cc.Invoke(ctx, AdminService_GetChainAliases_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) Stacktrace(ctx context.Context, in *StacktraceRequest, opts ...grpc.CallOption) (*StacktraceResponse, error) { + out := new(StacktraceResponse) + err := c.cc.Invoke(ctx, AdminService_Stacktrace_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) SetLoggerLevel(ctx context.Context, in *SetLoggerLevelRequest, opts ...grpc.CallOption) (*SetLoggerLevelResponse, error) { + out := new(SetLoggerLevelResponse) + err := c.cc.Invoke(ctx, AdminService_SetLoggerLevel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) GetLoggerLevel(ctx context.Context, in *GetLoggerLevelRequest, opts ...grpc.CallOption) (*GetLoggerLevelResponse, error) { + out := new(GetLoggerLevelResponse) + err := c.cc.Invoke(ctx, AdminService_GetLoggerLevel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) { + out := new(GetConfigResponse) + err := c.cc.Invoke(ctx, AdminService_GetConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) DBGet(ctx context.Context, in *DBGetRequest, opts ...grpc.CallOption) (*DBGetResponse, error) { + out := new(DBGetResponse) + err := c.cc.Invoke(ctx, AdminService_DBGet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AdminServiceServer is the server API for AdminService service. +// All implementations must embed UnimplementedAdminServiceServer +// for forward compatibility +type AdminServiceServer interface { + StartCPUProfiler(context.Context, *StartCPUProfilerRequest) (*StartCPUProfilerResponse, error) + StopCPUProfiler(context.Context, *StopCPUProfilerRequest) (*StopCPUProfilerResponse, error) + MemoryProfile(context.Context, *MemoryProfileRequest) (*MemoryProfileResponse, error) + LockProfile(context.Context, *LockProfileRequest) (*LockProfileResponse, error) + Alias(context.Context, *AliasRequest) (*AliasResponse, error) + AliasChain(context.Context, *AliasChainRequest) (*AliasChainResponse, error) + GetChainAliases(context.Context, *GetChainAliasesRequest) (*GetChainAliasesResponse, error) + Stacktrace(context.Context, *StacktraceRequest) (*StacktraceResponse, error) + SetLoggerLevel(context.Context, *SetLoggerLevelRequest) (*SetLoggerLevelResponse, error) + GetLoggerLevel(context.Context, *GetLoggerLevelRequest) (*GetLoggerLevelResponse, error) + GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) + DBGet(context.Context, *DBGetRequest) (*DBGetResponse, error) + mustEmbedUnimplementedAdminServiceServer() +} + +// UnimplementedAdminServiceServer must be embedded to have forward compatible implementations. +type UnimplementedAdminServiceServer struct { +} + +func (UnimplementedAdminServiceServer) StartCPUProfiler(context.Context, *StartCPUProfilerRequest) (*StartCPUProfilerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartCPUProfiler not implemented") +} +func (UnimplementedAdminServiceServer) StopCPUProfiler(context.Context, *StopCPUProfilerRequest) (*StopCPUProfilerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StopCPUProfiler not implemented") +} +func (UnimplementedAdminServiceServer) MemoryProfile(context.Context, *MemoryProfileRequest) (*MemoryProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MemoryProfile not implemented") +} +func (UnimplementedAdminServiceServer) LockProfile(context.Context, *LockProfileRequest) (*LockProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LockProfile not implemented") +} +func (UnimplementedAdminServiceServer) Alias(context.Context, *AliasRequest) (*AliasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Alias not implemented") +} +func (UnimplementedAdminServiceServer) AliasChain(context.Context, *AliasChainRequest) (*AliasChainResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AliasChain not implemented") +} +func (UnimplementedAdminServiceServer) GetChainAliases(context.Context, *GetChainAliasesRequest) (*GetChainAliasesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChainAliases not implemented") +} +func (UnimplementedAdminServiceServer) Stacktrace(context.Context, *StacktraceRequest) (*StacktraceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stacktrace not implemented") +} +func (UnimplementedAdminServiceServer) SetLoggerLevel(context.Context, *SetLoggerLevelRequest) (*SetLoggerLevelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetLoggerLevel not implemented") +} +func (UnimplementedAdminServiceServer) GetLoggerLevel(context.Context, *GetLoggerLevelRequest) (*GetLoggerLevelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLoggerLevel not implemented") +} +func (UnimplementedAdminServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") +} +func (UnimplementedAdminServiceServer) DBGet(context.Context, *DBGetRequest) (*DBGetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DBGet not implemented") +} +func (UnimplementedAdminServiceServer) mustEmbedUnimplementedAdminServiceServer() {} + +// UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AdminServiceServer will +// result in compilation errors. +type UnsafeAdminServiceServer interface { + mustEmbedUnimplementedAdminServiceServer() +} + +func RegisterAdminServiceServer(s grpc.ServiceRegistrar, srv AdminServiceServer) { + s.RegisterService(&AdminService_ServiceDesc, srv) +} + +func _AdminService_StartCPUProfiler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartCPUProfilerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).StartCPUProfiler(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_StartCPUProfiler_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).StartCPUProfiler(ctx, req.(*StartCPUProfilerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_StopCPUProfiler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopCPUProfilerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).StopCPUProfiler(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_StopCPUProfiler_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).StopCPUProfiler(ctx, req.(*StopCPUProfilerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_MemoryProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MemoryProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).MemoryProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_MemoryProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).MemoryProfile(ctx, req.(*MemoryProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_LockProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LockProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).LockProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_LockProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).LockProfile(ctx, req.(*LockProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_Alias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AliasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).Alias(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_Alias_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).Alias(ctx, req.(*AliasRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_AliasChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AliasChainRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).AliasChain(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_AliasChain_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).AliasChain(ctx, req.(*AliasChainRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_GetChainAliases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChainAliasesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).GetChainAliases(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_GetChainAliases_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).GetChainAliases(ctx, req.(*GetChainAliasesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_Stacktrace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StacktraceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).Stacktrace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_Stacktrace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).Stacktrace(ctx, req.(*StacktraceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_SetLoggerLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetLoggerLevelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).SetLoggerLevel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_SetLoggerLevel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).SetLoggerLevel(ctx, req.(*SetLoggerLevelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_GetLoggerLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLoggerLevelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).GetLoggerLevel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_GetLoggerLevel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).GetLoggerLevel(ctx, req.(*GetLoggerLevelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).GetConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_GetConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).GetConfig(ctx, req.(*GetConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_DBGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DBGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).DBGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_DBGet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).DBGet(ctx, req.(*DBGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AdminService_ServiceDesc is the grpc.ServiceDesc for AdminService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AdminService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "admin.v1.AdminService", + HandlerType: (*AdminServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StartCPUProfiler", + Handler: _AdminService_StartCPUProfiler_Handler, + }, + { + MethodName: "StopCPUProfiler", + Handler: _AdminService_StopCPUProfiler_Handler, + }, + { + MethodName: "MemoryProfile", + Handler: _AdminService_MemoryProfile_Handler, + }, + { + MethodName: "LockProfile", + Handler: _AdminService_LockProfile_Handler, + }, + { + MethodName: "Alias", + Handler: _AdminService_Alias_Handler, + }, + { + MethodName: "AliasChain", + Handler: _AdminService_AliasChain_Handler, + }, + { + MethodName: "GetChainAliases", + Handler: _AdminService_GetChainAliases_Handler, + }, + { + MethodName: "Stacktrace", + Handler: _AdminService_Stacktrace_Handler, + }, + { + MethodName: "SetLoggerLevel", + Handler: _AdminService_SetLoggerLevel_Handler, + }, + { + MethodName: "GetLoggerLevel", + Handler: _AdminService_GetLoggerLevel_Handler, + }, + { + MethodName: "GetConfig", + Handler: _AdminService_GetConfig_Handler, + }, + { + MethodName: "DBGet", + Handler: _AdminService_DBGet_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "admin/v1/service.proto", +} diff --git a/proto/pb/health/v1/healthv1connect/service.connect.go b/proto/pb/health/v1/healthv1connect/service.connect.go new file mode 100644 index 000000000000..9bdc9c25bd25 --- /dev/null +++ b/proto/pb/health/v1/healthv1connect/service.connect.go @@ -0,0 +1,167 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: health/v1/service.proto + +package healthv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/ava-labs/avalanchego/proto/pb/health/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // HealthServiceName is the fully-qualified name of the HealthService service. + HealthServiceName = "health.v1.HealthService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // HealthServiceReadinessProcedure is the fully-qualified name of the HealthService's Readiness RPC. + HealthServiceReadinessProcedure = "/health.v1.HealthService/Readiness" + // HealthServiceLivenessProcedure is the fully-qualified name of the HealthService's Liveness RPC. + HealthServiceLivenessProcedure = "/health.v1.HealthService/Liveness" + // HealthServiceHealthProcedure is the fully-qualified name of the HealthService's Health RPC. + HealthServiceHealthProcedure = "/health.v1.HealthService/Health" +) + +// HealthServiceClient is a client for the health.v1.HealthService service. +type HealthServiceClient interface { + Readiness(context.Context, *connect.Request[v1.ReadinessRequest]) (*connect.Response[v1.ReadinessResponse], error) + Liveness(context.Context, *connect.Request[v1.LivenessRequest]) (*connect.Response[v1.LivenessResponse], error) + Health(context.Context, *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) +} + +// NewHealthServiceClient constructs a client for the health.v1.HealthService service. By default, +// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and +// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() +// or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewHealthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) HealthServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + healthServiceMethods := v1.File_health_v1_service_proto.Services().ByName("HealthService").Methods() + return &healthServiceClient{ + readiness: connect.NewClient[v1.ReadinessRequest, v1.ReadinessResponse]( + httpClient, + baseURL+HealthServiceReadinessProcedure, + connect.WithSchema(healthServiceMethods.ByName("Readiness")), + connect.WithClientOptions(opts...), + ), + liveness: connect.NewClient[v1.LivenessRequest, v1.LivenessResponse]( + httpClient, + baseURL+HealthServiceLivenessProcedure, + connect.WithSchema(healthServiceMethods.ByName("Liveness")), + connect.WithClientOptions(opts...), + ), + health: connect.NewClient[v1.HealthRequest, v1.HealthResponse]( + httpClient, + baseURL+HealthServiceHealthProcedure, + connect.WithSchema(healthServiceMethods.ByName("Health")), + connect.WithClientOptions(opts...), + ), + } +} + +// healthServiceClient implements HealthServiceClient. +type healthServiceClient struct { + readiness *connect.Client[v1.ReadinessRequest, v1.ReadinessResponse] + liveness *connect.Client[v1.LivenessRequest, v1.LivenessResponse] + health *connect.Client[v1.HealthRequest, v1.HealthResponse] +} + +// Readiness calls health.v1.HealthService.Readiness. +func (c *healthServiceClient) Readiness(ctx context.Context, req *connect.Request[v1.ReadinessRequest]) (*connect.Response[v1.ReadinessResponse], error) { + return c.readiness.CallUnary(ctx, req) +} + +// Liveness calls health.v1.HealthService.Liveness. +func (c *healthServiceClient) Liveness(ctx context.Context, req *connect.Request[v1.LivenessRequest]) (*connect.Response[v1.LivenessResponse], error) { + return c.liveness.CallUnary(ctx, req) +} + +// Health calls health.v1.HealthService.Health. +func (c *healthServiceClient) Health(ctx context.Context, req *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) { + return c.health.CallUnary(ctx, req) +} + +// HealthServiceHandler is an implementation of the health.v1.HealthService service. +type HealthServiceHandler interface { + Readiness(context.Context, *connect.Request[v1.ReadinessRequest]) (*connect.Response[v1.ReadinessResponse], error) + Liveness(context.Context, *connect.Request[v1.LivenessRequest]) (*connect.Response[v1.LivenessResponse], error) + Health(context.Context, *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) +} + +// NewHealthServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewHealthServiceHandler(svc HealthServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + healthServiceMethods := v1.File_health_v1_service_proto.Services().ByName("HealthService").Methods() + healthServiceReadinessHandler := connect.NewUnaryHandler( + HealthServiceReadinessProcedure, + svc.Readiness, + connect.WithSchema(healthServiceMethods.ByName("Readiness")), + connect.WithHandlerOptions(opts...), + ) + healthServiceLivenessHandler := connect.NewUnaryHandler( + HealthServiceLivenessProcedure, + svc.Liveness, + connect.WithSchema(healthServiceMethods.ByName("Liveness")), + connect.WithHandlerOptions(opts...), + ) + healthServiceHealthHandler := connect.NewUnaryHandler( + HealthServiceHealthProcedure, + svc.Health, + connect.WithSchema(healthServiceMethods.ByName("Health")), + connect.WithHandlerOptions(opts...), + ) + return "/health.v1.HealthService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case HealthServiceReadinessProcedure: + healthServiceReadinessHandler.ServeHTTP(w, r) + case HealthServiceLivenessProcedure: + healthServiceLivenessHandler.ServeHTTP(w, r) + case HealthServiceHealthProcedure: + healthServiceHealthHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedHealthServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedHealthServiceHandler struct{} + +func (UnimplementedHealthServiceHandler) Readiness(context.Context, *connect.Request[v1.ReadinessRequest]) (*connect.Response[v1.ReadinessResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("health.v1.HealthService.Readiness is not implemented")) +} + +func (UnimplementedHealthServiceHandler) Liveness(context.Context, *connect.Request[v1.LivenessRequest]) (*connect.Response[v1.LivenessResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("health.v1.HealthService.Liveness is not implemented")) +} + +func (UnimplementedHealthServiceHandler) Health(context.Context, *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("health.v1.HealthService.Health is not implemented")) +} diff --git a/proto/pb/health/v1/service.pb.go b/proto/pb/health/v1/service.pb.go new file mode 100644 index 000000000000..84d5326245de --- /dev/null +++ b/proto/pb/health/v1/service.pb.go @@ -0,0 +1,576 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc (unknown) +// source: health/v1/service.proto + +package healthv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Result is the result of a health check. +type Result struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *structpb.Struct `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // Error is the string representation of the error returned by the failing + // HealthCheck. The value is nil if the check passed. + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + // Timestamp of the last HealthCheck. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Duration is the amount of time this HealthCheck last took to evaluate. + DurationNs int64 `protobuf:"varint,4,opt,name=duration_ns,json=durationNs,proto3" json:"duration_ns,omitempty"` + // ContiguousFailures the HealthCheck has returned. + ContiguousFailures int64 `protobuf:"varint,5,opt,name=contiguous_failures,json=contiguousFailures,proto3" json:"contiguous_failures,omitempty"` + // TimeOfFirstFailure of the HealthCheck. + TimeOfFirstFailure *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=time_of_first_failure,json=timeOfFirstFailure,proto3" json:"time_of_first_failure,omitempty"` +} + +func (x *Result) Reset() { + *x = Result{} + mi := &file_health_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Result) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Result) ProtoMessage() {} + +func (x *Result) ProtoReflect() protoreflect.Message { + mi := &file_health_v1_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Result.ProtoReflect.Descriptor instead. +func (*Result) Descriptor() ([]byte, []int) { + return file_health_v1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *Result) GetMessage() *structpb.Struct { + if x != nil { + return x.Message + } + return nil +} + +func (x *Result) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *Result) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *Result) GetDurationNs() int64 { + if x != nil { + return x.DurationNs + } + return 0 +} + +func (x *Result) GetContiguousFailures() int64 { + if x != nil { + return x.ContiguousFailures + } + return 0 +} + +func (x *Result) GetTimeOfFirstFailure() *timestamppb.Timestamp { + if x != nil { + return x.TimeOfFirstFailure + } + return nil +} + +type ReadinessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Checks map[string]*Result `protobuf:"bytes,1,rep,name=checks,proto3" json:"checks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Healthy bool `protobuf:"varint,2,opt,name=healthy,proto3" json:"healthy,omitempty"` +} + +func (x *ReadinessResponse) Reset() { + *x = ReadinessResponse{} + mi := &file_health_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReadinessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadinessResponse) ProtoMessage() {} + +func (x *ReadinessResponse) ProtoReflect() protoreflect.Message { + mi := &file_health_v1_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadinessResponse.ProtoReflect.Descriptor instead. +func (*ReadinessResponse) Descriptor() ([]byte, []int) { + return file_health_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ReadinessResponse) GetChecks() map[string]*Result { + if x != nil { + return x.Checks + } + return nil +} + +func (x *ReadinessResponse) GetHealthy() bool { + if x != nil { + return x.Healthy + } + return false +} + +type ReadinessRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (x *ReadinessRequest) Reset() { + *x = ReadinessRequest{} + mi := &file_health_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReadinessRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadinessRequest) ProtoMessage() {} + +func (x *ReadinessRequest) ProtoReflect() protoreflect.Message { + mi := &file_health_v1_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadinessRequest.ProtoReflect.Descriptor instead. +func (*ReadinessRequest) Descriptor() ([]byte, []int) { + return file_health_v1_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadinessRequest) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +type LivenessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Checks map[string]*Result `protobuf:"bytes,1,rep,name=checks,proto3" json:"checks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Healthy bool `protobuf:"varint,2,opt,name=healthy,proto3" json:"healthy,omitempty"` +} + +func (x *LivenessResponse) Reset() { + *x = LivenessResponse{} + mi := &file_health_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LivenessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LivenessResponse) ProtoMessage() {} + +func (x *LivenessResponse) ProtoReflect() protoreflect.Message { + mi := &file_health_v1_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LivenessResponse.ProtoReflect.Descriptor instead. +func (*LivenessResponse) Descriptor() ([]byte, []int) { + return file_health_v1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *LivenessResponse) GetChecks() map[string]*Result { + if x != nil { + return x.Checks + } + return nil +} + +func (x *LivenessResponse) GetHealthy() bool { + if x != nil { + return x.Healthy + } + return false +} + +type LivenessRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (x *LivenessRequest) Reset() { + *x = LivenessRequest{} + mi := &file_health_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LivenessRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LivenessRequest) ProtoMessage() {} + +func (x *LivenessRequest) ProtoReflect() protoreflect.Message { + mi := &file_health_v1_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LivenessRequest.ProtoReflect.Descriptor instead. +func (*LivenessRequest) Descriptor() ([]byte, []int) { + return file_health_v1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *LivenessRequest) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +type HealthResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Checks map[string]*Result `protobuf:"bytes,1,rep,name=checks,proto3" json:"checks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Healthy bool `protobuf:"varint,2,opt,name=healthy,proto3" json:"healthy,omitempty"` +} + +func (x *HealthResponse) Reset() { + *x = HealthResponse{} + mi := &file_health_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HealthResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthResponse) ProtoMessage() {} + +func (x *HealthResponse) ProtoReflect() protoreflect.Message { + mi := &file_health_v1_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead. +func (*HealthResponse) Descriptor() ([]byte, []int) { + return file_health_v1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *HealthResponse) GetChecks() map[string]*Result { + if x != nil { + return x.Checks + } + return nil +} + +func (x *HealthResponse) GetHealthy() bool { + if x != nil { + return x.Healthy + } + return false +} + +type HealthRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (x *HealthRequest) Reset() { + *x = HealthRequest{} + mi := &file_health_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HealthRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthRequest) ProtoMessage() {} + +func (x *HealthRequest) ProtoReflect() protoreflect.Message { + mi := &file_health_v1_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead. +func (*HealthRequest) Descriptor() ([]byte, []int) { + return file_health_v1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *HealthRequest) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +var File_health_v1_service_proto protoreflect.FileDescriptor + +var file_health_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x02, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x31, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, 0x75, 0x6f, 0x75, 0x73, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, 0x75, 0x6f, 0x75, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x15, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x12, + 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x46, 0x69, 0x72, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x79, 0x1a, 0x4c, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x26, 0x0a, 0x10, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x10, 0x4c, + 0x69, 0x76, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x76, 0x65, + 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x1a, 0x4c, 0x0a, 0x0b, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0f, 0x4c, 0x69, 0x76, 0x65, + 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, + 0xb7, 0x01, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x1a, 0x4c, 0x0a, 0x0b, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a, 0x0d, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x32, 0xdb, + 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x46, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x2e, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x4c, 0x69, 0x76, 0x65, + 0x6e, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x76, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x76, + 0x65, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, + 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x18, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, + 0x76, 0x31, 0x3b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_health_v1_service_proto_rawDescOnce sync.Once + file_health_v1_service_proto_rawDescData = file_health_v1_service_proto_rawDesc +) + +func file_health_v1_service_proto_rawDescGZIP() []byte { + file_health_v1_service_proto_rawDescOnce.Do(func() { + file_health_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_health_v1_service_proto_rawDescData) + }) + return file_health_v1_service_proto_rawDescData +} + +var file_health_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_health_v1_service_proto_goTypes = []any{ + (*Result)(nil), // 0: health.v1.Result + (*ReadinessResponse)(nil), // 1: health.v1.ReadinessResponse + (*ReadinessRequest)(nil), // 2: health.v1.ReadinessRequest + (*LivenessResponse)(nil), // 3: health.v1.LivenessResponse + (*LivenessRequest)(nil), // 4: health.v1.LivenessRequest + (*HealthResponse)(nil), // 5: health.v1.HealthResponse + (*HealthRequest)(nil), // 6: health.v1.HealthRequest + nil, // 7: health.v1.ReadinessResponse.ChecksEntry + nil, // 8: health.v1.LivenessResponse.ChecksEntry + nil, // 9: health.v1.HealthResponse.ChecksEntry + (*structpb.Struct)(nil), // 10: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp +} +var file_health_v1_service_proto_depIdxs = []int32{ + 10, // 0: health.v1.Result.message:type_name -> google.protobuf.Struct + 11, // 1: health.v1.Result.timestamp:type_name -> google.protobuf.Timestamp + 11, // 2: health.v1.Result.time_of_first_failure:type_name -> google.protobuf.Timestamp + 7, // 3: health.v1.ReadinessResponse.checks:type_name -> health.v1.ReadinessResponse.ChecksEntry + 8, // 4: health.v1.LivenessResponse.checks:type_name -> health.v1.LivenessResponse.ChecksEntry + 9, // 5: health.v1.HealthResponse.checks:type_name -> health.v1.HealthResponse.ChecksEntry + 0, // 6: health.v1.ReadinessResponse.ChecksEntry.value:type_name -> health.v1.Result + 0, // 7: health.v1.LivenessResponse.ChecksEntry.value:type_name -> health.v1.Result + 0, // 8: health.v1.HealthResponse.ChecksEntry.value:type_name -> health.v1.Result + 2, // 9: health.v1.HealthService.Readiness:input_type -> health.v1.ReadinessRequest + 4, // 10: health.v1.HealthService.Liveness:input_type -> health.v1.LivenessRequest + 6, // 11: health.v1.HealthService.Health:input_type -> health.v1.HealthRequest + 1, // 12: health.v1.HealthService.Readiness:output_type -> health.v1.ReadinessResponse + 3, // 13: health.v1.HealthService.Liveness:output_type -> health.v1.LivenessResponse + 5, // 14: health.v1.HealthService.Health:output_type -> health.v1.HealthResponse + 12, // [12:15] is the sub-list for method output_type + 9, // [9:12] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_health_v1_service_proto_init() } +func file_health_v1_service_proto_init() { + if File_health_v1_service_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_health_v1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_health_v1_service_proto_goTypes, + DependencyIndexes: file_health_v1_service_proto_depIdxs, + MessageInfos: file_health_v1_service_proto_msgTypes, + }.Build() + File_health_v1_service_proto = out.File + file_health_v1_service_proto_rawDesc = nil + file_health_v1_service_proto_goTypes = nil + file_health_v1_service_proto_depIdxs = nil +} diff --git a/proto/pb/health/v1/service_grpc.pb.go b/proto/pb/health/v1/service_grpc.pb.go new file mode 100644 index 000000000000..54475878d7a0 --- /dev/null +++ b/proto/pb/health/v1/service_grpc.pb.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: health/v1/service.proto + +package healthv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + HealthService_Readiness_FullMethodName = "/health.v1.HealthService/Readiness" + HealthService_Liveness_FullMethodName = "/health.v1.HealthService/Liveness" + HealthService_Health_FullMethodName = "/health.v1.HealthService/Health" +) + +// HealthServiceClient is the client API for HealthService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HealthServiceClient interface { + Readiness(ctx context.Context, in *ReadinessRequest, opts ...grpc.CallOption) (*ReadinessResponse, error) + Liveness(ctx context.Context, in *LivenessRequest, opts ...grpc.CallOption) (*LivenessResponse, error) + Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) +} + +type healthServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHealthServiceClient(cc grpc.ClientConnInterface) HealthServiceClient { + return &healthServiceClient{cc} +} + +func (c *healthServiceClient) Readiness(ctx context.Context, in *ReadinessRequest, opts ...grpc.CallOption) (*ReadinessResponse, error) { + out := new(ReadinessResponse) + err := c.cc.Invoke(ctx, HealthService_Readiness_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *healthServiceClient) Liveness(ctx context.Context, in *LivenessRequest, opts ...grpc.CallOption) (*LivenessResponse, error) { + out := new(LivenessResponse) + err := c.cc.Invoke(ctx, HealthService_Liveness_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *healthServiceClient) Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) { + out := new(HealthResponse) + err := c.cc.Invoke(ctx, HealthService_Health_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealthServiceServer is the server API for HealthService service. +// All implementations must embed UnimplementedHealthServiceServer +// for forward compatibility +type HealthServiceServer interface { + Readiness(context.Context, *ReadinessRequest) (*ReadinessResponse, error) + Liveness(context.Context, *LivenessRequest) (*LivenessResponse, error) + Health(context.Context, *HealthRequest) (*HealthResponse, error) + mustEmbedUnimplementedHealthServiceServer() +} + +// UnimplementedHealthServiceServer must be embedded to have forward compatible implementations. +type UnimplementedHealthServiceServer struct { +} + +func (UnimplementedHealthServiceServer) Readiness(context.Context, *ReadinessRequest) (*ReadinessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Readiness not implemented") +} +func (UnimplementedHealthServiceServer) Liveness(context.Context, *LivenessRequest) (*LivenessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Liveness not implemented") +} +func (UnimplementedHealthServiceServer) Health(context.Context, *HealthRequest) (*HealthResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Health not implemented") +} +func (UnimplementedHealthServiceServer) mustEmbedUnimplementedHealthServiceServer() {} + +// UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HealthServiceServer will +// result in compilation errors. +type UnsafeHealthServiceServer interface { + mustEmbedUnimplementedHealthServiceServer() +} + +func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer) { + s.RegisterService(&HealthService_ServiceDesc, srv) +} + +func _HealthService_Readiness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadinessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthServiceServer).Readiness(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthService_Readiness_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthServiceServer).Readiness(ctx, req.(*ReadinessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HealthService_Liveness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LivenessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthServiceServer).Liveness(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthService_Liveness_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthServiceServer).Liveness(ctx, req.(*LivenessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HealthService_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HealthRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthServiceServer).Health(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthService_Health_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthServiceServer).Health(ctx, req.(*HealthRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HealthService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "health.v1.HealthService", + HandlerType: (*HealthServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Readiness", + Handler: _HealthService_Readiness_Handler, + }, + { + MethodName: "Liveness", + Handler: _HealthService_Liveness_Handler, + }, + { + MethodName: "Health", + Handler: _HealthService_Health_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "health/v1/service.proto", +} diff --git a/proto/pb/info/v1/infov1connect/service.connect.go b/proto/pb/info/v1/infov1connect/service.connect.go new file mode 100644 index 000000000000..1ca0a749790f --- /dev/null +++ b/proto/pb/info/v1/infov1connect/service.connect.go @@ -0,0 +1,396 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: info/v1/service.proto + +package infov1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // InfoServiceName is the fully-qualified name of the InfoService service. + InfoServiceName = "info.v1.InfoService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // InfoServiceGetNodeVersionProcedure is the fully-qualified name of the InfoService's + // GetNodeVersion RPC. + InfoServiceGetNodeVersionProcedure = "/info.v1.InfoService/GetNodeVersion" + // InfoServiceGetNodeIDProcedure is the fully-qualified name of the InfoService's GetNodeID RPC. + InfoServiceGetNodeIDProcedure = "/info.v1.InfoService/GetNodeID" + // InfoServiceGetNodeIPProcedure is the fully-qualified name of the InfoService's GetNodeIP RPC. + InfoServiceGetNodeIPProcedure = "/info.v1.InfoService/GetNodeIP" + // InfoServiceGetNetworkIDProcedure is the fully-qualified name of the InfoService's GetNetworkID + // RPC. + InfoServiceGetNetworkIDProcedure = "/info.v1.InfoService/GetNetworkID" + // InfoServiceGetNetworkNameProcedure is the fully-qualified name of the InfoService's + // GetNetworkName RPC. + InfoServiceGetNetworkNameProcedure = "/info.v1.InfoService/GetNetworkName" + // InfoServiceGetBlockchainIDProcedure is the fully-qualified name of the InfoService's + // GetBlockchainID RPC. + InfoServiceGetBlockchainIDProcedure = "/info.v1.InfoService/GetBlockchainID" + // InfoServicePeersProcedure is the fully-qualified name of the InfoService's Peers RPC. + InfoServicePeersProcedure = "/info.v1.InfoService/Peers" + // InfoServiceIsBootstrappedProcedure is the fully-qualified name of the InfoService's + // IsBootstrapped RPC. + InfoServiceIsBootstrappedProcedure = "/info.v1.InfoService/IsBootstrapped" + // InfoServiceUpgradesProcedure is the fully-qualified name of the InfoService's Upgrades RPC. + InfoServiceUpgradesProcedure = "/info.v1.InfoService/Upgrades" + // InfoServiceUptimeProcedure is the fully-qualified name of the InfoService's Uptime RPC. + InfoServiceUptimeProcedure = "/info.v1.InfoService/Uptime" + // InfoServiceGetVMsProcedure is the fully-qualified name of the InfoService's GetVMs RPC. + InfoServiceGetVMsProcedure = "/info.v1.InfoService/GetVMs" +) + +// InfoServiceClient is a client for the info.v1.InfoService service. +type InfoServiceClient interface { + GetNodeVersion(context.Context, *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) + GetNodeID(context.Context, *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) + GetNodeIP(context.Context, *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) + GetNetworkID(context.Context, *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) + GetNetworkName(context.Context, *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) + GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) + Peers(context.Context, *connect.Request[v1.PeersRequest]) (*connect.Response[v1.PeersResponse], error) + IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedRequest]) (*connect.Response[v1.IsBootstrappedResponse], error) + Upgrades(context.Context, *connect.Request[v1.UpgradesRequest]) (*connect.Response[v1.UpgradesResponse], error) + Uptime(context.Context, *connect.Request[v1.UptimeRequest]) (*connect.Response[v1.UptimeResponse], error) + GetVMs(context.Context, *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) +} + +// NewInfoServiceClient constructs a client for the info.v1.InfoService service. By default, it uses +// the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends +// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewInfoServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) InfoServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + infoServiceMethods := v1.File_info_v1_service_proto.Services().ByName("InfoService").Methods() + return &infoServiceClient{ + getNodeVersion: connect.NewClient[v1.GetNodeVersionRequest, v1.GetNodeVersionResponse]( + httpClient, + baseURL+InfoServiceGetNodeVersionProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNodeVersion")), + connect.WithClientOptions(opts...), + ), + getNodeID: connect.NewClient[v1.GetNodeIDRequest, v1.GetNodeIDResponse]( + httpClient, + baseURL+InfoServiceGetNodeIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNodeID")), + connect.WithClientOptions(opts...), + ), + getNodeIP: connect.NewClient[v1.GetNodeIPRequest, v1.GetNodeIPResponse]( + httpClient, + baseURL+InfoServiceGetNodeIPProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNodeIP")), + connect.WithClientOptions(opts...), + ), + getNetworkID: connect.NewClient[v1.GetNetworkIDRequest, v1.GetNetworkIDResponse]( + httpClient, + baseURL+InfoServiceGetNetworkIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkID")), + connect.WithClientOptions(opts...), + ), + getNetworkName: connect.NewClient[v1.GetNetworkNameRequest, v1.GetNetworkNameResponse]( + httpClient, + baseURL+InfoServiceGetNetworkNameProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkName")), + connect.WithClientOptions(opts...), + ), + getBlockchainID: connect.NewClient[v1.GetBlockchainIDRequest, v1.GetBlockchainIDResponse]( + httpClient, + baseURL+InfoServiceGetBlockchainIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetBlockchainID")), + connect.WithClientOptions(opts...), + ), + peers: connect.NewClient[v1.PeersRequest, v1.PeersResponse]( + httpClient, + baseURL+InfoServicePeersProcedure, + connect.WithSchema(infoServiceMethods.ByName("Peers")), + connect.WithClientOptions(opts...), + ), + isBootstrapped: connect.NewClient[v1.IsBootstrappedRequest, v1.IsBootstrappedResponse]( + httpClient, + baseURL+InfoServiceIsBootstrappedProcedure, + connect.WithSchema(infoServiceMethods.ByName("IsBootstrapped")), + connect.WithClientOptions(opts...), + ), + upgrades: connect.NewClient[v1.UpgradesRequest, v1.UpgradesResponse]( + httpClient, + baseURL+InfoServiceUpgradesProcedure, + connect.WithSchema(infoServiceMethods.ByName("Upgrades")), + connect.WithClientOptions(opts...), + ), + uptime: connect.NewClient[v1.UptimeRequest, v1.UptimeResponse]( + httpClient, + baseURL+InfoServiceUptimeProcedure, + connect.WithSchema(infoServiceMethods.ByName("Uptime")), + connect.WithClientOptions(opts...), + ), + getVMs: connect.NewClient[v1.GetVMsRequest, v1.GetVMsResponse]( + httpClient, + baseURL+InfoServiceGetVMsProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetVMs")), + connect.WithClientOptions(opts...), + ), + } +} + +// infoServiceClient implements InfoServiceClient. +type infoServiceClient struct { + getNodeVersion *connect.Client[v1.GetNodeVersionRequest, v1.GetNodeVersionResponse] + getNodeID *connect.Client[v1.GetNodeIDRequest, v1.GetNodeIDResponse] + getNodeIP *connect.Client[v1.GetNodeIPRequest, v1.GetNodeIPResponse] + getNetworkID *connect.Client[v1.GetNetworkIDRequest, v1.GetNetworkIDResponse] + getNetworkName *connect.Client[v1.GetNetworkNameRequest, v1.GetNetworkNameResponse] + getBlockchainID *connect.Client[v1.GetBlockchainIDRequest, v1.GetBlockchainIDResponse] + peers *connect.Client[v1.PeersRequest, v1.PeersResponse] + isBootstrapped *connect.Client[v1.IsBootstrappedRequest, v1.IsBootstrappedResponse] + upgrades *connect.Client[v1.UpgradesRequest, v1.UpgradesResponse] + uptime *connect.Client[v1.UptimeRequest, v1.UptimeResponse] + getVMs *connect.Client[v1.GetVMsRequest, v1.GetVMsResponse] +} + +// GetNodeVersion calls info.v1.InfoService.GetNodeVersion. +func (c *infoServiceClient) GetNodeVersion(ctx context.Context, req *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) { + return c.getNodeVersion.CallUnary(ctx, req) +} + +// GetNodeID calls info.v1.InfoService.GetNodeID. +func (c *infoServiceClient) GetNodeID(ctx context.Context, req *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) { + return c.getNodeID.CallUnary(ctx, req) +} + +// GetNodeIP calls info.v1.InfoService.GetNodeIP. +func (c *infoServiceClient) GetNodeIP(ctx context.Context, req *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) { + return c.getNodeIP.CallUnary(ctx, req) +} + +// GetNetworkID calls info.v1.InfoService.GetNetworkID. +func (c *infoServiceClient) GetNetworkID(ctx context.Context, req *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) { + return c.getNetworkID.CallUnary(ctx, req) +} + +// GetNetworkName calls info.v1.InfoService.GetNetworkName. +func (c *infoServiceClient) GetNetworkName(ctx context.Context, req *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) { + return c.getNetworkName.CallUnary(ctx, req) +} + +// GetBlockchainID calls info.v1.InfoService.GetBlockchainID. +func (c *infoServiceClient) GetBlockchainID(ctx context.Context, req *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) { + return c.getBlockchainID.CallUnary(ctx, req) +} + +// Peers calls info.v1.InfoService.Peers. +func (c *infoServiceClient) Peers(ctx context.Context, req *connect.Request[v1.PeersRequest]) (*connect.Response[v1.PeersResponse], error) { + return c.peers.CallUnary(ctx, req) +} + +// IsBootstrapped calls info.v1.InfoService.IsBootstrapped. +func (c *infoServiceClient) IsBootstrapped(ctx context.Context, req *connect.Request[v1.IsBootstrappedRequest]) (*connect.Response[v1.IsBootstrappedResponse], error) { + return c.isBootstrapped.CallUnary(ctx, req) +} + +// Upgrades calls info.v1.InfoService.Upgrades. +func (c *infoServiceClient) Upgrades(ctx context.Context, req *connect.Request[v1.UpgradesRequest]) (*connect.Response[v1.UpgradesResponse], error) { + return c.upgrades.CallUnary(ctx, req) +} + +// Uptime calls info.v1.InfoService.Uptime. +func (c *infoServiceClient) Uptime(ctx context.Context, req *connect.Request[v1.UptimeRequest]) (*connect.Response[v1.UptimeResponse], error) { + return c.uptime.CallUnary(ctx, req) +} + +// GetVMs calls info.v1.InfoService.GetVMs. +func (c *infoServiceClient) GetVMs(ctx context.Context, req *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) { + return c.getVMs.CallUnary(ctx, req) +} + +// InfoServiceHandler is an implementation of the info.v1.InfoService service. +type InfoServiceHandler interface { + GetNodeVersion(context.Context, *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) + GetNodeID(context.Context, *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) + GetNodeIP(context.Context, *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) + GetNetworkID(context.Context, *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) + GetNetworkName(context.Context, *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) + GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) + Peers(context.Context, *connect.Request[v1.PeersRequest]) (*connect.Response[v1.PeersResponse], error) + IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedRequest]) (*connect.Response[v1.IsBootstrappedResponse], error) + Upgrades(context.Context, *connect.Request[v1.UpgradesRequest]) (*connect.Response[v1.UpgradesResponse], error) + Uptime(context.Context, *connect.Request[v1.UptimeRequest]) (*connect.Response[v1.UptimeResponse], error) + GetVMs(context.Context, *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) +} + +// NewInfoServiceHandler builds an HTTP handler from the service implementation. It returns the path +// on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewInfoServiceHandler(svc InfoServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + infoServiceMethods := v1.File_info_v1_service_proto.Services().ByName("InfoService").Methods() + infoServiceGetNodeVersionHandler := connect.NewUnaryHandler( + InfoServiceGetNodeVersionProcedure, + svc.GetNodeVersion, + connect.WithSchema(infoServiceMethods.ByName("GetNodeVersion")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNodeIDHandler := connect.NewUnaryHandler( + InfoServiceGetNodeIDProcedure, + svc.GetNodeID, + connect.WithSchema(infoServiceMethods.ByName("GetNodeID")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNodeIPHandler := connect.NewUnaryHandler( + InfoServiceGetNodeIPProcedure, + svc.GetNodeIP, + connect.WithSchema(infoServiceMethods.ByName("GetNodeIP")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNetworkIDHandler := connect.NewUnaryHandler( + InfoServiceGetNetworkIDProcedure, + svc.GetNetworkID, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkID")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNetworkNameHandler := connect.NewUnaryHandler( + InfoServiceGetNetworkNameProcedure, + svc.GetNetworkName, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkName")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetBlockchainIDHandler := connect.NewUnaryHandler( + InfoServiceGetBlockchainIDProcedure, + svc.GetBlockchainID, + connect.WithSchema(infoServiceMethods.ByName("GetBlockchainID")), + connect.WithHandlerOptions(opts...), + ) + infoServicePeersHandler := connect.NewUnaryHandler( + InfoServicePeersProcedure, + svc.Peers, + connect.WithSchema(infoServiceMethods.ByName("Peers")), + connect.WithHandlerOptions(opts...), + ) + infoServiceIsBootstrappedHandler := connect.NewUnaryHandler( + InfoServiceIsBootstrappedProcedure, + svc.IsBootstrapped, + connect.WithSchema(infoServiceMethods.ByName("IsBootstrapped")), + connect.WithHandlerOptions(opts...), + ) + infoServiceUpgradesHandler := connect.NewUnaryHandler( + InfoServiceUpgradesProcedure, + svc.Upgrades, + connect.WithSchema(infoServiceMethods.ByName("Upgrades")), + connect.WithHandlerOptions(opts...), + ) + infoServiceUptimeHandler := connect.NewUnaryHandler( + InfoServiceUptimeProcedure, + svc.Uptime, + connect.WithSchema(infoServiceMethods.ByName("Uptime")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetVMsHandler := connect.NewUnaryHandler( + InfoServiceGetVMsProcedure, + svc.GetVMs, + connect.WithSchema(infoServiceMethods.ByName("GetVMs")), + connect.WithHandlerOptions(opts...), + ) + return "/info.v1.InfoService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case InfoServiceGetNodeVersionProcedure: + infoServiceGetNodeVersionHandler.ServeHTTP(w, r) + case InfoServiceGetNodeIDProcedure: + infoServiceGetNodeIDHandler.ServeHTTP(w, r) + case InfoServiceGetNodeIPProcedure: + infoServiceGetNodeIPHandler.ServeHTTP(w, r) + case InfoServiceGetNetworkIDProcedure: + infoServiceGetNetworkIDHandler.ServeHTTP(w, r) + case InfoServiceGetNetworkNameProcedure: + infoServiceGetNetworkNameHandler.ServeHTTP(w, r) + case InfoServiceGetBlockchainIDProcedure: + infoServiceGetBlockchainIDHandler.ServeHTTP(w, r) + case InfoServicePeersProcedure: + infoServicePeersHandler.ServeHTTP(w, r) + case InfoServiceIsBootstrappedProcedure: + infoServiceIsBootstrappedHandler.ServeHTTP(w, r) + case InfoServiceUpgradesProcedure: + infoServiceUpgradesHandler.ServeHTTP(w, r) + case InfoServiceUptimeProcedure: + infoServiceUptimeHandler.ServeHTTP(w, r) + case InfoServiceGetVMsProcedure: + infoServiceGetVMsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedInfoServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedInfoServiceHandler struct{} + +func (UnimplementedInfoServiceHandler) GetNodeVersion(context.Context, *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeVersion is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNodeID(context.Context, *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeID is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNodeIP(context.Context, *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeIP is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNetworkID(context.Context, *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNetworkID is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNetworkName(context.Context, *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNetworkName is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetBlockchainID is not implemented")) +} + +func (UnimplementedInfoServiceHandler) Peers(context.Context, *connect.Request[v1.PeersRequest]) (*connect.Response[v1.PeersResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.Peers is not implemented")) +} + +func (UnimplementedInfoServiceHandler) IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedRequest]) (*connect.Response[v1.IsBootstrappedResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.IsBootstrapped is not implemented")) +} + +func (UnimplementedInfoServiceHandler) Upgrades(context.Context, *connect.Request[v1.UpgradesRequest]) (*connect.Response[v1.UpgradesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.Upgrades is not implemented")) +} + +func (UnimplementedInfoServiceHandler) Uptime(context.Context, *connect.Request[v1.UptimeRequest]) (*connect.Response[v1.UptimeResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.Uptime is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetVMs(context.Context, *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetVMs is not implemented")) +} diff --git a/proto/pb/info/v1/service.pb.go b/proto/pb/info/v1/service.pb.go new file mode 100644 index 000000000000..0d8e023b3ecd --- /dev/null +++ b/proto/pb/info/v1/service.pb.go @@ -0,0 +1,1647 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc (unknown) +// source: info/v1/service.proto + +package infov1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetNodeVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNodeVersionRequest) Reset() { + *x = GetNodeVersionRequest{} + mi := &file_info_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeVersionRequest) ProtoMessage() {} + +func (x *GetNodeVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeVersionRequest.ProtoReflect.Descriptor instead. +func (*GetNodeVersionRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{0} +} + +type GetNodeVersionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + DatabaseVersion string `protobuf:"bytes,2,opt,name=database_version,json=databaseVersion,proto3" json:"database_version,omitempty"` + RpcProtocolVersion uint32 `protobuf:"varint,3,opt,name=rpc_protocol_version,json=rpcProtocolVersion,proto3" json:"rpc_protocol_version,omitempty"` + GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` + VmVersions map[string]string `protobuf:"bytes,5,rep,name=vm_versions,json=vmVersions,proto3" json:"vm_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetNodeVersionResponse) Reset() { + *x = GetNodeVersionResponse{} + mi := &file_info_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeVersionResponse) ProtoMessage() {} + +func (x *GetNodeVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeVersionResponse.ProtoReflect.Descriptor instead. +func (*GetNodeVersionResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNodeVersionResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *GetNodeVersionResponse) GetDatabaseVersion() string { + if x != nil { + return x.DatabaseVersion + } + return "" +} + +func (x *GetNodeVersionResponse) GetRpcProtocolVersion() uint32 { + if x != nil { + return x.RpcProtocolVersion + } + return 0 +} + +func (x *GetNodeVersionResponse) GetGitCommit() string { + if x != nil { + return x.GitCommit + } + return "" +} + +func (x *GetNodeVersionResponse) GetVmVersions() map[string]string { + if x != nil { + return x.VmVersions + } + return nil +} + +type GetNodeIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNodeIDRequest) Reset() { + *x = GetNodeIDRequest{} + mi := &file_info_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeIDRequest) ProtoMessage() {} + +func (x *GetNodeIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeIDRequest.ProtoReflect.Descriptor instead. +func (*GetNodeIDRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{2} +} + +type GetNodeIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + NodePop []byte `protobuf:"bytes,2,opt,name=node_pop,json=nodePop,proto3" json:"node_pop,omitempty"` +} + +func (x *GetNodeIDResponse) Reset() { + *x = GetNodeIDResponse{} + mi := &file_info_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeIDResponse) ProtoMessage() {} + +func (x *GetNodeIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeIDResponse.ProtoReflect.Descriptor instead. +func (*GetNodeIDResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetNodeIDResponse) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *GetNodeIDResponse) GetNodePop() []byte { + if x != nil { + return x.NodePop + } + return nil +} + +type GetNodeIPRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNodeIPRequest) Reset() { + *x = GetNodeIPRequest{} + mi := &file_info_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeIPRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeIPRequest) ProtoMessage() {} + +func (x *GetNodeIPRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeIPRequest.ProtoReflect.Descriptor instead. +func (*GetNodeIPRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{4} +} + +type GetNodeIPResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` +} + +func (x *GetNodeIPResponse) Reset() { + *x = GetNodeIPResponse{} + mi := &file_info_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeIPResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeIPResponse) ProtoMessage() {} + +func (x *GetNodeIPResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeIPResponse.ProtoReflect.Descriptor instead. +func (*GetNodeIPResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *GetNodeIPResponse) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +type GetNetworkIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNetworkIDRequest) Reset() { + *x = GetNetworkIDRequest{} + mi := &file_info_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNetworkIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkIDRequest) ProtoMessage() {} + +func (x *GetNetworkIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkIDRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkIDRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{6} +} + +type GetNetworkIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkId uint32 `protobuf:"varint,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` +} + +func (x *GetNetworkIDResponse) Reset() { + *x = GetNetworkIDResponse{} + mi := &file_info_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNetworkIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkIDResponse) ProtoMessage() {} + +func (x *GetNetworkIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkIDResponse.ProtoReflect.Descriptor instead. +func (*GetNetworkIDResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *GetNetworkIDResponse) GetNetworkId() uint32 { + if x != nil { + return x.NetworkId + } + return 0 +} + +type GetNetworkNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNetworkNameRequest) Reset() { + *x = GetNetworkNameRequest{} + mi := &file_info_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNetworkNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkNameRequest) ProtoMessage() {} + +func (x *GetNetworkNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkNameRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkNameRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{8} +} + +type GetNetworkNameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` +} + +func (x *GetNetworkNameResponse) Reset() { + *x = GetNetworkNameResponse{} + mi := &file_info_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNetworkNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkNameResponse) ProtoMessage() {} + +func (x *GetNetworkNameResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkNameResponse.ProtoReflect.Descriptor instead. +func (*GetNetworkNameResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{9} +} + +func (x *GetNetworkNameResponse) GetNetworkName() string { + if x != nil { + return x.NetworkName + } + return "" +} + +type GetBlockchainIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` +} + +func (x *GetBlockchainIDRequest) Reset() { + *x = GetBlockchainIDRequest{} + mi := &file_info_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockchainIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockchainIDRequest) ProtoMessage() {} + +func (x *GetBlockchainIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockchainIDRequest.ProtoReflect.Descriptor instead. +func (*GetBlockchainIDRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *GetBlockchainIDRequest) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +type GetBlockchainIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockchainId string `protobuf:"bytes,1,opt,name=blockchain_id,json=blockchainId,proto3" json:"blockchain_id,omitempty"` +} + +func (x *GetBlockchainIDResponse) Reset() { + *x = GetBlockchainIDResponse{} + mi := &file_info_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockchainIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockchainIDResponse) ProtoMessage() {} + +func (x *GetBlockchainIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockchainIDResponse.ProtoReflect.Descriptor instead. +func (*GetBlockchainIDResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{11} +} + +func (x *GetBlockchainIDResponse) GetBlockchainId() string { + if x != nil { + return x.BlockchainId + } + return "" +} + +type PeersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeIds []string `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` +} + +func (x *PeersRequest) Reset() { + *x = PeersRequest{} + mi := &file_info_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeersRequest) ProtoMessage() {} + +func (x *PeersRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeersRequest.ProtoReflect.Descriptor instead. +func (*PeersRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{12} +} + +func (x *PeersRequest) GetNodeIds() []string { + if x != nil { + return x.NodeIds + } + return nil +} + +// PeerInfo provides metadata about a connected peer in the network +type PeerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + PublicIp string `protobuf:"bytes,2,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` + NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + LastSent string `protobuf:"bytes,5,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"` + LastReceived string `protobuf:"bytes,6,opt,name=last_received,json=lastReceived,proto3" json:"last_received,omitempty"` + Benched []string `protobuf:"bytes,7,rep,name=benched,proto3" json:"benched,omitempty"` + ObservedUptime uint32 `protobuf:"varint,8,opt,name=observed_uptime,json=observedUptime,proto3" json:"observed_uptime,omitempty"` + TrackedSubnets []string `protobuf:"bytes,9,rep,name=tracked_subnets,json=trackedSubnets,proto3" json:"tracked_subnets,omitempty"` +} + +func (x *PeerInfo) Reset() { + *x = PeerInfo{} + mi := &file_info_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerInfo) ProtoMessage() {} + +func (x *PeerInfo) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead. +func (*PeerInfo) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{13} +} + +func (x *PeerInfo) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +func (x *PeerInfo) GetPublicIp() string { + if x != nil { + return x.PublicIp + } + return "" +} + +func (x *PeerInfo) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *PeerInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *PeerInfo) GetLastSent() string { + if x != nil { + return x.LastSent + } + return "" +} + +func (x *PeerInfo) GetLastReceived() string { + if x != nil { + return x.LastReceived + } + return "" +} + +func (x *PeerInfo) GetBenched() []string { + if x != nil { + return x.Benched + } + return nil +} + +func (x *PeerInfo) GetObservedUptime() uint32 { + if x != nil { + return x.ObservedUptime + } + return 0 +} + +func (x *PeerInfo) GetTrackedSubnets() []string { + if x != nil { + return x.TrackedSubnets + } + return nil +} + +type PeersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NumPeers uint32 `protobuf:"varint,1,opt,name=num_peers,json=numPeers,proto3" json:"num_peers,omitempty"` + Peers []*PeerInfo `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` +} + +func (x *PeersResponse) Reset() { + *x = PeersResponse{} + mi := &file_info_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeersResponse) ProtoMessage() {} + +func (x *PeersResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeersResponse.ProtoReflect.Descriptor instead. +func (*PeersResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{14} +} + +func (x *PeersResponse) GetNumPeers() uint32 { + if x != nil { + return x.NumPeers + } + return 0 +} + +func (x *PeersResponse) GetPeers() []*PeerInfo { + if x != nil { + return x.Peers + } + return nil +} + +type IsBootstrappedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Alias of the chain + // Can also be the string representation of the chain's ID + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` +} + +func (x *IsBootstrappedRequest) Reset() { + *x = IsBootstrappedRequest{} + mi := &file_info_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsBootstrappedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsBootstrappedRequest) ProtoMessage() {} + +func (x *IsBootstrappedRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsBootstrappedRequest.ProtoReflect.Descriptor instead. +func (*IsBootstrappedRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{15} +} + +func (x *IsBootstrappedRequest) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +type IsBootstrappedResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // True iff the chain exists and is done bootstrapping + IsBootstrapped bool `protobuf:"varint,1,opt,name=is_bootstrapped,json=isBootstrapped,proto3" json:"is_bootstrapped,omitempty"` +} + +func (x *IsBootstrappedResponse) Reset() { + *x = IsBootstrappedResponse{} + mi := &file_info_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsBootstrappedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsBootstrappedResponse) ProtoMessage() {} + +func (x *IsBootstrappedResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsBootstrappedResponse.ProtoReflect.Descriptor instead. +func (*IsBootstrappedResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{16} +} + +func (x *IsBootstrappedResponse) GetIsBootstrapped() bool { + if x != nil { + return x.IsBootstrapped + } + return false +} + +type UpgradesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpgradesRequest) Reset() { + *x = UpgradesRequest{} + mi := &file_info_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpgradesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradesRequest) ProtoMessage() {} + +func (x *UpgradesRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradesRequest.ProtoReflect.Descriptor instead. +func (*UpgradesRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{17} +} + +type UpgradesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApricotPhase1Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=apricot_phase1_time,json=apricotPhase1Time,proto3" json:"apricot_phase1_time,omitempty"` + ApricotPhase2Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=apricot_phase2_time,json=apricotPhase2Time,proto3" json:"apricot_phase2_time,omitempty"` + ApricotPhase3Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=apricot_phase3_time,json=apricotPhase3Time,proto3" json:"apricot_phase3_time,omitempty"` + ApricotPhase4Time *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=apricot_phase4_time,json=apricotPhase4Time,proto3" json:"apricot_phase4_time,omitempty"` + ApricotPhase4MinPChainHeight uint64 `protobuf:"varint,5,opt,name=apricot_phase4_min_p_chain_height,json=apricotPhase4MinPChainHeight,proto3" json:"apricot_phase4_min_p_chain_height,omitempty"` + ApricotPhase5Time *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=apricot_phase5_time,json=apricotPhase5Time,proto3" json:"apricot_phase5_time,omitempty"` + ApricotPhasePre6Time *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=apricot_phase_pre6_time,json=apricotPhasePre6Time,proto3" json:"apricot_phase_pre6_time,omitempty"` + ApricotPhase6Time *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=apricot_phase6_time,json=apricotPhase6Time,proto3" json:"apricot_phase6_time,omitempty"` + ApricotPhasePost6Time *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=apricot_phase_post6_time,json=apricotPhasePost6Time,proto3" json:"apricot_phase_post6_time,omitempty"` + BanffTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=banff_time,json=banffTime,proto3" json:"banff_time,omitempty"` + CortinaTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=cortina_time,json=cortinaTime,proto3" json:"cortina_time,omitempty"` + CortinaXChainStopVertexId string `protobuf:"bytes,12,opt,name=cortina_x_chain_stop_vertex_id,json=cortinaXChainStopVertexId,proto3" json:"cortina_x_chain_stop_vertex_id,omitempty"` + DurangoTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=durango_time,json=durangoTime,proto3" json:"durango_time,omitempty"` + EtnaTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=etna_time,json=etnaTime,proto3" json:"etna_time,omitempty"` + FortunaTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=fortuna_time,json=fortunaTime,proto3" json:"fortuna_time,omitempty"` + GraniteTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=granite_time,json=graniteTime,proto3" json:"granite_time,omitempty"` +} + +func (x *UpgradesResponse) Reset() { + *x = UpgradesResponse{} + mi := &file_info_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpgradesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradesResponse) ProtoMessage() {} + +func (x *UpgradesResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradesResponse.ProtoReflect.Descriptor instead. +func (*UpgradesResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{18} +} + +func (x *UpgradesResponse) GetApricotPhase1Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase1Time + } + return nil +} + +func (x *UpgradesResponse) GetApricotPhase2Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase2Time + } + return nil +} + +func (x *UpgradesResponse) GetApricotPhase3Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase3Time + } + return nil +} + +func (x *UpgradesResponse) GetApricotPhase4Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase4Time + } + return nil +} + +func (x *UpgradesResponse) GetApricotPhase4MinPChainHeight() uint64 { + if x != nil { + return x.ApricotPhase4MinPChainHeight + } + return 0 +} + +func (x *UpgradesResponse) GetApricotPhase5Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase5Time + } + return nil +} + +func (x *UpgradesResponse) GetApricotPhasePre6Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhasePre6Time + } + return nil +} + +func (x *UpgradesResponse) GetApricotPhase6Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase6Time + } + return nil +} + +func (x *UpgradesResponse) GetApricotPhasePost6Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhasePost6Time + } + return nil +} + +func (x *UpgradesResponse) GetBanffTime() *timestamppb.Timestamp { + if x != nil { + return x.BanffTime + } + return nil +} + +func (x *UpgradesResponse) GetCortinaTime() *timestamppb.Timestamp { + if x != nil { + return x.CortinaTime + } + return nil +} + +func (x *UpgradesResponse) GetCortinaXChainStopVertexId() string { + if x != nil { + return x.CortinaXChainStopVertexId + } + return "" +} + +func (x *UpgradesResponse) GetDurangoTime() *timestamppb.Timestamp { + if x != nil { + return x.DurangoTime + } + return nil +} + +func (x *UpgradesResponse) GetEtnaTime() *timestamppb.Timestamp { + if x != nil { + return x.EtnaTime + } + return nil +} + +func (x *UpgradesResponse) GetFortunaTime() *timestamppb.Timestamp { + if x != nil { + return x.FortunaTime + } + return nil +} + +func (x *UpgradesResponse) GetGraniteTime() *timestamppb.Timestamp { + if x != nil { + return x.GraniteTime + } + return nil +} + +type UptimeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UptimeRequest) Reset() { + *x = UptimeRequest{} + mi := &file_info_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UptimeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UptimeRequest) ProtoMessage() {} + +func (x *UptimeRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UptimeRequest.ProtoReflect.Descriptor instead. +func (*UptimeRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{19} +} + +type UptimeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RewardingStakePercentage float64 `protobuf:"fixed64,1,opt,name=rewarding_stake_percentage,json=rewardingStakePercentage,proto3" json:"rewarding_stake_percentage,omitempty"` + WeightedAveragePercentage float64 `protobuf:"fixed64,2,opt,name=weighted_average_percentage,json=weightedAveragePercentage,proto3" json:"weighted_average_percentage,omitempty"` +} + +func (x *UptimeResponse) Reset() { + *x = UptimeResponse{} + mi := &file_info_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UptimeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UptimeResponse) ProtoMessage() {} + +func (x *UptimeResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UptimeResponse.ProtoReflect.Descriptor instead. +func (*UptimeResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{20} +} + +func (x *UptimeResponse) GetRewardingStakePercentage() float64 { + if x != nil { + return x.RewardingStakePercentage + } + return 0 +} + +func (x *UptimeResponse) GetWeightedAveragePercentage() float64 { + if x != nil { + return x.WeightedAveragePercentage + } + return 0 +} + +type GetVMsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetVMsRequest) Reset() { + *x = GetVMsRequest{} + mi := &file_info_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVMsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVMsRequest) ProtoMessage() {} + +func (x *GetVMsRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVMsRequest.ProtoReflect.Descriptor instead. +func (*GetVMsRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{21} +} + +type GetVMsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vms map[string]*VMAliases `protobuf:"bytes,1,rep,name=vms,proto3" json:"vms,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Fxs map[string]string `protobuf:"bytes,2,rep,name=fxs,proto3" json:"fxs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetVMsResponse) Reset() { + *x = GetVMsResponse{} + mi := &file_info_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVMsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVMsResponse) ProtoMessage() {} + +func (x *GetVMsResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVMsResponse.ProtoReflect.Descriptor instead. +func (*GetVMsResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{22} +} + +func (x *GetVMsResponse) GetVms() map[string]*VMAliases { + if x != nil { + return x.Vms + } + return nil +} + +func (x *GetVMsResponse) GetFxs() map[string]string { + if x != nil { + return x.Fxs + } + return nil +} + +type VMAliases struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` +} + +func (x *VMAliases) Reset() { + *x = VMAliases{} + mi := &file_info_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VMAliases) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMAliases) ProtoMessage() {} + +func (x *VMAliases) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VMAliases.ProtoReflect.Descriptor instead. +func (*VMAliases) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{23} +} + +func (x *VMAliases) GetAliases() []string { + if x != nil { + return x.Aliases + } + return nil +} + +var File_info_v1_service_proto protoreflect.FileDescriptor + +var file_info_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xbf, 0x02, 0x0a, 0x16, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x29, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x70, + 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, + 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x0b, 0x76, + 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x56, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x76, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, + 0x0f, 0x56, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x12, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x47, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x70, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x23, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, + 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, + 0x73, 0x22, 0x98, 0x02, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, + 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x55, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, + 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x0d, + 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x65, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x6e, 0x66, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x70, 0x65, + 0x65, 0x72, 0x73, 0x22, 0x2d, 0x0a, 0x15, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x16, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfe, 0x08, 0x0a, 0x10, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, + 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x31, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, + 0x68, 0x61, 0x73, 0x65, 0x31, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, + 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x32, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, + 0x32, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, + 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x33, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, + 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x33, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, + 0x73, 0x65, 0x34, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, + 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, + 0x21, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x34, 0x5f, + 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1c, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, + 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x34, 0x4d, 0x69, 0x6e, 0x50, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, + 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x35, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x35, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x17, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, + 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x36, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x14, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x50, 0x72, 0x65, + 0x36, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, + 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x36, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, + 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x36, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x53, 0x0a, 0x18, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, + 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x36, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x15, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x50, 0x6f, 0x73, + 0x74, 0x36, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x66, 0x66, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x66, 0x66, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x41, 0x0a, 0x1e, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, 0x5f, 0x78, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, + 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, + 0x61, 0x58, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x6f, 0x70, 0x56, 0x65, 0x72, 0x74, 0x65, + 0x78, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x75, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x74, 0x6e, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x08, 0x65, 0x74, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x66, + 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x66, + 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x67, 0x72, + 0x61, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x67, 0x72, + 0x61, 0x6e, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x55, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x0e, 0x55, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, + 0x1a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x18, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x77, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x19, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfc, 0x01, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x32, 0x0a, 0x03, 0x76, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, + 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, + 0x76, 0x6d, 0x73, 0x12, 0x32, 0x0a, 0x03, 0x66, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x78, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x03, 0x66, 0x78, 0x73, 0x1a, 0x4a, 0x0a, 0x08, 0x56, 0x6d, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x36, 0x0a, 0x08, 0x46, 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x09, 0x56, + 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, + 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x73, 0x32, 0xa0, 0x06, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x44, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x44, 0x12, 0x1c, 0x2e, + 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, + 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x69, + 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, + 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, + 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x15, 0x2e, 0x69, + 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x49, + 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x1e, 0x2e, + 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, + 0x0a, 0x08, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x69, 0x6e, 0x66, + 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x06, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x69, 0x6e, 0x66, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x47, 0x65, + 0x74, 0x56, 0x4d, 0x73, 0x12, 0x16, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, + 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, + 0x62, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x66, 0x6f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_info_v1_service_proto_rawDescOnce sync.Once + file_info_v1_service_proto_rawDescData = file_info_v1_service_proto_rawDesc +) + +func file_info_v1_service_proto_rawDescGZIP() []byte { + file_info_v1_service_proto_rawDescOnce.Do(func() { + file_info_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_info_v1_service_proto_rawDescData) + }) + return file_info_v1_service_proto_rawDescData +} + +var file_info_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_info_v1_service_proto_goTypes = []any{ + (*GetNodeVersionRequest)(nil), // 0: info.v1.GetNodeVersionRequest + (*GetNodeVersionResponse)(nil), // 1: info.v1.GetNodeVersionResponse + (*GetNodeIDRequest)(nil), // 2: info.v1.GetNodeIDRequest + (*GetNodeIDResponse)(nil), // 3: info.v1.GetNodeIDResponse + (*GetNodeIPRequest)(nil), // 4: info.v1.GetNodeIPRequest + (*GetNodeIPResponse)(nil), // 5: info.v1.GetNodeIPResponse + (*GetNetworkIDRequest)(nil), // 6: info.v1.GetNetworkIDRequest + (*GetNetworkIDResponse)(nil), // 7: info.v1.GetNetworkIDResponse + (*GetNetworkNameRequest)(nil), // 8: info.v1.GetNetworkNameRequest + (*GetNetworkNameResponse)(nil), // 9: info.v1.GetNetworkNameResponse + (*GetBlockchainIDRequest)(nil), // 10: info.v1.GetBlockchainIDRequest + (*GetBlockchainIDResponse)(nil), // 11: info.v1.GetBlockchainIDResponse + (*PeersRequest)(nil), // 12: info.v1.PeersRequest + (*PeerInfo)(nil), // 13: info.v1.PeerInfo + (*PeersResponse)(nil), // 14: info.v1.PeersResponse + (*IsBootstrappedRequest)(nil), // 15: info.v1.IsBootstrappedRequest + (*IsBootstrappedResponse)(nil), // 16: info.v1.IsBootstrappedResponse + (*UpgradesRequest)(nil), // 17: info.v1.UpgradesRequest + (*UpgradesResponse)(nil), // 18: info.v1.UpgradesResponse + (*UptimeRequest)(nil), // 19: info.v1.UptimeRequest + (*UptimeResponse)(nil), // 20: info.v1.UptimeResponse + (*GetVMsRequest)(nil), // 21: info.v1.GetVMsRequest + (*GetVMsResponse)(nil), // 22: info.v1.GetVMsResponse + (*VMAliases)(nil), // 23: info.v1.VMAliases + nil, // 24: info.v1.GetNodeVersionResponse.VmVersionsEntry + nil, // 25: info.v1.GetVMsResponse.VmsEntry + nil, // 26: info.v1.GetVMsResponse.FxsEntry + (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp +} +var file_info_v1_service_proto_depIdxs = []int32{ + 24, // 0: info.v1.GetNodeVersionResponse.vm_versions:type_name -> info.v1.GetNodeVersionResponse.VmVersionsEntry + 13, // 1: info.v1.PeersResponse.peers:type_name -> info.v1.PeerInfo + 27, // 2: info.v1.UpgradesResponse.apricot_phase1_time:type_name -> google.protobuf.Timestamp + 27, // 3: info.v1.UpgradesResponse.apricot_phase2_time:type_name -> google.protobuf.Timestamp + 27, // 4: info.v1.UpgradesResponse.apricot_phase3_time:type_name -> google.protobuf.Timestamp + 27, // 5: info.v1.UpgradesResponse.apricot_phase4_time:type_name -> google.protobuf.Timestamp + 27, // 6: info.v1.UpgradesResponse.apricot_phase5_time:type_name -> google.protobuf.Timestamp + 27, // 7: info.v1.UpgradesResponse.apricot_phase_pre6_time:type_name -> google.protobuf.Timestamp + 27, // 8: info.v1.UpgradesResponse.apricot_phase6_time:type_name -> google.protobuf.Timestamp + 27, // 9: info.v1.UpgradesResponse.apricot_phase_post6_time:type_name -> google.protobuf.Timestamp + 27, // 10: info.v1.UpgradesResponse.banff_time:type_name -> google.protobuf.Timestamp + 27, // 11: info.v1.UpgradesResponse.cortina_time:type_name -> google.protobuf.Timestamp + 27, // 12: info.v1.UpgradesResponse.durango_time:type_name -> google.protobuf.Timestamp + 27, // 13: info.v1.UpgradesResponse.etna_time:type_name -> google.protobuf.Timestamp + 27, // 14: info.v1.UpgradesResponse.fortuna_time:type_name -> google.protobuf.Timestamp + 27, // 15: info.v1.UpgradesResponse.granite_time:type_name -> google.protobuf.Timestamp + 25, // 16: info.v1.GetVMsResponse.vms:type_name -> info.v1.GetVMsResponse.VmsEntry + 26, // 17: info.v1.GetVMsResponse.fxs:type_name -> info.v1.GetVMsResponse.FxsEntry + 23, // 18: info.v1.GetVMsResponse.VmsEntry.value:type_name -> info.v1.VMAliases + 0, // 19: info.v1.InfoService.GetNodeVersion:input_type -> info.v1.GetNodeVersionRequest + 2, // 20: info.v1.InfoService.GetNodeID:input_type -> info.v1.GetNodeIDRequest + 4, // 21: info.v1.InfoService.GetNodeIP:input_type -> info.v1.GetNodeIPRequest + 6, // 22: info.v1.InfoService.GetNetworkID:input_type -> info.v1.GetNetworkIDRequest + 8, // 23: info.v1.InfoService.GetNetworkName:input_type -> info.v1.GetNetworkNameRequest + 10, // 24: info.v1.InfoService.GetBlockchainID:input_type -> info.v1.GetBlockchainIDRequest + 12, // 25: info.v1.InfoService.Peers:input_type -> info.v1.PeersRequest + 15, // 26: info.v1.InfoService.IsBootstrapped:input_type -> info.v1.IsBootstrappedRequest + 17, // 27: info.v1.InfoService.Upgrades:input_type -> info.v1.UpgradesRequest + 19, // 28: info.v1.InfoService.Uptime:input_type -> info.v1.UptimeRequest + 21, // 29: info.v1.InfoService.GetVMs:input_type -> info.v1.GetVMsRequest + 1, // 30: info.v1.InfoService.GetNodeVersion:output_type -> info.v1.GetNodeVersionResponse + 3, // 31: info.v1.InfoService.GetNodeID:output_type -> info.v1.GetNodeIDResponse + 5, // 32: info.v1.InfoService.GetNodeIP:output_type -> info.v1.GetNodeIPResponse + 7, // 33: info.v1.InfoService.GetNetworkID:output_type -> info.v1.GetNetworkIDResponse + 9, // 34: info.v1.InfoService.GetNetworkName:output_type -> info.v1.GetNetworkNameResponse + 11, // 35: info.v1.InfoService.GetBlockchainID:output_type -> info.v1.GetBlockchainIDResponse + 14, // 36: info.v1.InfoService.Peers:output_type -> info.v1.PeersResponse + 16, // 37: info.v1.InfoService.IsBootstrapped:output_type -> info.v1.IsBootstrappedResponse + 18, // 38: info.v1.InfoService.Upgrades:output_type -> info.v1.UpgradesResponse + 20, // 39: info.v1.InfoService.Uptime:output_type -> info.v1.UptimeResponse + 22, // 40: info.v1.InfoService.GetVMs:output_type -> info.v1.GetVMsResponse + 30, // [30:41] is the sub-list for method output_type + 19, // [19:30] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_info_v1_service_proto_init() } +func file_info_v1_service_proto_init() { + if File_info_v1_service_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_info_v1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 27, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_info_v1_service_proto_goTypes, + DependencyIndexes: file_info_v1_service_proto_depIdxs, + MessageInfos: file_info_v1_service_proto_msgTypes, + }.Build() + File_info_v1_service_proto = out.File + file_info_v1_service_proto_rawDesc = nil + file_info_v1_service_proto_goTypes = nil + file_info_v1_service_proto_depIdxs = nil +} diff --git a/proto/pb/info/v1/service_grpc.pb.go b/proto/pb/info/v1/service_grpc.pb.go new file mode 100644 index 000000000000..08e03479abe0 --- /dev/null +++ b/proto/pb/info/v1/service_grpc.pb.go @@ -0,0 +1,479 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: info/v1/service.proto + +package infov1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + InfoService_GetNodeVersion_FullMethodName = "/info.v1.InfoService/GetNodeVersion" + InfoService_GetNodeID_FullMethodName = "/info.v1.InfoService/GetNodeID" + InfoService_GetNodeIP_FullMethodName = "/info.v1.InfoService/GetNodeIP" + InfoService_GetNetworkID_FullMethodName = "/info.v1.InfoService/GetNetworkID" + InfoService_GetNetworkName_FullMethodName = "/info.v1.InfoService/GetNetworkName" + InfoService_GetBlockchainID_FullMethodName = "/info.v1.InfoService/GetBlockchainID" + InfoService_Peers_FullMethodName = "/info.v1.InfoService/Peers" + InfoService_IsBootstrapped_FullMethodName = "/info.v1.InfoService/IsBootstrapped" + InfoService_Upgrades_FullMethodName = "/info.v1.InfoService/Upgrades" + InfoService_Uptime_FullMethodName = "/info.v1.InfoService/Uptime" + InfoService_GetVMs_FullMethodName = "/info.v1.InfoService/GetVMs" +) + +// InfoServiceClient is the client API for InfoService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InfoServiceClient interface { + GetNodeVersion(ctx context.Context, in *GetNodeVersionRequest, opts ...grpc.CallOption) (*GetNodeVersionResponse, error) + GetNodeID(ctx context.Context, in *GetNodeIDRequest, opts ...grpc.CallOption) (*GetNodeIDResponse, error) + GetNodeIP(ctx context.Context, in *GetNodeIPRequest, opts ...grpc.CallOption) (*GetNodeIPResponse, error) + GetNetworkID(ctx context.Context, in *GetNetworkIDRequest, opts ...grpc.CallOption) (*GetNetworkIDResponse, error) + GetNetworkName(ctx context.Context, in *GetNetworkNameRequest, opts ...grpc.CallOption) (*GetNetworkNameResponse, error) + GetBlockchainID(ctx context.Context, in *GetBlockchainIDRequest, opts ...grpc.CallOption) (*GetBlockchainIDResponse, error) + Peers(ctx context.Context, in *PeersRequest, opts ...grpc.CallOption) (*PeersResponse, error) + IsBootstrapped(ctx context.Context, in *IsBootstrappedRequest, opts ...grpc.CallOption) (*IsBootstrappedResponse, error) + Upgrades(ctx context.Context, in *UpgradesRequest, opts ...grpc.CallOption) (*UpgradesResponse, error) + Uptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) + GetVMs(ctx context.Context, in *GetVMsRequest, opts ...grpc.CallOption) (*GetVMsResponse, error) +} + +type infoServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewInfoServiceClient(cc grpc.ClientConnInterface) InfoServiceClient { + return &infoServiceClient{cc} +} + +func (c *infoServiceClient) GetNodeVersion(ctx context.Context, in *GetNodeVersionRequest, opts ...grpc.CallOption) (*GetNodeVersionResponse, error) { + out := new(GetNodeVersionResponse) + err := c.cc.Invoke(ctx, InfoService_GetNodeVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNodeID(ctx context.Context, in *GetNodeIDRequest, opts ...grpc.CallOption) (*GetNodeIDResponse, error) { + out := new(GetNodeIDResponse) + err := c.cc.Invoke(ctx, InfoService_GetNodeID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNodeIP(ctx context.Context, in *GetNodeIPRequest, opts ...grpc.CallOption) (*GetNodeIPResponse, error) { + out := new(GetNodeIPResponse) + err := c.cc.Invoke(ctx, InfoService_GetNodeIP_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNetworkID(ctx context.Context, in *GetNetworkIDRequest, opts ...grpc.CallOption) (*GetNetworkIDResponse, error) { + out := new(GetNetworkIDResponse) + err := c.cc.Invoke(ctx, InfoService_GetNetworkID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNetworkName(ctx context.Context, in *GetNetworkNameRequest, opts ...grpc.CallOption) (*GetNetworkNameResponse, error) { + out := new(GetNetworkNameResponse) + err := c.cc.Invoke(ctx, InfoService_GetNetworkName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetBlockchainID(ctx context.Context, in *GetBlockchainIDRequest, opts ...grpc.CallOption) (*GetBlockchainIDResponse, error) { + out := new(GetBlockchainIDResponse) + err := c.cc.Invoke(ctx, InfoService_GetBlockchainID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) Peers(ctx context.Context, in *PeersRequest, opts ...grpc.CallOption) (*PeersResponse, error) { + out := new(PeersResponse) + err := c.cc.Invoke(ctx, InfoService_Peers_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) IsBootstrapped(ctx context.Context, in *IsBootstrappedRequest, opts ...grpc.CallOption) (*IsBootstrappedResponse, error) { + out := new(IsBootstrappedResponse) + err := c.cc.Invoke(ctx, InfoService_IsBootstrapped_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) Upgrades(ctx context.Context, in *UpgradesRequest, opts ...grpc.CallOption) (*UpgradesResponse, error) { + out := new(UpgradesResponse) + err := c.cc.Invoke(ctx, InfoService_Upgrades_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) Uptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) { + out := new(UptimeResponse) + err := c.cc.Invoke(ctx, InfoService_Uptime_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetVMs(ctx context.Context, in *GetVMsRequest, opts ...grpc.CallOption) (*GetVMsResponse, error) { + out := new(GetVMsResponse) + err := c.cc.Invoke(ctx, InfoService_GetVMs_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InfoServiceServer is the server API for InfoService service. +// All implementations must embed UnimplementedInfoServiceServer +// for forward compatibility +type InfoServiceServer interface { + GetNodeVersion(context.Context, *GetNodeVersionRequest) (*GetNodeVersionResponse, error) + GetNodeID(context.Context, *GetNodeIDRequest) (*GetNodeIDResponse, error) + GetNodeIP(context.Context, *GetNodeIPRequest) (*GetNodeIPResponse, error) + GetNetworkID(context.Context, *GetNetworkIDRequest) (*GetNetworkIDResponse, error) + GetNetworkName(context.Context, *GetNetworkNameRequest) (*GetNetworkNameResponse, error) + GetBlockchainID(context.Context, *GetBlockchainIDRequest) (*GetBlockchainIDResponse, error) + Peers(context.Context, *PeersRequest) (*PeersResponse, error) + IsBootstrapped(context.Context, *IsBootstrappedRequest) (*IsBootstrappedResponse, error) + Upgrades(context.Context, *UpgradesRequest) (*UpgradesResponse, error) + Uptime(context.Context, *UptimeRequest) (*UptimeResponse, error) + GetVMs(context.Context, *GetVMsRequest) (*GetVMsResponse, error) + mustEmbedUnimplementedInfoServiceServer() +} + +// UnimplementedInfoServiceServer must be embedded to have forward compatible implementations. +type UnimplementedInfoServiceServer struct { +} + +func (UnimplementedInfoServiceServer) GetNodeVersion(context.Context, *GetNodeVersionRequest) (*GetNodeVersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeVersion not implemented") +} +func (UnimplementedInfoServiceServer) GetNodeID(context.Context, *GetNodeIDRequest) (*GetNodeIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeID not implemented") +} +func (UnimplementedInfoServiceServer) GetNodeIP(context.Context, *GetNodeIPRequest) (*GetNodeIPResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeIP not implemented") +} +func (UnimplementedInfoServiceServer) GetNetworkID(context.Context, *GetNetworkIDRequest) (*GetNetworkIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkID not implemented") +} +func (UnimplementedInfoServiceServer) GetNetworkName(context.Context, *GetNetworkNameRequest) (*GetNetworkNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkName not implemented") +} +func (UnimplementedInfoServiceServer) GetBlockchainID(context.Context, *GetBlockchainIDRequest) (*GetBlockchainIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockchainID not implemented") +} +func (UnimplementedInfoServiceServer) Peers(context.Context, *PeersRequest) (*PeersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Peers not implemented") +} +func (UnimplementedInfoServiceServer) IsBootstrapped(context.Context, *IsBootstrappedRequest) (*IsBootstrappedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsBootstrapped not implemented") +} +func (UnimplementedInfoServiceServer) Upgrades(context.Context, *UpgradesRequest) (*UpgradesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Upgrades not implemented") +} +func (UnimplementedInfoServiceServer) Uptime(context.Context, *UptimeRequest) (*UptimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Uptime not implemented") +} +func (UnimplementedInfoServiceServer) GetVMs(context.Context, *GetVMsRequest) (*GetVMsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVMs not implemented") +} +func (UnimplementedInfoServiceServer) mustEmbedUnimplementedInfoServiceServer() {} + +// UnsafeInfoServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InfoServiceServer will +// result in compilation errors. +type UnsafeInfoServiceServer interface { + mustEmbedUnimplementedInfoServiceServer() +} + +func RegisterInfoServiceServer(s grpc.ServiceRegistrar, srv InfoServiceServer) { + s.RegisterService(&InfoService_ServiceDesc, srv) +} + +func _InfoService_GetNodeVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNodeVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNodeVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNodeVersion(ctx, req.(*GetNodeVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNodeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNodeID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNodeID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNodeID(ctx, req.(*GetNodeIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNodeIP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeIPRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNodeIP(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNodeIP_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNodeIP(ctx, req.(*GetNodeIPRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNetworkID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNetworkID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNetworkID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNetworkID(ctx, req.(*GetNetworkIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNetworkName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNetworkName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNetworkName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNetworkName(ctx, req.(*GetNetworkNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetBlockchainID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockchainIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetBlockchainID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetBlockchainID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetBlockchainID(ctx, req.(*GetBlockchainIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_Peers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PeersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).Peers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_Peers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).Peers(ctx, req.(*PeersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_IsBootstrapped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsBootstrappedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).IsBootstrapped(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_IsBootstrapped_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).IsBootstrapped(ctx, req.(*IsBootstrappedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_Upgrades_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpgradesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).Upgrades(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_Upgrades_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).Upgrades(ctx, req.(*UpgradesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_Uptime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UptimeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).Uptime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_Uptime_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).Uptime(ctx, req.(*UptimeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetVMs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVMsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetVMs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetVMs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetVMs(ctx, req.(*GetVMsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InfoService_ServiceDesc is the grpc.ServiceDesc for InfoService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InfoService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "info.v1.InfoService", + HandlerType: (*InfoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetNodeVersion", + Handler: _InfoService_GetNodeVersion_Handler, + }, + { + MethodName: "GetNodeID", + Handler: _InfoService_GetNodeID_Handler, + }, + { + MethodName: "GetNodeIP", + Handler: _InfoService_GetNodeIP_Handler, + }, + { + MethodName: "GetNetworkID", + Handler: _InfoService_GetNetworkID_Handler, + }, + { + MethodName: "GetNetworkName", + Handler: _InfoService_GetNetworkName_Handler, + }, + { + MethodName: "GetBlockchainID", + Handler: _InfoService_GetBlockchainID_Handler, + }, + { + MethodName: "Peers", + Handler: _InfoService_Peers_Handler, + }, + { + MethodName: "IsBootstrapped", + Handler: _InfoService_IsBootstrapped_Handler, + }, + { + MethodName: "Upgrades", + Handler: _InfoService_Upgrades_Handler, + }, + { + MethodName: "Uptime", + Handler: _InfoService_Uptime_Handler, + }, + { + MethodName: "GetVMs", + Handler: _InfoService_GetVMs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "info/v1/service.proto", +} diff --git a/proto/pb/io/reader/reader.pb.go b/proto/pb/io/reader/reader.pb.go index 5279f5a82692..86d25c02151d 100644 --- a/proto/pb/io/reader/reader.pb.go +++ b/proto/pb/io/reader/reader.pb.go @@ -121,7 +121,7 @@ type ReadResponse struct { // read is the payload in bytes Read []byte `protobuf:"bytes,1,opt,name=read,proto3" json:"read,omitempty"` // error is an error message - Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof" json:"error,omitempty"` } func (x *ReadResponse) Reset() { @@ -228,29 +228,30 @@ var file_io_reader_reader_proto_rawDesc = []byte{ 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x25, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x4a, 0x0a, 0x0c, 0x52, 0x65, + 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, - 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x26, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x56, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x33, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x3b, - 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4f, 0x46, 0x10, 0x01, 0x32, 0x41, 0x0a, 0x06, 0x52, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x16, 0x2e, - 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, - 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, - 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, - 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x69, 0x6f, 0x2f, 0x72, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x56, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, + 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x3b, 0x0a, + 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4f, 0x46, 0x10, 0x01, 0x32, 0x41, 0x0a, 0x06, 0x52, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x16, 0x2e, 0x69, + 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, 0x5a, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, + 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x69, 0x6f, 0x2f, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -290,6 +291,7 @@ func file_io_reader_reader_proto_init() { if File_io_reader_reader_proto != nil { return } + file_io_reader_reader_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/pb/metrics/v1/metricsv1connect/service.connect.go b/proto/pb/metrics/v1/metricsv1connect/service.connect.go new file mode 100644 index 000000000000..360a8989f26e --- /dev/null +++ b/proto/pb/metrics/v1/metricsv1connect/service.connect.go @@ -0,0 +1,112 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: metrics/v1/service.proto + +package metricsv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/ava-labs/avalanchego/proto/pb/metrics/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // MetricsServiceName is the fully-qualified name of the MetricsService service. + MetricsServiceName = "metrics.v1.MetricsService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // MetricsServiceGetMetricsProcedure is the fully-qualified name of the MetricsService's GetMetrics + // RPC. + MetricsServiceGetMetricsProcedure = "/metrics.v1.MetricsService/GetMetrics" +) + +// MetricsServiceClient is a client for the metrics.v1.MetricsService service. +type MetricsServiceClient interface { + GetMetrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) +} + +// NewMetricsServiceClient constructs a client for the metrics.v1.MetricsService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewMetricsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MetricsServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + metricsServiceMethods := v1.File_metrics_v1_service_proto.Services().ByName("MetricsService").Methods() + return &metricsServiceClient{ + getMetrics: connect.NewClient[v1.MetricsRequest, v1.MetricsResponse]( + httpClient, + baseURL+MetricsServiceGetMetricsProcedure, + connect.WithSchema(metricsServiceMethods.ByName("GetMetrics")), + connect.WithClientOptions(opts...), + ), + } +} + +// metricsServiceClient implements MetricsServiceClient. +type metricsServiceClient struct { + getMetrics *connect.Client[v1.MetricsRequest, v1.MetricsResponse] +} + +// GetMetrics calls metrics.v1.MetricsService.GetMetrics. +func (c *metricsServiceClient) GetMetrics(ctx context.Context, req *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) { + return c.getMetrics.CallUnary(ctx, req) +} + +// MetricsServiceHandler is an implementation of the metrics.v1.MetricsService service. +type MetricsServiceHandler interface { + GetMetrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) +} + +// NewMetricsServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewMetricsServiceHandler(svc MetricsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + metricsServiceMethods := v1.File_metrics_v1_service_proto.Services().ByName("MetricsService").Methods() + metricsServiceGetMetricsHandler := connect.NewUnaryHandler( + MetricsServiceGetMetricsProcedure, + svc.GetMetrics, + connect.WithSchema(metricsServiceMethods.ByName("GetMetrics")), + connect.WithHandlerOptions(opts...), + ) + return "/metrics.v1.MetricsService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case MetricsServiceGetMetricsProcedure: + metricsServiceGetMetricsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedMetricsServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedMetricsServiceHandler struct{} + +func (UnimplementedMetricsServiceHandler) GetMetrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metrics.v1.MetricsService.GetMetrics is not implemented")) +} diff --git a/proto/pb/metrics/v1/service.pb.go b/proto/pb/metrics/v1/service.pb.go new file mode 100644 index 000000000000..99d92dd83890 --- /dev/null +++ b/proto/pb/metrics/v1/service.pb.go @@ -0,0 +1,271 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc (unknown) +// source: metrics/v1/service.proto + +package metricsv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MetricsRequest) Reset() { + *x = MetricsRequest{} + mi := &file_metrics_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetricsRequest) ProtoMessage() {} + +func (x *MetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_metrics_v1_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetricsRequest.ProtoReflect.Descriptor instead. +func (*MetricsRequest) Descriptor() ([]byte, []int) { + return file_metrics_v1_service_proto_rawDescGZIP(), []int{0} +} + +type MetricsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *MetricsResponse) Reset() { + *x = MetricsResponse{} + mi := &file_metrics_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetricsResponse) ProtoMessage() {} + +func (x *MetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_metrics_v1_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetricsResponse.ProtoReflect.Descriptor instead. +func (*MetricsResponse) Descriptor() ([]byte, []int) { + return file_metrics_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *MetricsResponse) GetMetrics() []*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +type Metric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Help string `protobuf:"bytes,3,opt,name=help,proto3" json:"help,omitempty"` + Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` + Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Metric) Reset() { + *x = Metric{} + mi := &file_metrics_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Metric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metric) ProtoMessage() {} + +func (x *Metric) ProtoReflect() protoreflect.Message { + mi := &file_metrics_v1_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metric.ProtoReflect.Descriptor instead. +func (*Metric) Descriptor() ([]byte, []int) { + return file_metrics_v1_service_proto_rawDescGZIP(), []int{2} +} + +func (x *Metric) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Metric) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Metric) GetHelp() string { + if x != nil { + return x.Help + } + return "" +} + +func (x *Metric) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *Metric) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +var File_metrics_v1_service_proto protoreflect.FileDescriptor + +var file_metrics_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x10, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x06, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x68, 0x65, 0x6c, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x57, 0x0a, 0x0e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_metrics_v1_service_proto_rawDescOnce sync.Once + file_metrics_v1_service_proto_rawDescData = file_metrics_v1_service_proto_rawDesc +) + +func file_metrics_v1_service_proto_rawDescGZIP() []byte { + file_metrics_v1_service_proto_rawDescOnce.Do(func() { + file_metrics_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_metrics_v1_service_proto_rawDescData) + }) + return file_metrics_v1_service_proto_rawDescData +} + +var file_metrics_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_metrics_v1_service_proto_goTypes = []any{ + (*MetricsRequest)(nil), // 0: metrics.v1.MetricsRequest + (*MetricsResponse)(nil), // 1: metrics.v1.MetricsResponse + (*Metric)(nil), // 2: metrics.v1.Metric + nil, // 3: metrics.v1.Metric.LabelsEntry +} +var file_metrics_v1_service_proto_depIdxs = []int32{ + 2, // 0: metrics.v1.MetricsResponse.metrics:type_name -> metrics.v1.Metric + 3, // 1: metrics.v1.Metric.labels:type_name -> metrics.v1.Metric.LabelsEntry + 0, // 2: metrics.v1.MetricsService.GetMetrics:input_type -> metrics.v1.MetricsRequest + 1, // 3: metrics.v1.MetricsService.GetMetrics:output_type -> metrics.v1.MetricsResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_metrics_v1_service_proto_init() } +func file_metrics_v1_service_proto_init() { + if File_metrics_v1_service_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_metrics_v1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_metrics_v1_service_proto_goTypes, + DependencyIndexes: file_metrics_v1_service_proto_depIdxs, + MessageInfos: file_metrics_v1_service_proto_msgTypes, + }.Build() + File_metrics_v1_service_proto = out.File + file_metrics_v1_service_proto_rawDesc = nil + file_metrics_v1_service_proto_goTypes = nil + file_metrics_v1_service_proto_depIdxs = nil +} diff --git a/proto/pb/metrics/v1/service_grpc.pb.go b/proto/pb/metrics/v1/service_grpc.pb.go new file mode 100644 index 000000000000..b0c1e4f56561 --- /dev/null +++ b/proto/pb/metrics/v1/service_grpc.pb.go @@ -0,0 +1,109 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: metrics/v1/service.proto + +package metricsv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + MetricsService_GetMetrics_FullMethodName = "/metrics.v1.MetricsService/GetMetrics" +) + +// MetricsServiceClient is the client API for MetricsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MetricsServiceClient interface { + GetMetrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) +} + +type metricsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient { + return &metricsServiceClient{cc} +} + +func (c *metricsServiceClient) GetMetrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) { + out := new(MetricsResponse) + err := c.cc.Invoke(ctx, MetricsService_GetMetrics_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetricsServiceServer is the server API for MetricsService service. +// All implementations must embed UnimplementedMetricsServiceServer +// for forward compatibility +type MetricsServiceServer interface { + GetMetrics(context.Context, *MetricsRequest) (*MetricsResponse, error) + mustEmbedUnimplementedMetricsServiceServer() +} + +// UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations. +type UnimplementedMetricsServiceServer struct { +} + +func (UnimplementedMetricsServiceServer) GetMetrics(context.Context, *MetricsRequest) (*MetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") +} +func (UnimplementedMetricsServiceServer) mustEmbedUnimplementedMetricsServiceServer() {} + +// UnsafeMetricsServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MetricsServiceServer will +// result in compilation errors. +type UnsafeMetricsServiceServer interface { + mustEmbedUnimplementedMetricsServiceServer() +} + +func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer) { + s.RegisterService(&MetricsService_ServiceDesc, srv) +} + +func _MetricsService_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceServer).GetMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricsService_GetMetrics_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServiceServer).GetMetrics(ctx, req.(*MetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MetricsService_ServiceDesc is the grpc.ServiceDesc for MetricsService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MetricsService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "metrics.v1.MetricsService", + HandlerType: (*MetricsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMetrics", + Handler: _MetricsService_GetMetrics_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "metrics/v1/service.proto", +} diff --git a/tests/e2e/connect/connect_suite_test.go b/tests/e2e/connect/connect_suite_test.go new file mode 100644 index 000000000000..21f58168899e --- /dev/null +++ b/tests/e2e/connect/connect_suite_test.go @@ -0,0 +1,16 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connect_test + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestConnect(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Connect Suite") +} diff --git a/tests/e2e/connect/info_test.go b/tests/e2e/connect/info_test.go new file mode 100644 index 000000000000..9d618379f91a --- /dev/null +++ b/tests/e2e/connect/info_test.go @@ -0,0 +1,75 @@ +package connect_test + +import ( + "context" + "fmt" + "net/http" + "time" + + "connectrpc.com/connect" + "github.com/ava-labs/avalanchego/proto/pb/info/v1" + "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("InfoService ConnectRPC Smoke Tests", func() { + var ( + client infov1connect.InfoServiceClient + ctx context.Context + ) + + // Before the suite runs, wait for the node's health endpoint + BeforeSuite(func() { + baseHealthURL := "http://127.0.0.1:9650/ext/health/health" + deadline := time.Now().Add(15 * time.Second) + for { + if time.Now().After(deadline) { + Fail(fmt.Sprintf("timed out waiting for health endpoint at %s", baseHealthURL)) + } + resp, err := http.Get(baseHealthURL) + if err == nil && resp.StatusCode == http.StatusOK { + resp.Body.Close() + break + } + time.Sleep(500 * time.Millisecond) + } + }) + + BeforeEach(func() { + ctx = context.Background() + baseURL := "http://127.0.0.1:9650/ext/info" + httpClient := &http.Client{Timeout: 5 * time.Second} + client = infov1connect.NewInfoServiceClient(httpClient, baseURL) + }) + + It("GetNodeVersion should return a non-empty version", func() { + resp, err := client.GetNodeVersion(ctx, connect.NewRequest(&infov1.GetNodeVersionRequest{})) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.Version).ToNot(BeEmpty()) + }) + + It("GetNodeID should return a NodeID- prefix", func() { + resp, err := client.GetNodeID(ctx, connect.NewRequest(&infov1.GetNodeIDRequest{})) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NodeId).To(ContainSubstring("NodeID-")) + }) + + It("GetNetworkID should return an ID > 0", func() { + resp, err := client.GetNetworkID(ctx, connect.NewRequest(&infov1.GetNetworkIDRequest{})) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NetworkId).To(BeNumerically(">", 0)) + }) + + It("GetBlockchainID should return a valid ID for alias X", func() { + resp, err := client.GetBlockchainID(ctx, connect.NewRequest(&infov1.GetBlockchainIDRequest{Alias: "X"})) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.BlockchainId).ToNot(BeEmpty()) + }) + + It("Peers should return NumPeers >= 0", func() { + resp, err := client.Peers(ctx, connect.NewRequest(&infov1.PeersRequest{})) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NumPeers).To(BeNumerically(">=", 0)) + }) +}) diff --git a/tests/e2e/connect/suite_test.go b/tests/e2e/connect/suite_test.go new file mode 100644 index 000000000000..98a2d195d21b --- /dev/null +++ b/tests/e2e/connect/suite_test.go @@ -0,0 +1,46 @@ +// // tests/e2e/connect/suite_test.go +// package connect_test +// +// import ( +// +// "github.com/ava-labs/avalanchego/tests/fixture/e2e" +// "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" +// . "github.com/onsi/ginkgo/v2" +// +// ) +// +// var _ = SynchronizedBeforeSuite( +// +// // This runs _once_, on the first Ginkgo node: +// func() []byte { +// flagVars := e2e.RegisterFlagsWithDefaultOwner("avalanchego-e2e") +// desired := tmpnet.NewDefaultNetwork("connectrpc-health-api") +// +// env := e2e.NewTestEnvironment( +// e2e.NewEventHandlerTestContext(), +// flagVars, +// desired, +// ) +// return env.Marshal() +// }, +// // This runs on _every_ Ginkgo node: +// func(envBytes []byte) { +// tc := e2e.NewTestContext() +// e2e.InitSharedTestEnvironment(tc, envBytes) +// }, +// +// ) +// tests/connect/info_suite_test.go +package connect_test + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestInfoServiceConnectRPC(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "InfoService ConnectRPC Suite") +} diff --git a/tests/e2e/vms/xsvm.go b/tests/e2e/vms/xsvm.go index 2efa06115002..6441bce3dd17 100644 --- a/tests/e2e/vms/xsvm.go +++ b/tests/e2e/vms/xsvm.go @@ -9,6 +9,7 @@ import ( "fmt" "net" "net/http" + "sync" "time" "connectrpc.com/connect" @@ -16,9 +17,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap" "golang.org/x/net/http2" - "golang.org/x/sync/errgroup" - "github.com/ava-labs/avalanchego/api/connectclient" + "github.com/ava-labs/avalanchego/api/server" "github.com/ava-labs/avalanchego/connectproto/pb/xsvm" "github.com/ava-labs/avalanchego/connectproto/pb/xsvm/xsvmconnect" "github.com/ava-labs/avalanchego/ids" @@ -211,23 +211,20 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { }, } - chainID := network.GetSubnet(subnetAName).Chains[0].ChainID.String() - client := xsvmconnect.NewPingClient( - httpClient, - node.URI, - connect.WithInterceptors( - connectclient.SetRouteHeaderInterceptor{Route: chainID}, - ), - ) + client := xsvmconnect.NewPingClient(httpClient, node.URI) tc.By("serving unary rpc") msg := "foobar" + request := &connect.Request[xsvm.PingRequest]{ Msg: &xsvm.PingRequest{ Message: msg, }, } + chainID := network.GetSubnet(subnetAName).Chains[0].ChainID + request.Header().Set(server.HTTPHeaderRoute, chainID.String()) + reply, err := client.Ping(tc.DefaultContext(), request) require.NoError(err) require.Equal(msg, reply.Msg.Message) @@ -235,6 +232,7 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { tc.By("serving bidirectional streaming rpc") stream := client.StreamPing(tc.DefaultContext()) + stream.RequestHeader().Set(server.HTTPHeaderRoute, chainID.String()) ginkgo.DeferCleanup(func() { require.NoError(stream.CloseRequest()) }) @@ -262,14 +260,8 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { eg.Go(func() error { for i := 0; i < n; i++ { reply, err := stream.Receive() - if err != nil { - return err - } - - if fmt.Sprintf("ping-%d", i) != reply.Message { - return fmt.Errorf("unexpected ping reply: %s", reply.Message) - } - + require.NoError(err) + require.Equal(fmt.Sprintf("ping-%d", i), reply.Message) log.Info("received message", zap.String("msg", reply.Message)) } From 981c8537ccfb164f9adf3e6b924c12e3b856e926 Mon Sep 17 00:00:00 2001 From: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> Date: Thu, 10 Jul 2025 14:44:34 -0400 Subject: [PATCH 03/13] whoops Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> --- go.mod | 6 +++++- tests/e2e/vms/xsvm.go | 28 ++++++++++++++++++---------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 2d7aaba8a226..432118f6c9c7 100644 --- a/go.mod +++ b/go.mod @@ -37,6 +37,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d github.com/onsi/ginkgo/v2 v2.13.1 + github.com/onsi/gomega v1.29.0 github.com/pires/go-proxyproto v0.6.2 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/client_model v0.3.0 @@ -81,7 +82,10 @@ require ( k8s.io/utils v0.0.0-20230726121419-3b25d923346b ) -require github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8 // indirect +require ( + github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8 // indirect + github.com/google/go-cmp v0.7.0 // indirect +) require ( github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect diff --git a/tests/e2e/vms/xsvm.go b/tests/e2e/vms/xsvm.go index 6441bce3dd17..2efa06115002 100644 --- a/tests/e2e/vms/xsvm.go +++ b/tests/e2e/vms/xsvm.go @@ -9,7 +9,6 @@ import ( "fmt" "net" "net/http" - "sync" "time" "connectrpc.com/connect" @@ -17,8 +16,9 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap" "golang.org/x/net/http2" + "golang.org/x/sync/errgroup" - "github.com/ava-labs/avalanchego/api/server" + "github.com/ava-labs/avalanchego/api/connectclient" "github.com/ava-labs/avalanchego/connectproto/pb/xsvm" "github.com/ava-labs/avalanchego/connectproto/pb/xsvm/xsvmconnect" "github.com/ava-labs/avalanchego/ids" @@ -211,20 +211,23 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { }, } - client := xsvmconnect.NewPingClient(httpClient, node.URI) + chainID := network.GetSubnet(subnetAName).Chains[0].ChainID.String() + client := xsvmconnect.NewPingClient( + httpClient, + node.URI, + connect.WithInterceptors( + connectclient.SetRouteHeaderInterceptor{Route: chainID}, + ), + ) tc.By("serving unary rpc") msg := "foobar" - request := &connect.Request[xsvm.PingRequest]{ Msg: &xsvm.PingRequest{ Message: msg, }, } - chainID := network.GetSubnet(subnetAName).Chains[0].ChainID - request.Header().Set(server.HTTPHeaderRoute, chainID.String()) - reply, err := client.Ping(tc.DefaultContext(), request) require.NoError(err) require.Equal(msg, reply.Msg.Message) @@ -232,7 +235,6 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { tc.By("serving bidirectional streaming rpc") stream := client.StreamPing(tc.DefaultContext()) - stream.RequestHeader().Set(server.HTTPHeaderRoute, chainID.String()) ginkgo.DeferCleanup(func() { require.NoError(stream.CloseRequest()) }) @@ -260,8 +262,14 @@ var _ = ginkgo.Describe("[XSVM]", ginkgo.Label("xsvm"), func() { eg.Go(func() error { for i := 0; i < n; i++ { reply, err := stream.Receive() - require.NoError(err) - require.Equal(fmt.Sprintf("ping-%d", i), reply.Message) + if err != nil { + return err + } + + if fmt.Sprintf("ping-%d", i) != reply.Message { + return fmt.Errorf("unexpected ping reply: %s", reply.Message) + } + log.Info("received message", zap.String("msg", reply.Message)) } From ffebc669353c17b92f63135051f236222aa33c22 Mon Sep 17 00:00:00 2001 From: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> Date: Thu, 10 Jul 2025 14:51:00 -0400 Subject: [PATCH 04/13] clean diff Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> --- indexer/indexer.go | 2 +- indexer/indexer_test.go | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/indexer/indexer.go b/indexer/indexer.go index 3d2f42b9defc..c20f13f6fd76 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -337,7 +337,7 @@ func (i *indexer) registerChainHelper( _ = index.Close() return nil, err } - if err := i.pathAdder.AddRoute(apiServer, "index/"+name+"/"+endpoint, name); err != nil { + if err := i.pathAdder.AddRoute(apiServer, "index/"+name, "/"+endpoint); err != nil { _ = index.Close() return nil, err } diff --git a/indexer/indexer_test.go b/indexer/indexer_test.go index 167cc8877e19..6958d8851a86 100644 --- a/indexer/indexer_test.go +++ b/indexer/indexer_test.go @@ -33,11 +33,13 @@ var ( type apiServerMock struct { timesCalled int + bases []string endpoints []string } -func (a *apiServerMock) AddRoute(_ http.Handler, endpoint, _ string) error { +func (a *apiServerMock) AddRoute(_ http.Handler, base, endpoint string) error { a.timesCalled++ + a.bases = append(a.bases, base) a.endpoints = append(a.endpoints, endpoint) return nil } @@ -169,7 +171,8 @@ func TestIndexer(t *testing.T) { require.NoError(err) require.True(previouslyIndexed) require.Equal(1, server.timesCalled) - require.Equal("index/chain1/block", server.endpoints[0]) + require.Equal("index/chain1", server.bases[0]) + require.Equal("/block", server.endpoints[0]) require.Len(idxr.blockIndices, 1) require.Empty(idxr.txIndices) require.Empty(idxr.vtxIndices) @@ -251,7 +254,7 @@ func TestIndexer(t *testing.T) { require.NoError(err) require.Equal(blkID, container.ID) require.Equal(1, server.timesCalled) // block index for chain - require.Contains(server.endpoints, "index/chain1/block") + require.Contains(server.endpoints, "/block") // Register a DAG chain snow2Ctx := snowtest.Context(t, snowtest.XChainID) @@ -266,9 +269,10 @@ func TestIndexer(t *testing.T) { idxr.RegisterChain("chain2", chain2Ctx, dagVM) require.NoError(err) require.Equal(4, server.timesCalled) // block index for chain, block index for dag, vtx index, tx index - require.Contains(server.endpoints, "index/chain2/block") - require.Contains(server.endpoints, "index/chain2/vtx") - require.Contains(server.endpoints, "index/chain2/tx") + require.Contains(server.bases, "index/chain2") + require.Contains(server.endpoints, "/block") + require.Contains(server.endpoints, "/vtx") + require.Contains(server.endpoints, "/tx") require.Len(idxr.blockIndices, 2) require.Len(idxr.txIndices, 1) require.Len(idxr.vtxIndices, 1) From f25c5c144d25a157cb93f3c8dba6ebe5438debfb Mon Sep 17 00:00:00 2001 From: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> Date: Thu, 10 Jul 2025 14:53:46 -0400 Subject: [PATCH 05/13] clean diff Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> --- network/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/README.md b/network/README.md index b36f9b44aae2..6968e22783f9 100644 --- a/network/README.md +++ b/network/README.md @@ -36,7 +36,7 @@ Peers communicate by enqueuing messages between one another. Each peer on either sequenceDiagram actor Morty actor Rick - loop + loop Morty->>Rick: Write outbound messages Rick->>Morty: Read incoming messages end @@ -221,4 +221,4 @@ sequenceDiagram Note right of Rick: Summer isn't in the bloom filter Rick->>Morty: PeerList - Contains Summer ``` -This case is suboptimal, because `Rick` told `Morty` about `Summer` multiple times. If this case were to happen consistently, `Rick` may waste a significant amount of bandwidth trying to teach `Morty` about `Summer`. +This case is suboptimal, because `Rick` told `Morty` about `Summer` multiple times. If this case were to happen consistently, `Rick` may waste a significant amount of bandwidth trying to teach `Morty` about `Summer`. \ No newline at end of file From 7dffe2d0905f3ca99e4823b43784e119f28670f4 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Tue, 15 Jul 2025 12:07:30 -0400 Subject: [PATCH 06/13] Info test suite --- api/admin/connecthandler/admin_connect.go | 12 +- api/info/service.go | 4 +- node/node.go | 2 +- tests/e2e/connect/info_test.go | 241 ++++++++++++++++++---- tests/e2e/connect/suite_test.go | 46 ----- 5 files changed, 214 insertions(+), 91 deletions(-) delete mode 100644 tests/e2e/connect/suite_test.go diff --git a/api/admin/connecthandler/admin_connect.go b/api/admin/connecthandler/admin_connect.go index b7e36648413e..462ee5996bd5 100644 --- a/api/admin/connecthandler/admin_connect.go +++ b/api/admin/connecthandler/admin_connect.go @@ -127,11 +127,11 @@ func (c *connectAdminService) GetChainAliases( return nil, err } - Response := &adminv1.GetChainAliasesResponse{ + response := &adminv1.GetChainAliasesResponse{ Aliases: jsonResponse.Aliases, } - return connect.NewResponse(Response), nil + return connect.NewResponse(response), nil } // Stacktrace returns the current global stacktrace @@ -234,11 +234,11 @@ func (c *connectAdminService) GetConfig( return nil, err } - Response := &adminv1.GetConfigResponse{ + response := &adminv1.GetConfigResponse{ ConfigJson: string(configJSON), } - return connect.NewResponse(Response), nil + return connect.NewResponse(response), nil } // DBGet returns the value of a database entry @@ -255,10 +255,10 @@ func (c *connectAdminService) DBGet( return nil, err } - Response := &adminv1.DBGetResponse{ + response := &adminv1.DBGetResponse{ Value: jsonResponse.Value, ErrorCode: adminv1.ErrorCode(jsonResponse.ErrorCode), } - return connect.NewResponse(Response), nil + return connect.NewResponse(response), nil } diff --git a/api/info/service.go b/api/info/service.go index 1e09c7e1a599..aeedef154af1 100644 --- a/api/info/service.go +++ b/api/info/service.go @@ -73,7 +73,7 @@ type Info struct { MyIP *utils.Atomic[netip.AddrPort] Networking network.Network ChainManager chains.Manager - VmManager vms.Manager + VMManager vms.Manager Benchlist benchlist.Manager } @@ -116,7 +116,7 @@ func (i *Info) GetNodeVersion(_ *http.Request, _ *struct{}, reply *GetNodeVersio zap.String("method", "getNodeVersion"), ) - vmVersions, err := i.VmManager.Versions() + vmVersions, err := i.VMManager.Versions() if err != nil { return err } diff --git a/node/node.go b/node/node.go index 3f2cc2088d44..ea470c28d751 100644 --- a/node/node.go +++ b/node/node.go @@ -1406,7 +1406,7 @@ func (n *Node) initInfoAPI() error { Log: n.Log, Validators: n.vdrs, ChainManager: n.chainManager, - VmManager: n.VMManager, + VMManager: n.VMManager, MyIP: n.Config.NetworkConfig.MyIPPort, Networking: n.Net, Benchlist: n.benchlistManager, diff --git a/tests/e2e/connect/info_test.go b/tests/e2e/connect/info_test.go index 9d618379f91a..3dc1046f167a 100644 --- a/tests/e2e/connect/info_test.go +++ b/tests/e2e/connect/info_test.go @@ -1,75 +1,244 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + package connect_test import ( "context" - "fmt" "net/http" + "net/http/httptest" "time" "connectrpc.com/connect" - "github.com/ava-labs/avalanchego/proto/pb/info/v1" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" + "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" + + infov1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) -var _ = Describe("InfoService ConnectRPC Smoke Tests", func() { +type stubInfoService struct{} + +func (*stubInfoService) GetNodeVersion( + _ context.Context, + _ *connect.Request[infov1.GetNodeVersionRequest], +) (*connect.Response[infov1.GetNodeVersionResponse], error) { + return connect.NewResponse(&infov1.GetNodeVersionResponse{ + Version: "stub-v1.2.3", + }), nil +} + +func (*stubInfoService) GetNodeID( + _ context.Context, + _ *connect.Request[infov1.GetNodeIDRequest], +) (*connect.Response[infov1.GetNodeIDResponse], error) { + return connect.NewResponse(&infov1.GetNodeIDResponse{ + NodeId: "NodeID-stub-node", + }), nil +} + +func (*stubInfoService) GetNodeIP( + _ context.Context, + _ *connect.Request[infov1.GetNodeIPRequest], +) (*connect.Response[infov1.GetNodeIPResponse], error) { + return connect.NewResponse(&infov1.GetNodeIPResponse{ + Ip: "127.0.0.1", + }), nil +} + +func (*stubInfoService) GetNetworkID( + _ context.Context, + _ *connect.Request[infov1.GetNetworkIDRequest], +) (*connect.Response[infov1.GetNetworkIDResponse], error) { + return connect.NewResponse(&infov1.GetNetworkIDResponse{ + NetworkId: 1, + }), nil +} + +func (*stubInfoService) GetNetworkName( + _ context.Context, + _ *connect.Request[infov1.GetNetworkNameRequest], +) (*connect.Response[infov1.GetNetworkNameResponse], error) { + return connect.NewResponse(&infov1.GetNetworkNameResponse{ + NetworkName: "network", + }), nil +} + +func (*stubInfoService) GetBlockchainID( + _ context.Context, + _ *connect.Request[infov1.GetBlockchainIDRequest], +) (*connect.Response[infov1.GetBlockchainIDResponse], error) { + return connect.NewResponse(&infov1.GetBlockchainIDResponse{ + BlockchainId: "blockchain", + }), nil +} + +func (*stubInfoService) Peers( + _ context.Context, + _ *connect.Request[infov1.PeersRequest], +) (*connect.Response[infov1.PeersResponse], error) { + return connect.NewResponse(&infov1.PeersResponse{ + NumPeers: 0, + Peers: []*infov1.PeerInfo{}, + }), nil +} + +func (*stubInfoService) IsBootstrapped( + _ context.Context, + _ *connect.Request[infov1.IsBootstrappedRequest], +) (*connect.Response[infov1.IsBootstrappedResponse], error) { + return connect.NewResponse(&infov1.IsBootstrappedResponse{ + IsBootstrapped: true, + }), nil +} + +func (*stubInfoService) Upgrades( + _ context.Context, + _ *connect.Request[infov1.UpgradesRequest], +) (*connect.Response[infov1.UpgradesResponse], error) { + return connect.NewResponse(&infov1.UpgradesResponse{}), nil +} + +func (*stubInfoService) Uptime( + _ context.Context, + _ *connect.Request[infov1.UptimeRequest], +) (*connect.Response[infov1.UptimeResponse], error) { + return connect.NewResponse(&infov1.UptimeResponse{}), nil +} + +func (*stubInfoService) GetVMs( + _ context.Context, + _ *connect.Request[infov1.GetVMsRequest], +) (*connect.Response[infov1.GetVMsResponse], error) { + return connect.NewResponse(&infov1.GetVMsResponse{ + Vms: map[string]*infov1.VMAliases{ + "avm": {Aliases: []string{"avm"}}, + }, + Fxs: map[string]string{}, + }), nil +} + +var _ = Describe("InfoService ConnectRPC E2E (integration, no stubs)", func() { var ( - client infov1connect.InfoServiceClient - ctx context.Context + client infov1connect.InfoServiceClient + ctx context.Context + httpClient *http.Client + srv *httptest.Server ) - // Before the suite runs, wait for the node's health endpoint - BeforeSuite(func() { - baseHealthURL := "http://127.0.0.1:9650/ext/health/health" - deadline := time.Now().Add(15 * time.Second) - for { - if time.Now().After(deadline) { - Fail(fmt.Sprintf("timed out waiting for health endpoint at %s", baseHealthURL)) - } - resp, err := http.Get(baseHealthURL) - if err == nil && resp.StatusCode == http.StatusOK { - resp.Body.Close() - break - } - time.Sleep(500 * time.Millisecond) - } - }) - BeforeEach(func() { ctx = context.Background() - baseURL := "http://127.0.0.1:9650/ext/info" - httpClient := &http.Client{Timeout: 5 * time.Second} - client = infov1connect.NewInfoServiceClient(httpClient, baseURL) + stub := &stubInfoService{} + pattern, handler := infov1connect.NewInfoServiceHandler(stub) + + mux := http.NewServeMux() + mux.Handle(pattern, handler) + + // Start h2c server for testing ConnectRPC with HTTP/2 + srv = httptest.NewUnstartedServer(h2c.NewHandler(mux, &http2.Server{})) + srv.EnableHTTP2 = true + srv.Start() + + httpClient = &http.Client{Timeout: 5 * time.Second} + client = infov1connect.NewInfoServiceClient(httpClient, srv.URL) + }) + + AfterEach(func() { + if srv != nil { + srv.Close() + } }) - It("GetNodeVersion should return a non-empty version", func() { - resp, err := client.GetNodeVersion(ctx, connect.NewRequest(&infov1.GetNodeVersionRequest{})) + It("GetNodeVersion returns version info", func() { + req := connect.NewRequest(&infov1.GetNodeVersionRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.GetNodeVersion(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.Version).ToNot(BeEmpty()) }) - It("GetNodeID should return a NodeID- prefix", func() { - resp, err := client.GetNodeID(ctx, connect.NewRequest(&infov1.GetNodeIDRequest{})) + It("GetNodeID returns a node ID", func() { + req := connect.NewRequest(&infov1.GetNodeIDRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.GetNodeID(ctx, req) Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.NodeId).To(ContainSubstring("NodeID-")) + Expect(resp.Msg.NodeId).To(HavePrefix("NodeID-")) }) - It("GetNetworkID should return an ID > 0", func() { - resp, err := client.GetNetworkID(ctx, connect.NewRequest(&infov1.GetNetworkIDRequest{})) + It("GetNetworkID returns a network ID", func() { + req := connect.NewRequest(&infov1.GetNetworkIDRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.GetNetworkID(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.NetworkId).To(BeNumerically(">", 0)) }) - It("GetBlockchainID should return a valid ID for alias X", func() { - resp, err := client.GetBlockchainID(ctx, connect.NewRequest(&infov1.GetBlockchainIDRequest{Alias: "X"})) + It("GetNetworkName returns a network name", func() { + req := connect.NewRequest(&infov1.GetNetworkNameRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.GetNetworkName(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NetworkName).ToNot(BeEmpty()) + }) + + It("GetNodeIP returns an IP", func() { + req := connect.NewRequest(&infov1.GetNodeIPRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.GetNodeIP(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.Ip).ToNot(BeEmpty()) + }) + + It("GetBlockchainID returns a blockchain ID for X", func() { + req := connect.NewRequest(&infov1.GetBlockchainIDRequest{Alias: "X"}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.GetBlockchainID(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.BlockchainId).ToNot(BeEmpty()) }) - It("Peers should return NumPeers >= 0", func() { - resp, err := client.Peers(ctx, connect.NewRequest(&infov1.PeersRequest{})) + It("Peers returns a list (may be empty)", func() { + req := connect.NewRequest(&infov1.PeersRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.Peers(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.NumPeers).To(BeNumerically(">=", 0)) }) + + It("IsBootstrapped returns true for X", func() { + Eventually(func() bool { + req := connect.NewRequest(&infov1.IsBootstrappedRequest{Chain: "X"}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.IsBootstrapped(ctx, req) + return err == nil && resp.Msg.IsBootstrapped + }, 60*time.Second, 2*time.Second).Should(BeTrue()) + }) + + It("Upgrades returns a response", func() { + req := connect.NewRequest(&infov1.UpgradesRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.Upgrades(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg).ToNot(BeNil()) + }) + + It("Uptime returns a response", func() { + req := connect.NewRequest(&infov1.UptimeRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.Uptime(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg).ToNot(BeNil()) + }) + + It("GetVMs returns at least avm", func() { + req := connect.NewRequest(&infov1.GetVMsRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.GetVMs(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.Vms).To(HaveKey("avm")) + }) }) diff --git a/tests/e2e/connect/suite_test.go b/tests/e2e/connect/suite_test.go deleted file mode 100644 index 98a2d195d21b..000000000000 --- a/tests/e2e/connect/suite_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// // tests/e2e/connect/suite_test.go -// package connect_test -// -// import ( -// -// "github.com/ava-labs/avalanchego/tests/fixture/e2e" -// "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" -// . "github.com/onsi/ginkgo/v2" -// -// ) -// -// var _ = SynchronizedBeforeSuite( -// -// // This runs _once_, on the first Ginkgo node: -// func() []byte { -// flagVars := e2e.RegisterFlagsWithDefaultOwner("avalanchego-e2e") -// desired := tmpnet.NewDefaultNetwork("connectrpc-health-api") -// -// env := e2e.NewTestEnvironment( -// e2e.NewEventHandlerTestContext(), -// flagVars, -// desired, -// ) -// return env.Marshal() -// }, -// // This runs on _every_ Ginkgo node: -// func(envBytes []byte) { -// tc := e2e.NewTestContext() -// e2e.InitSharedTestEnvironment(tc, envBytes) -// }, -// -// ) -// tests/connect/info_suite_test.go -package connect_test - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestInfoServiceConnectRPC(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "InfoService ConnectRPC Suite") -} From 2e3333dccac78f5dac0f5e0a6b1c9f6b72266508 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Wed, 16 Jul 2025 13:39:39 -0400 Subject: [PATCH 07/13] Update protos and api service structs --- api/admin/connecthandler/admin_connect.go | 68 +- api/health/connecthandler/health_connect.go | 24 +- api/info/connecthandler/info_connect.go | 185 +-- api/metrics/connecthandler/metrics_connect.go | 16 +- go.mod | 20 +- go.sum | 42 +- node/node.go | 14 +- proto/admin/v1/service.proto | 24 +- proto/info/v1/service.proto | 51 +- proto/metrics/v1/service.proto | 2 +- .../v1/adminv1connect/service.connect.go | 156 +-- proto/pb/admin/v1/service.pb.go | 594 ++++----- proto/pb/admin/v1/service_grpc.pb.go | 179 +-- .../info/v1/infov1connect/service.connect.go | 277 ++-- proto/pb/info/v1/service.pb.go | 1120 ++++++++--------- proto/pb/info/v1/service_grpc.pb.go | 268 ++-- .../v1/metricsv1connect/service.connect.go | 39 +- proto/pb/metrics/v1/service.pb.go | 93 +- proto/pb/metrics/v1/service_grpc.pb.go | 54 +- tests/{e2e => }/connect/connect_suite_test.go | 0 tests/{e2e => }/connect/info_test.go | 0 utils/resource/usage.go | 21 - vms/platformvm/signer/proof_of_possession.go | 6 +- vms/rpcchainvm/vm_test.go | 3 +- 24 files changed, 1541 insertions(+), 1715 deletions(-) rename tests/{e2e => }/connect/connect_suite_test.go (100%) rename tests/{e2e => }/connect/info_test.go (100%) diff --git a/api/admin/connecthandler/admin_connect.go b/api/admin/connecthandler/admin_connect.go index 462ee5996bd5..5696326df455 100644 --- a/api/admin/connecthandler/admin_connect.go +++ b/api/admin/connecthandler/admin_connect.go @@ -18,21 +18,19 @@ import ( adminv1 "github.com/ava-labs/avalanchego/proto/pb/admin/v1" ) -var _ adminv1connect.AdminServiceHandler = (*connectAdminService)(nil) +var _ adminv1connect.AdminServiceHandler = (*ConnectAdminService)(nil) -type connectAdminService struct { +type ConnectAdminService struct { admin *admin.Admin } // NewConnectAdminService returns a ConnectRPC handler for the Admin API -func NewConnectAdminService(admin *admin.Admin) adminv1connect.AdminServiceHandler { - return &connectAdminService{ - admin: admin, - } +func NewConnectAdminService(admin *admin.Admin) *ConnectAdminService { + return &ConnectAdminService{admin: admin} } // StartCPUProfiler starts a CPU profile writing to the specified file -func (c *connectAdminService) StartCPUProfiler( +func (c *ConnectAdminService) StartCPUProfiler( _ context.Context, _ *connect.Request[adminv1.StartCPUProfilerRequest], ) (*connect.Response[adminv1.StartCPUProfilerResponse], error) { @@ -44,7 +42,7 @@ func (c *connectAdminService) StartCPUProfiler( } // StopCPUProfiler stops the CPU profile -func (c *connectAdminService) StopCPUProfiler( +func (c *ConnectAdminService) StopCPUProfiler( _ context.Context, _ *connect.Request[adminv1.StopCPUProfilerRequest], ) (*connect.Response[adminv1.StopCPUProfilerResponse], error) { @@ -56,7 +54,7 @@ func (c *connectAdminService) StopCPUProfiler( } // MemoryProfile runs a memory profile writing to the specified file -func (c *connectAdminService) MemoryProfile( +func (c *ConnectAdminService) MemoryProfile( _ context.Context, _ *connect.Request[adminv1.MemoryProfileRequest], ) (*connect.Response[adminv1.MemoryProfileResponse], error) { @@ -68,7 +66,7 @@ func (c *connectAdminService) MemoryProfile( } // LockProfile runs a lock profile writing to the specified file -func (c *connectAdminService) LockProfile( +func (c *ConnectAdminService) LockProfile( _ context.Context, _ *connect.Request[adminv1.LockProfileRequest], ) (*connect.Response[adminv1.LockProfileResponse], error) { @@ -79,8 +77,8 @@ func (c *connectAdminService) LockProfile( return connect.NewResponse(&adminv1.LockProfileResponse{}), nil } -// Alias attempts to alias an HTTP endpoint to a new name -func (c *connectAdminService) Alias( +// Alias attempts to alias an endpoint to a new name +func (c *ConnectAdminService) Alias( _ context.Context, request *connect.Request[adminv1.AliasRequest], ) (*connect.Response[adminv1.AliasResponse], error) { @@ -97,7 +95,7 @@ func (c *connectAdminService) Alias( } // AliasChain attempts to alias a chain to a new name -func (c *connectAdminService) AliasChain( +func (c *ConnectAdminService) AliasChain( _ context.Context, request *connect.Request[adminv1.AliasChainRequest], ) (*connect.Response[adminv1.AliasChainResponse], error) { @@ -113,11 +111,11 @@ func (c *connectAdminService) AliasChain( return connect.NewResponse(&adminv1.AliasChainResponse{}), nil } -// GetChainAliases returns the aliases of the chain -func (c *connectAdminService) GetChainAliases( +// ChainAliases returns the aliases of the chain +func (c *ConnectAdminService) ChainAliases( _ context.Context, - request *connect.Request[adminv1.GetChainAliasesRequest], -) (*connect.Response[adminv1.GetChainAliasesResponse], error) { + request *connect.Request[adminv1.ChainAliasesRequest], +) (*connect.Response[adminv1.ChainAliasesResponse], error) { jsonRequest := &admin.GetChainAliasesArgs{ Chain: request.Msg.Chain, } @@ -127,7 +125,7 @@ func (c *connectAdminService) GetChainAliases( return nil, err } - response := &adminv1.GetChainAliasesResponse{ + response := &adminv1.ChainAliasesResponse{ Aliases: jsonResponse.Aliases, } @@ -135,7 +133,7 @@ func (c *connectAdminService) GetChainAliases( } // Stacktrace returns the current global stacktrace -func (c *connectAdminService) Stacktrace( +func (c *ConnectAdminService) Stacktrace( _ context.Context, _ *connect.Request[adminv1.StacktraceRequest], ) (*connect.Response[adminv1.StacktraceResponse], error) { @@ -147,7 +145,7 @@ func (c *connectAdminService) Stacktrace( } // SetLoggerLevel sets the log level and/or display level for loggers -func (c *connectAdminService) SetLoggerLevel( +func (c *ConnectAdminService) SetLoggerLevel( _ context.Context, request *connect.Request[adminv1.SetLoggerLevelRequest], ) (*connect.Response[adminv1.SetLoggerLevelResponse], error) { @@ -190,11 +188,11 @@ func (c *connectAdminService) SetLoggerLevel( }), nil } -// GetLoggerLevel returns the log level and display level of all loggers -func (c *connectAdminService) GetLoggerLevel( +// LoggerLevel returns the log level and display level of loggers +func (c *ConnectAdminService) LoggerLevel( _ context.Context, - request *connect.Request[adminv1.GetLoggerLevelRequest], -) (*connect.Response[adminv1.GetLoggerLevelResponse], error) { + request *connect.Request[adminv1.LoggerLevelRequest], +) (*connect.Response[adminv1.LoggerLevelResponse], error) { jsonRequest := &admin.GetLoggerLevelArgs{ LoggerName: request.Msg.LoggerName, } @@ -213,16 +211,16 @@ func (c *connectAdminService) GetLoggerLevel( } } - return connect.NewResponse(&adminv1.GetLoggerLevelResponse{ + return connect.NewResponse(&adminv1.LoggerLevelResponse{ LoggerLevels: protoLoggerLevels, }), nil } -// GetConfig returns the config that the node was started with -func (c *connectAdminService) GetConfig( +// Config returns the config that the node was started with +func (c *ConnectAdminService) Config( _ context.Context, - _ *connect.Request[adminv1.GetConfigRequest], -) (*connect.Response[adminv1.GetConfigResponse], error) { + _ *connect.Request[adminv1.ConfigRequest], +) (*connect.Response[adminv1.ConfigResponse], error) { var jsonResponse interface{} if err := c.admin.GetConfig(nil, nil, &jsonResponse); err != nil { return nil, err @@ -234,18 +232,18 @@ func (c *connectAdminService) GetConfig( return nil, err } - response := &adminv1.GetConfigResponse{ + response := &adminv1.ConfigResponse{ ConfigJson: string(configJSON), } return connect.NewResponse(response), nil } -// DBGet returns the value of a database entry -func (c *connectAdminService) DBGet( +// DB returns the value of a database entry +func (c *ConnectAdminService) DB( _ context.Context, - request *connect.Request[adminv1.DBGetRequest], -) (*connect.Response[adminv1.DBGetResponse], error) { + request *connect.Request[adminv1.DBRequest], +) (*connect.Response[adminv1.DBResponse], error) { jsonRequest := &admin.DBGetArgs{ Key: request.Msg.Key, } @@ -255,7 +253,7 @@ func (c *connectAdminService) DBGet( return nil, err } - response := &adminv1.DBGetResponse{ + response := &adminv1.DBResponse{ Value: jsonResponse.Value, ErrorCode: adminv1.ErrorCode(jsonResponse.ErrorCode), } diff --git a/api/health/connecthandler/health_connect.go b/api/health/connecthandler/health_connect.go index 785e0a580c1c..310e030dd412 100644 --- a/api/health/connecthandler/health_connect.go +++ b/api/health/connecthandler/health_connect.go @@ -17,24 +17,22 @@ import ( healthv1 "github.com/ava-labs/avalanchego/proto/pb/health/v1" ) -var _ healthv1connect.HealthServiceHandler = (*connectHealthService)(nil) +var _ healthv1connect.HealthServiceHandler = (*ConnectHealthService)(nil) -type connectHealthService struct { - service health.Health +type ConnectHealthService struct { + health health.Health } // NewConnectHealthService returns a ConnectRPC handler for the Health API -func NewConnectHealthService(healthService health.Health) healthv1connect.HealthServiceHandler { - return &connectHealthService{ - service: healthService, - } +func NewConnectHealthService(health health.Health) *ConnectHealthService { + return &ConnectHealthService{health: health} } -func (c *connectHealthService) Readiness( +func (c *ConnectHealthService) Readiness( _ context.Context, request *connect.Request[healthv1.ReadinessRequest], ) (*connect.Response[healthv1.ReadinessResponse], error) { - checks, healthy := c.service.Readiness(request.Msg.Tags...) + checks, healthy := c.health.Readiness(request.Msg.Tags...) checksProto := convertResults(checks) @@ -46,11 +44,11 @@ func (c *connectHealthService) Readiness( return connect.NewResponse(out), nil } -func (c *connectHealthService) Health( +func (c *ConnectHealthService) Health( _ context.Context, request *connect.Request[healthv1.HealthRequest], ) (*connect.Response[healthv1.HealthResponse], error) { - checks, healthy := c.service.Health(request.Msg.Tags...) + checks, healthy := c.health.Health(request.Msg.Tags...) checksProto := convertResults(checks) @@ -62,11 +60,11 @@ func (c *connectHealthService) Health( return connect.NewResponse(out), nil } -func (c *connectHealthService) Liveness( +func (c *ConnectHealthService) Liveness( _ context.Context, request *connect.Request[healthv1.LivenessRequest], ) (*connect.Response[healthv1.LivenessResponse], error) { - checks, healthy := c.service.Liveness(request.Msg.Tags...) + checks, healthy := c.health.Liveness(request.Msg.Tags...) checksProto := convertResults(checks) diff --git a/api/info/connecthandler/info_connect.go b/api/info/connecthandler/info_connect.go index 7d813f714379..49eb5486a4cd 100644 --- a/api/info/connecthandler/info_connect.go +++ b/api/info/connecthandler/info_connect.go @@ -5,7 +5,7 @@ package connecthandler import ( "context" - "fmt" + "encoding/json" "time" "connectrpc.com/connect" @@ -16,30 +16,27 @@ import ( "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" "github.com/ava-labs/avalanchego/upgrade" - v1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" + infov1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" ) -var _ infov1connect.InfoServiceHandler = (*connectInfoService)(nil) +var _ infov1connect.InfoServiceHandler = (*ConnectInfoService)(nil) -type connectInfoService struct { - *info.Info +type ConnectInfoService struct { + info *info.Info } -// NewConnectInfoService returns a ConnectRPC handler for the Info API -func NewConnectInfoService(info *info.Info) infov1connect.InfoServiceHandler { - return &connectInfoService{ - Info: info, - } +// NewConnectInfoService returns a pointer to a ConnectRPC handler for the Info API +func NewConnectInfoService(info *info.Info) *ConnectInfoService { + return &ConnectInfoService{info: info} } -// GetNodeVersion returns the semantic version, database version, RPC protocol version, -// Git commit hash, and the list of VM versions this node is running -func (c *connectInfoService) GetNodeVersion( +// NodeVersion returns version this node is running +func (c *ConnectInfoService) NodeVersion( _ context.Context, - _ *connect.Request[v1.GetNodeVersionRequest], -) (*connect.Response[v1.GetNodeVersionResponse], error) { + _ *connect.Request[infov1.NodeVersionRequest], +) (*connect.Response[infov1.NodeVersionResponse], error) { var jsonResponse info.GetNodeVersionReply - if err := c.Info.GetNodeVersion(nil, nil, &jsonResponse); err != nil { + if err := c.info.GetNodeVersion(nil, nil, &jsonResponse); err != nil { return nil, err } @@ -49,7 +46,7 @@ func (c *connectInfoService) GetNodeVersion( vmVersions[id] = version } - response := &v1.GetNodeVersionResponse{ + response := &infov1.NodeVersionResponse{ Version: jsonResponse.Version, DatabaseVersion: jsonResponse.DatabaseVersion, RpcProtocolVersion: uint32(jsonResponse.RPCProtocolVersion), @@ -60,115 +57,123 @@ func (c *connectInfoService) GetNodeVersion( return connect.NewResponse(response), nil } -// GetNodeID returns this node's unique identifier and proof-of-possession bytes -func (c *connectInfoService) GetNodeID( +// NodeID returns the node ID of this node +func (c *ConnectInfoService) NodeID( _ context.Context, - _ *connect.Request[v1.GetNodeIDRequest], -) (*connect.Response[v1.GetNodeIDResponse], error) { + _ *connect.Request[infov1.NodeIDRequest], +) (*connect.Response[infov1.NodeIDResponse], error) { var jsonResponse info.GetNodeIDReply - if err := c.Info.GetNodeID(nil, nil, &jsonResponse); err != nil { + if err := c.info.GetNodeID(nil, nil, &jsonResponse); err != nil { return nil, err } - nodePOP := []byte{} - if jsonResponse.NodePOP != nil { - p := jsonResponse.NodePOP - nodePOP = make([]byte, len(p.PublicKey)+len(p.ProofOfPossession)) - copy(nodePOP[0:len(p.PublicKey)], p.PublicKey[:]) - copy(nodePOP[len(p.PublicKey):], p.ProofOfPossession[:]) + // Convert raw PoP bytes into hex strings + pop := jsonResponse.NodePOP + if err := pop.Verify(); err != nil { + return nil, err + } + rawPopJSON, err := pop.MarshalJSON() + if err != nil { + return nil, err + } + var popMessage infov1.ProofOfPossession + if err := json.Unmarshal(rawPopJSON, &popMessage); err != nil { + return nil, err } - response := &v1.GetNodeIDResponse{ - NodeId: jsonResponse.NodeID.String(), - NodePop: nodePOP, + response := &infov1.NodeIDResponse{ + NodeId: jsonResponse.NodeID.String(), + NodePop: &infov1.ProofOfPossession{ + PublicKey: popMessage.PublicKey, + ProofOfPossession: popMessage.ProofOfPossession, + }, } return connect.NewResponse(response), nil } -// GetNodeIP returns the primary IP address this node uses for P2P networking.\ -func (c *connectInfoService) GetNodeIP( +// NodeIP returns the IP address of this node +func (c *ConnectInfoService) NodeIP( _ context.Context, - _ *connect.Request[v1.GetNodeIPRequest], -) (*connect.Response[v1.GetNodeIPResponse], error) { + _ *connect.Request[infov1.NodeIPRequest], +) (*connect.Response[infov1.NodeIPResponse], error) { var jsonResponse info.GetNodeIPReply - if err := c.Info.GetNodeIP(nil, nil, &jsonResponse); err != nil { + if err := c.info.GetNodeIP(nil, nil, &jsonResponse); err != nil { return nil, err } - response := &v1.GetNodeIPResponse{ + response := &infov1.NodeIPResponse{ Ip: jsonResponse.IP.String(), } return connect.NewResponse(response), nil } -// GetNetworkID returns the numeric ID of the Avalanche network this node is connected to -func (c *connectInfoService) GetNetworkID( +// NetworkID returns the ID of the Avalanche network this node is connected to +func (c *ConnectInfoService) NetworkID( _ context.Context, - _ *connect.Request[v1.GetNetworkIDRequest], -) (*connect.Response[v1.GetNetworkIDResponse], error) { + _ *connect.Request[infov1.NetworkIDRequest], +) (*connect.Response[infov1.NetworkIDResponse], error) { var jsonResponse info.GetNetworkIDReply - if err := c.Info.GetNetworkID(nil, nil, &jsonResponse); err != nil { + if err := c.info.GetNetworkID(nil, nil, &jsonResponse); err != nil { return nil, err } - response := &v1.GetNetworkIDResponse{ + response := &infov1.NetworkIDResponse{ NetworkId: uint32(jsonResponse.NetworkID), } return connect.NewResponse(response), nil } -// GetNetworkName returns the name of the network -func (c *connectInfoService) GetNetworkName( +// NetworkName returns the name of the network +func (c *ConnectInfoService) NetworkName( _ context.Context, - _ *connect.Request[v1.GetNetworkNameRequest], -) (*connect.Response[v1.GetNetworkNameResponse], error) { + _ *connect.Request[infov1.NetworkNameRequest], +) (*connect.Response[infov1.NetworkNameResponse], error) { var jsonResponse info.GetNetworkNameReply - if err := c.Info.GetNetworkName(nil, nil, &jsonResponse); err != nil { + if err := c.info.GetNetworkName(nil, nil, &jsonResponse); err != nil { return nil, err } - response := &v1.GetNetworkNameResponse{ + response := &infov1.NetworkNameResponse{ NetworkName: jsonResponse.NetworkName, } return connect.NewResponse(response), nil } -// GetBlockchainID maps an ID string to its canonical chain ID -func (c *connectInfoService) GetBlockchainID( +// BlockchainID maps an ID string to its canonical chain ID +func (c *ConnectInfoService) BlockchainID( _ context.Context, - request *connect.Request[v1.GetBlockchainIDRequest], -) (*connect.Response[v1.GetBlockchainIDResponse], error) { + request *connect.Request[infov1.BlockchainIDRequest], +) (*connect.Response[infov1.BlockchainIDResponse], error) { jsonRequest := info.GetBlockchainIDArgs{ Alias: request.Msg.Alias, } var jsonResponse info.GetBlockchainIDReply - if err := c.Info.GetBlockchainID(nil, &jsonRequest, &jsonResponse); err != nil { + if err := c.info.GetBlockchainID(nil, &jsonRequest, &jsonResponse); err != nil { return nil, err } - response := &v1.GetBlockchainIDResponse{ + response := &infov1.BlockchainIDResponse{ BlockchainId: jsonResponse.BlockchainID.String(), } return connect.NewResponse(response), nil } -// Peers returns metadata (IP, nodeID, version, uptimes, subnets, etc.) for the given peer node IDs -func (c *connectInfoService) Peers( +// Peers returns metadata for the given peer node IDs +func (c *ConnectInfoService) Peers( _ context.Context, - request *connect.Request[v1.PeersRequest], -) (*connect.Response[v1.PeersResponse], error) { + request *connect.Request[infov1.PeersRequest], +) (*connect.Response[infov1.PeersResponse], error) { nodeIDs := make([]ids.NodeID, 0, len(request.Msg.NodeIds)) for _, nodeIDStr := range request.Msg.NodeIds { nodeID, err := ids.NodeIDFromString(nodeIDStr) if err != nil { - return nil, connect.NewError( - connect.CodeInvalidArgument, fmt.Errorf("invalid nodeID %s: %w", nodeIDStr, err)) + return nil, err } nodeIDs = append(nodeIDs, nodeID) } @@ -178,11 +183,11 @@ func (c *connectInfoService) Peers( } var jsonResponse info.PeersReply - if err := c.Info.Peers(nil, &jsonRequest, &jsonResponse); err != nil { + if err := c.info.Peers(nil, &jsonRequest, &jsonResponse); err != nil { return nil, err } - peers := make([]*v1.PeerInfo, 0, len(jsonResponse.Peers)) + peers := make([]*infov1.PeerInfo, 0, len(jsonResponse.Peers)) for _, peer := range jsonResponse.Peers { // Convert TrackedSubnets (set.Set[ids.ID]) to []string trackedSubnetsIDs := peer.TrackedSubnets.List() @@ -194,7 +199,7 @@ func (c *connectInfoService) Peers( benched := make([]string, len(peer.Benched)) copy(benched, peer.Benched) - peers = append(peers, &v1.PeerInfo{ + peers = append(peers, &infov1.PeerInfo{ Ip: peer.IP.String(), PublicIp: peer.PublicIP.String(), NodeId: peer.ID.String(), @@ -207,7 +212,7 @@ func (c *connectInfoService) Peers( }) } - response := &v1.PeersResponse{ + response := &infov1.PeersResponse{ NumPeers: uint32(jsonResponse.NumPeers), Peers: peers, } @@ -221,38 +226,38 @@ func formatTime(t time.Time) string { } // IsBootstrapped returns whether the named chain has finished its bootstrap process on this node -func (c *connectInfoService) IsBootstrapped( +func (c *ConnectInfoService) IsBootstrapped( _ context.Context, - request *connect.Request[v1.IsBootstrappedRequest], -) (*connect.Response[v1.IsBootstrappedResponse], error) { + request *connect.Request[infov1.IsBootstrappedRequest], +) (*connect.Response[infov1.IsBootstrappedResponse], error) { // Use the chain from the request jsonRequest := info.IsBootstrappedArgs{ Chain: request.Msg.Chain, } var jsonResponse info.IsBootstrappedResponse - if err := c.Info.IsBootstrapped(nil, &jsonRequest, &jsonResponse); err != nil { + if err := c.info.IsBootstrapped(nil, &jsonRequest, &jsonResponse); err != nil { return nil, err } - response := &v1.IsBootstrappedResponse{ + response := &infov1.IsBootstrappedResponse{ IsBootstrapped: jsonResponse.IsBootstrapped, } return connect.NewResponse(response), nil } -// Upgrades returns all the scheduled upgrade activation times and parameters for this node -func (c *connectInfoService) Upgrades( +// Upgrades returns info about all scheduled upgrades for this node +func (c *ConnectInfoService) Upgrades( _ context.Context, - _ *connect.Request[v1.UpgradesRequest], -) (*connect.Response[v1.UpgradesResponse], error) { + _ *connect.Request[infov1.UpgradesRequest], +) (*connect.Response[infov1.UpgradesResponse], error) { var config upgrade.Config - if err := c.Info.Upgrades(nil, nil, &config); err != nil { + if err := c.info.Upgrades(nil, nil, &config); err != nil { return nil, err } - response := &v1.UpgradesResponse{ + response := &infov1.UpgradesResponse{ ApricotPhase1Time: timestamppb.New(config.ApricotPhase1Time), ApricotPhase2Time: timestamppb.New(config.ApricotPhase2Time), ApricotPhase3Time: timestamppb.New(config.ApricotPhase3Time), @@ -274,17 +279,17 @@ func (c *connectInfoService) Upgrades( return connect.NewResponse(response), nil } -// Uptime returns this node's uptime metrics (rewarding stake %, weighted average %, etc.) -func (c *connectInfoService) Uptime( +// Uptime returns this node's uptime metrics +func (c *ConnectInfoService) Uptime( _ context.Context, - _ *connect.Request[v1.UptimeRequest], -) (*connect.Response[v1.UptimeResponse], error) { + _ *connect.Request[infov1.UptimeRequest], +) (*connect.Response[infov1.UptimeResponse], error) { var jsonResponse info.UptimeResponse - if err := c.Info.Uptime(nil, nil, &jsonResponse); err != nil { + if err := c.info.Uptime(nil, nil, &jsonResponse); err != nil { return nil, err } - response := &v1.UptimeResponse{ + response := &infov1.UptimeResponse{ RewardingStakePercentage: float64(jsonResponse.RewardingStakePercentage), WeightedAveragePercentage: float64(jsonResponse.WeightedAveragePercentage), } @@ -292,20 +297,20 @@ func (c *connectInfoService) Uptime( return connect.NewResponse(response), nil } -// GetVMs returns a map of VM IDs to their known aliases, plus FXs information -func (c *connectInfoService) GetVMs( +// VMs returns a map of VM IDs to their known aliases +func (c *ConnectInfoService) VMs( _ context.Context, - _ *connect.Request[v1.GetVMsRequest], -) (*connect.Response[v1.GetVMsResponse], error) { + _ *connect.Request[infov1.VMsRequest], +) (*connect.Response[infov1.VMsResponse], error) { var jsonResponse info.GetVMsReply - if err := c.Info.GetVMs(nil, nil, &jsonResponse); err != nil { + if err := c.info.GetVMs(nil, nil, &jsonResponse); err != nil { return nil, err } // Convert the VM map from JSON-RPC format to protobuf format - vms := make(map[string]*v1.VMAliases) + vms := make(map[string]*infov1.VMAliases) for vmID, aliases := range jsonResponse.VMs { - vms[vmID.String()] = &v1.VMAliases{ + vms[vmID.String()] = &infov1.VMAliases{ Aliases: aliases, } } @@ -316,7 +321,7 @@ func (c *connectInfoService) GetVMs( fxs[fxID.String()] = name } - response := &v1.GetVMsResponse{ + response := &infov1.VMsResponse{ Vms: vms, Fxs: fxs, } diff --git a/api/metrics/connecthandler/metrics_connect.go b/api/metrics/connecthandler/metrics_connect.go index 99b823c80d72..cc3807fb5b6a 100644 --- a/api/metrics/connecthandler/metrics_connect.go +++ b/api/metrics/connecthandler/metrics_connect.go @@ -15,23 +15,21 @@ import ( dto "github.com/prometheus/client_model/go" ) -var _ metricsv1connect.MetricsServiceHandler = (*connectMetricsService)(nil) +var _ metricsv1connect.MetricsServiceHandler = (*ConnectMetricsService)(nil) -type connectMetricsService struct { - service prometheus.Gatherer +type ConnectMetricsService struct { + metrics prometheus.Gatherer } -func NewConnectMetricsService(service prometheus.Gatherer) metricsv1connect.MetricsServiceHandler { - return &connectMetricsService{ - service: service, - } +func NewConnectMetricsService(metrics prometheus.Gatherer) *ConnectMetricsService { + return &ConnectMetricsService{metrics: metrics} } -func (c *connectMetricsService) GetMetrics( +func (c *ConnectMetricsService) Metrics( _ context.Context, _ *connect.Request[metricsv1.MetricsRequest], ) (*connect.Response[metricsv1.MetricsResponse], error) { - mfs, err := c.service.Gather() + mfs, err := c.metrics.Gather() if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } diff --git a/go.mod b/go.mod index bd045afad4a4..976e02961c10 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/ava-labs/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60 github.com/ava-labs/libevm v1.13.14-0.3.0.rc.1 github.com/btcsuite/btcd/btcutil v1.1.3 + github.com/bufbuild/connect-go v1.10.0 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 github.com/compose-spec/compose-go v1.20.2 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 @@ -36,8 +37,8 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/mr-tron/base58 v1.2.0 github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d - github.com/onsi/ginkgo/v2 v2.13.1 - github.com/onsi/gomega v1.29.0 + github.com/onsi/ginkgo/v2 v2.23.4 + github.com/onsi/gomega v1.36.3 github.com/pires/go-proxyproto v0.6.2 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/client_model v0.3.0 @@ -64,16 +65,16 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/crypto v0.36.0 golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e - golang.org/x/mod v0.22.0 + golang.org/x/mod v0.24.0 golang.org/x/net v0.38.0 golang.org/x/sync v0.12.0 golang.org/x/term v0.30.0 golang.org/x/time v0.3.0 - golang.org/x/tools v0.29.0 + golang.org/x/tools v0.31.0 gonum.org/v1/gonum v0.11.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed google.golang.org/grpc v1.66.0 - google.golang.org/protobuf v1.35.2 + google.golang.org/protobuf v1.36.5 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.29.0 @@ -84,7 +85,9 @@ require ( require ( github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.7.0 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect ) require ( @@ -123,21 +126,20 @@ require ( github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect - github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect + github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect @@ -194,7 +196,7 @@ require ( go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sys v0.31.0 // indirect + golang.org/x/sys v0.32.0 // indirect golang.org/x/text v0.23.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index e0b7f2b3c8fa..523e4d48ac96 100644 --- a/go.sum +++ b/go.sum @@ -109,6 +109,8 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bufbuild/connect-go v1.10.0 h1:QAJ3G9A1OYQW2Jbk3DeoJbkCxuKArrvZgDt47mjdTbg= +github.com/bufbuild/connect-go v1.10.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -234,8 +236,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -251,8 +253,8 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= @@ -340,8 +342,9 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= @@ -522,16 +525,16 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.13.1 h1:LNGfMbR2OVGBfXjvRZIZ2YCTQdGKtPLvuI1rMCCj3OU= -github.com/onsi/ginkgo/v2 v2.13.1/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU= +github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -551,6 +554,8 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -614,7 +619,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf 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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -695,6 +699,8 @@ go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= 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/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= @@ -757,8 +763,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -897,8 +903,8 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 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.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= @@ -976,8 +982,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= +golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= 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= @@ -1085,8 +1091,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/node/node.go b/node/node.go index ea470c28d751..36bab0838c75 100644 --- a/node/node.go +++ b/node/node.go @@ -1301,7 +1301,7 @@ func (n *Node) initMetricsAPI() error { promhttp.HandlerOpts{}, ), "metrics", - "metrics", + "", ) } @@ -1351,7 +1351,7 @@ func (n *Node) initAdminAPI() error { return n.APIServer.AddRoute( service, "admin", - "admin", + "", ) } @@ -1432,7 +1432,7 @@ func (n *Node) initInfoAPI() error { return n.APIServer.AddRoute( service, "info", - "info", + "", ) } @@ -1547,7 +1547,7 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( handler, "health", - "health", + "", ) if err != nil { return err @@ -1555,8 +1555,8 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( health.NewGetHandler(n.health.Readiness), - "health/readiness", "health", + "readiness", ) if err != nil { return err @@ -1564,7 +1564,7 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( health.NewGetHandler(n.health.Health), - "health/health", + "health", "health", ) if err != nil { @@ -1573,8 +1573,8 @@ func (n *Node) initHealthAPI() error { return n.APIServer.AddRoute( health.NewGetHandler(n.health.Liveness), - "health/liveness", "health", + "liveness", ) } diff --git a/proto/admin/v1/service.proto b/proto/admin/v1/service.proto index 881e31cb8ec6..347feb2b18db 100644 --- a/proto/admin/v1/service.proto +++ b/proto/admin/v1/service.proto @@ -11,12 +11,12 @@ service AdminService { rpc LockProfile(LockProfileRequest) returns (LockProfileResponse); rpc Alias(AliasRequest) returns (AliasResponse); rpc AliasChain(AliasChainRequest) returns (AliasChainResponse); - rpc GetChainAliases(GetChainAliasesRequest) returns (GetChainAliasesResponse); + rpc ChainAliases(ChainAliasesRequest) returns (ChainAliasesResponse); rpc Stacktrace(StacktraceRequest) returns (StacktraceResponse); rpc SetLoggerLevel(SetLoggerLevelRequest) returns (SetLoggerLevelResponse); - rpc GetLoggerLevel(GetLoggerLevelRequest) returns (GetLoggerLevelResponse); - rpc GetConfig(GetConfigRequest) returns (GetConfigResponse); - rpc DBGet(DBGetRequest) returns (DBGetResponse); + rpc LoggerLevel(LoggerLevelRequest) returns (LoggerLevelResponse); + rpc Config(ConfigRequest) returns (ConfigResponse); + rpc DB(DBRequest) returns (DBResponse); } message StartCPUProfilerRequest {} @@ -43,10 +43,10 @@ message AliasChainRequest { } message AliasChainResponse {} -message GetChainAliasesRequest { +message ChainAliasesRequest { string chain = 1; } -message GetChainAliasesResponse { +message ChainAliasesResponse { repeated string aliases = 1; } @@ -62,22 +62,22 @@ message SetLoggerLevelResponse { map logger_levels = 1; } -message GetLoggerLevelRequest { +message LoggerLevelRequest { string logger_name = 1; } -message GetLoggerLevelResponse { +message LoggerLevelResponse { map logger_levels = 1; } -message GetConfigRequest {} -message GetConfigResponse { +message ConfigRequest {} +message ConfigResponse { string config_json = 1; } -message DBGetRequest { +message DBRequest { string key = 1; } -message DBGetResponse { +message DBResponse { string value = 1; ErrorCode error_code = 2; } diff --git a/proto/info/v1/service.proto b/proto/info/v1/service.proto index a726aac6b1ea..6e551458d35c 100644 --- a/proto/info/v1/service.proto +++ b/proto/info/v1/service.proto @@ -7,21 +7,21 @@ option go_package = "github.com/ava-labs/avalanchego/proto/pb/info/v1;infov1"; // InfoService is the API service for unprivileged info on a node service InfoService { - rpc GetNodeVersion(GetNodeVersionRequest) returns (GetNodeVersionResponse); - rpc GetNodeID(GetNodeIDRequest) returns (GetNodeIDResponse); - rpc GetNodeIP(GetNodeIPRequest) returns (GetNodeIPResponse); - rpc GetNetworkID(GetNetworkIDRequest) returns (GetNetworkIDResponse); - rpc GetNetworkName(GetNetworkNameRequest) returns (GetNetworkNameResponse); - rpc GetBlockchainID(GetBlockchainIDRequest) returns (GetBlockchainIDResponse); + rpc NodeVersion(NodeVersionRequest) returns (NodeVersionResponse); + rpc NodeID(NodeIDRequest) returns (NodeIDResponse); + rpc NodeIP(NodeIPRequest) returns (NodeIPResponse); + rpc NetworkID(NetworkIDRequest) returns (NetworkIDResponse); + rpc NetworkName(NetworkNameRequest) returns (NetworkNameResponse); + rpc BlockchainID(BlockchainIDRequest) returns (BlockchainIDResponse); rpc Peers(PeersRequest) returns (PeersResponse); rpc IsBootstrapped(IsBootstrappedRequest) returns (IsBootstrappedResponse); rpc Upgrades(UpgradesRequest) returns (UpgradesResponse); rpc Uptime(UptimeRequest) returns (UptimeResponse); - rpc GetVMs(GetVMsRequest) returns (GetVMsResponse); + rpc VMs(VMsRequest) returns (VMsResponse); } -message GetNodeVersionRequest {} -message GetNodeVersionResponse { +message NodeVersionRequest {} +message NodeVersionResponse { string version = 1; string database_version = 2; uint32 rpc_protocol_version = 3; @@ -29,38 +29,41 @@ message GetNodeVersionResponse { map vm_versions = 5; } -message GetNodeIDRequest {} -message GetNodeIDResponse { +message NodeIDRequest {} +message ProofOfPossession { + string publicKey = 1; + string proofOfPossession = 2; +} +message NodeIDResponse { string node_id = 1; - bytes node_pop = 2; + ProofOfPossession node_pop = 2; } -message GetNodeIPRequest {} -message GetNodeIPResponse { +message NodeIPRequest {} +message NodeIPResponse { string ip = 1; } -message GetNetworkIDRequest {} -message GetNetworkIDResponse { +message NetworkIDRequest {} +message NetworkIDResponse { uint32 network_id = 1; } -message GetNetworkNameRequest {} -message GetNetworkNameResponse { +message NetworkNameRequest {} +message NetworkNameResponse { string network_name = 1; } -message GetBlockchainIDRequest { +message BlockchainIDRequest { string alias = 1; } -message GetBlockchainIDResponse { +message BlockchainIDResponse { string blockchain_id = 1; } message PeersRequest { repeated string node_ids = 1; } - // PeerInfo provides metadata about a connected peer in the network message PeerInfo { string ip = 1; @@ -73,7 +76,6 @@ message PeerInfo { uint32 observed_uptime = 8; repeated string tracked_subnets = 9; } - message PeersResponse { uint32 num_peers = 1; repeated PeerInfo peers = 2; @@ -81,7 +83,6 @@ message PeersResponse { message IsBootstrappedRequest { // Alias of the chain - // Can also be the string representation of the chain's ID string chain = 1; } message IsBootstrappedResponse { @@ -115,8 +116,8 @@ message UptimeResponse { double weighted_average_percentage = 2; } -message GetVMsRequest {} -message GetVMsResponse { +message VMsRequest {} +message VMsResponse { map vms = 1; map fxs = 2; } diff --git a/proto/metrics/v1/service.proto b/proto/metrics/v1/service.proto index d2f771477297..902503fc6bf9 100644 --- a/proto/metrics/v1/service.proto +++ b/proto/metrics/v1/service.proto @@ -4,7 +4,7 @@ package metrics.v1; option go_package = "github.com/ava-labs/avalanchego/proto/pb/metrics/v1;metricsv1"; service MetricsService { - rpc GetMetrics(MetricsRequest) returns (MetricsResponse); + rpc Metrics(MetricsRequest) returns (MetricsResponse); } message MetricsRequest {} diff --git a/proto/pb/admin/v1/adminv1connect/service.connect.go b/proto/pb/admin/v1/adminv1connect/service.connect.go index b3501229c29e..506f0f30bcc1 100644 --- a/proto/pb/admin/v1/adminv1connect/service.connect.go +++ b/proto/pb/admin/v1/adminv1connect/service.connect.go @@ -52,21 +52,21 @@ const ( AdminServiceAliasProcedure = "/admin.v1.AdminService/Alias" // AdminServiceAliasChainProcedure is the fully-qualified name of the AdminService's AliasChain RPC. AdminServiceAliasChainProcedure = "/admin.v1.AdminService/AliasChain" - // AdminServiceGetChainAliasesProcedure is the fully-qualified name of the AdminService's - // GetChainAliases RPC. - AdminServiceGetChainAliasesProcedure = "/admin.v1.AdminService/GetChainAliases" + // AdminServiceChainAliasesProcedure is the fully-qualified name of the AdminService's ChainAliases + // RPC. + AdminServiceChainAliasesProcedure = "/admin.v1.AdminService/ChainAliases" // AdminServiceStacktraceProcedure is the fully-qualified name of the AdminService's Stacktrace RPC. AdminServiceStacktraceProcedure = "/admin.v1.AdminService/Stacktrace" // AdminServiceSetLoggerLevelProcedure is the fully-qualified name of the AdminService's // SetLoggerLevel RPC. AdminServiceSetLoggerLevelProcedure = "/admin.v1.AdminService/SetLoggerLevel" - // AdminServiceGetLoggerLevelProcedure is the fully-qualified name of the AdminService's - // GetLoggerLevel RPC. - AdminServiceGetLoggerLevelProcedure = "/admin.v1.AdminService/GetLoggerLevel" - // AdminServiceGetConfigProcedure is the fully-qualified name of the AdminService's GetConfig RPC. - AdminServiceGetConfigProcedure = "/admin.v1.AdminService/GetConfig" - // AdminServiceDBGetProcedure is the fully-qualified name of the AdminService's DBGet RPC. - AdminServiceDBGetProcedure = "/admin.v1.AdminService/DBGet" + // AdminServiceLoggerLevelProcedure is the fully-qualified name of the AdminService's LoggerLevel + // RPC. + AdminServiceLoggerLevelProcedure = "/admin.v1.AdminService/LoggerLevel" + // AdminServiceConfigProcedure is the fully-qualified name of the AdminService's Config RPC. + AdminServiceConfigProcedure = "/admin.v1.AdminService/Config" + // AdminServiceDBProcedure is the fully-qualified name of the AdminService's DB RPC. + AdminServiceDBProcedure = "/admin.v1.AdminService/DB" ) // AdminServiceClient is a client for the admin.v1.AdminService service. @@ -77,12 +77,12 @@ type AdminServiceClient interface { LockProfile(context.Context, *connect.Request[v1.LockProfileRequest]) (*connect.Response[v1.LockProfileResponse], error) Alias(context.Context, *connect.Request[v1.AliasRequest]) (*connect.Response[v1.AliasResponse], error) AliasChain(context.Context, *connect.Request[v1.AliasChainRequest]) (*connect.Response[v1.AliasChainResponse], error) - GetChainAliases(context.Context, *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) + ChainAliases(context.Context, *connect.Request[v1.ChainAliasesRequest]) (*connect.Response[v1.ChainAliasesResponse], error) Stacktrace(context.Context, *connect.Request[v1.StacktraceRequest]) (*connect.Response[v1.StacktraceResponse], error) SetLoggerLevel(context.Context, *connect.Request[v1.SetLoggerLevelRequest]) (*connect.Response[v1.SetLoggerLevelResponse], error) - GetLoggerLevel(context.Context, *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) - GetConfig(context.Context, *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) - DBGet(context.Context, *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) + LoggerLevel(context.Context, *connect.Request[v1.LoggerLevelRequest]) (*connect.Response[v1.LoggerLevelResponse], error) + Config(context.Context, *connect.Request[v1.ConfigRequest]) (*connect.Response[v1.ConfigResponse], error) + DB(context.Context, *connect.Request[v1.DBRequest]) (*connect.Response[v1.DBResponse], error) } // NewAdminServiceClient constructs a client for the admin.v1.AdminService service. By default, it @@ -132,10 +132,10 @@ func NewAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts . connect.WithSchema(adminServiceMethods.ByName("AliasChain")), connect.WithClientOptions(opts...), ), - getChainAliases: connect.NewClient[v1.GetChainAliasesRequest, v1.GetChainAliasesResponse]( + chainAliases: connect.NewClient[v1.ChainAliasesRequest, v1.ChainAliasesResponse]( httpClient, - baseURL+AdminServiceGetChainAliasesProcedure, - connect.WithSchema(adminServiceMethods.ByName("GetChainAliases")), + baseURL+AdminServiceChainAliasesProcedure, + connect.WithSchema(adminServiceMethods.ByName("ChainAliases")), connect.WithClientOptions(opts...), ), stacktrace: connect.NewClient[v1.StacktraceRequest, v1.StacktraceResponse]( @@ -150,22 +150,22 @@ func NewAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts . connect.WithSchema(adminServiceMethods.ByName("SetLoggerLevel")), connect.WithClientOptions(opts...), ), - getLoggerLevel: connect.NewClient[v1.GetLoggerLevelRequest, v1.GetLoggerLevelResponse]( + loggerLevel: connect.NewClient[v1.LoggerLevelRequest, v1.LoggerLevelResponse]( httpClient, - baseURL+AdminServiceGetLoggerLevelProcedure, - connect.WithSchema(adminServiceMethods.ByName("GetLoggerLevel")), + baseURL+AdminServiceLoggerLevelProcedure, + connect.WithSchema(adminServiceMethods.ByName("LoggerLevel")), connect.WithClientOptions(opts...), ), - getConfig: connect.NewClient[v1.GetConfigRequest, v1.GetConfigResponse]( + config: connect.NewClient[v1.ConfigRequest, v1.ConfigResponse]( httpClient, - baseURL+AdminServiceGetConfigProcedure, - connect.WithSchema(adminServiceMethods.ByName("GetConfig")), + baseURL+AdminServiceConfigProcedure, + connect.WithSchema(adminServiceMethods.ByName("Config")), connect.WithClientOptions(opts...), ), - dBGet: connect.NewClient[v1.DBGetRequest, v1.DBGetResponse]( + dB: connect.NewClient[v1.DBRequest, v1.DBResponse]( httpClient, - baseURL+AdminServiceDBGetProcedure, - connect.WithSchema(adminServiceMethods.ByName("DBGet")), + baseURL+AdminServiceDBProcedure, + connect.WithSchema(adminServiceMethods.ByName("DB")), connect.WithClientOptions(opts...), ), } @@ -179,12 +179,12 @@ type adminServiceClient struct { lockProfile *connect.Client[v1.LockProfileRequest, v1.LockProfileResponse] alias *connect.Client[v1.AliasRequest, v1.AliasResponse] aliasChain *connect.Client[v1.AliasChainRequest, v1.AliasChainResponse] - getChainAliases *connect.Client[v1.GetChainAliasesRequest, v1.GetChainAliasesResponse] + chainAliases *connect.Client[v1.ChainAliasesRequest, v1.ChainAliasesResponse] stacktrace *connect.Client[v1.StacktraceRequest, v1.StacktraceResponse] setLoggerLevel *connect.Client[v1.SetLoggerLevelRequest, v1.SetLoggerLevelResponse] - getLoggerLevel *connect.Client[v1.GetLoggerLevelRequest, v1.GetLoggerLevelResponse] - getConfig *connect.Client[v1.GetConfigRequest, v1.GetConfigResponse] - dBGet *connect.Client[v1.DBGetRequest, v1.DBGetResponse] + loggerLevel *connect.Client[v1.LoggerLevelRequest, v1.LoggerLevelResponse] + config *connect.Client[v1.ConfigRequest, v1.ConfigResponse] + dB *connect.Client[v1.DBRequest, v1.DBResponse] } // StartCPUProfiler calls admin.v1.AdminService.StartCPUProfiler. @@ -217,9 +217,9 @@ func (c *adminServiceClient) AliasChain(ctx context.Context, req *connect.Reques return c.aliasChain.CallUnary(ctx, req) } -// GetChainAliases calls admin.v1.AdminService.GetChainAliases. -func (c *adminServiceClient) GetChainAliases(ctx context.Context, req *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) { - return c.getChainAliases.CallUnary(ctx, req) +// ChainAliases calls admin.v1.AdminService.ChainAliases. +func (c *adminServiceClient) ChainAliases(ctx context.Context, req *connect.Request[v1.ChainAliasesRequest]) (*connect.Response[v1.ChainAliasesResponse], error) { + return c.chainAliases.CallUnary(ctx, req) } // Stacktrace calls admin.v1.AdminService.Stacktrace. @@ -232,19 +232,19 @@ func (c *adminServiceClient) SetLoggerLevel(ctx context.Context, req *connect.Re return c.setLoggerLevel.CallUnary(ctx, req) } -// GetLoggerLevel calls admin.v1.AdminService.GetLoggerLevel. -func (c *adminServiceClient) GetLoggerLevel(ctx context.Context, req *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) { - return c.getLoggerLevel.CallUnary(ctx, req) +// LoggerLevel calls admin.v1.AdminService.LoggerLevel. +func (c *adminServiceClient) LoggerLevel(ctx context.Context, req *connect.Request[v1.LoggerLevelRequest]) (*connect.Response[v1.LoggerLevelResponse], error) { + return c.loggerLevel.CallUnary(ctx, req) } -// GetConfig calls admin.v1.AdminService.GetConfig. -func (c *adminServiceClient) GetConfig(ctx context.Context, req *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) { - return c.getConfig.CallUnary(ctx, req) +// Config calls admin.v1.AdminService.Config. +func (c *adminServiceClient) Config(ctx context.Context, req *connect.Request[v1.ConfigRequest]) (*connect.Response[v1.ConfigResponse], error) { + return c.config.CallUnary(ctx, req) } -// DBGet calls admin.v1.AdminService.DBGet. -func (c *adminServiceClient) DBGet(ctx context.Context, req *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) { - return c.dBGet.CallUnary(ctx, req) +// DB calls admin.v1.AdminService.DB. +func (c *adminServiceClient) DB(ctx context.Context, req *connect.Request[v1.DBRequest]) (*connect.Response[v1.DBResponse], error) { + return c.dB.CallUnary(ctx, req) } // AdminServiceHandler is an implementation of the admin.v1.AdminService service. @@ -255,12 +255,12 @@ type AdminServiceHandler interface { LockProfile(context.Context, *connect.Request[v1.LockProfileRequest]) (*connect.Response[v1.LockProfileResponse], error) Alias(context.Context, *connect.Request[v1.AliasRequest]) (*connect.Response[v1.AliasResponse], error) AliasChain(context.Context, *connect.Request[v1.AliasChainRequest]) (*connect.Response[v1.AliasChainResponse], error) - GetChainAliases(context.Context, *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) + ChainAliases(context.Context, *connect.Request[v1.ChainAliasesRequest]) (*connect.Response[v1.ChainAliasesResponse], error) Stacktrace(context.Context, *connect.Request[v1.StacktraceRequest]) (*connect.Response[v1.StacktraceResponse], error) SetLoggerLevel(context.Context, *connect.Request[v1.SetLoggerLevelRequest]) (*connect.Response[v1.SetLoggerLevelResponse], error) - GetLoggerLevel(context.Context, *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) - GetConfig(context.Context, *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) - DBGet(context.Context, *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) + LoggerLevel(context.Context, *connect.Request[v1.LoggerLevelRequest]) (*connect.Response[v1.LoggerLevelResponse], error) + Config(context.Context, *connect.Request[v1.ConfigRequest]) (*connect.Response[v1.ConfigResponse], error) + DB(context.Context, *connect.Request[v1.DBRequest]) (*connect.Response[v1.DBResponse], error) } // NewAdminServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -306,10 +306,10 @@ func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOpti connect.WithSchema(adminServiceMethods.ByName("AliasChain")), connect.WithHandlerOptions(opts...), ) - adminServiceGetChainAliasesHandler := connect.NewUnaryHandler( - AdminServiceGetChainAliasesProcedure, - svc.GetChainAliases, - connect.WithSchema(adminServiceMethods.ByName("GetChainAliases")), + adminServiceChainAliasesHandler := connect.NewUnaryHandler( + AdminServiceChainAliasesProcedure, + svc.ChainAliases, + connect.WithSchema(adminServiceMethods.ByName("ChainAliases")), connect.WithHandlerOptions(opts...), ) adminServiceStacktraceHandler := connect.NewUnaryHandler( @@ -324,22 +324,22 @@ func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOpti connect.WithSchema(adminServiceMethods.ByName("SetLoggerLevel")), connect.WithHandlerOptions(opts...), ) - adminServiceGetLoggerLevelHandler := connect.NewUnaryHandler( - AdminServiceGetLoggerLevelProcedure, - svc.GetLoggerLevel, - connect.WithSchema(adminServiceMethods.ByName("GetLoggerLevel")), + adminServiceLoggerLevelHandler := connect.NewUnaryHandler( + AdminServiceLoggerLevelProcedure, + svc.LoggerLevel, + connect.WithSchema(adminServiceMethods.ByName("LoggerLevel")), connect.WithHandlerOptions(opts...), ) - adminServiceGetConfigHandler := connect.NewUnaryHandler( - AdminServiceGetConfigProcedure, - svc.GetConfig, - connect.WithSchema(adminServiceMethods.ByName("GetConfig")), + adminServiceConfigHandler := connect.NewUnaryHandler( + AdminServiceConfigProcedure, + svc.Config, + connect.WithSchema(adminServiceMethods.ByName("Config")), connect.WithHandlerOptions(opts...), ) - adminServiceDBGetHandler := connect.NewUnaryHandler( - AdminServiceDBGetProcedure, - svc.DBGet, - connect.WithSchema(adminServiceMethods.ByName("DBGet")), + adminServiceDBHandler := connect.NewUnaryHandler( + AdminServiceDBProcedure, + svc.DB, + connect.WithSchema(adminServiceMethods.ByName("DB")), connect.WithHandlerOptions(opts...), ) return "/admin.v1.AdminService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -356,18 +356,18 @@ func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOpti adminServiceAliasHandler.ServeHTTP(w, r) case AdminServiceAliasChainProcedure: adminServiceAliasChainHandler.ServeHTTP(w, r) - case AdminServiceGetChainAliasesProcedure: - adminServiceGetChainAliasesHandler.ServeHTTP(w, r) + case AdminServiceChainAliasesProcedure: + adminServiceChainAliasesHandler.ServeHTTP(w, r) case AdminServiceStacktraceProcedure: adminServiceStacktraceHandler.ServeHTTP(w, r) case AdminServiceSetLoggerLevelProcedure: adminServiceSetLoggerLevelHandler.ServeHTTP(w, r) - case AdminServiceGetLoggerLevelProcedure: - adminServiceGetLoggerLevelHandler.ServeHTTP(w, r) - case AdminServiceGetConfigProcedure: - adminServiceGetConfigHandler.ServeHTTP(w, r) - case AdminServiceDBGetProcedure: - adminServiceDBGetHandler.ServeHTTP(w, r) + case AdminServiceLoggerLevelProcedure: + adminServiceLoggerLevelHandler.ServeHTTP(w, r) + case AdminServiceConfigProcedure: + adminServiceConfigHandler.ServeHTTP(w, r) + case AdminServiceDBProcedure: + adminServiceDBHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -401,8 +401,8 @@ func (UnimplementedAdminServiceHandler) AliasChain(context.Context, *connect.Req return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.AliasChain is not implemented")) } -func (UnimplementedAdminServiceHandler) GetChainAliases(context.Context, *connect.Request[v1.GetChainAliasesRequest]) (*connect.Response[v1.GetChainAliasesResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.GetChainAliases is not implemented")) +func (UnimplementedAdminServiceHandler) ChainAliases(context.Context, *connect.Request[v1.ChainAliasesRequest]) (*connect.Response[v1.ChainAliasesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.ChainAliases is not implemented")) } func (UnimplementedAdminServiceHandler) Stacktrace(context.Context, *connect.Request[v1.StacktraceRequest]) (*connect.Response[v1.StacktraceResponse], error) { @@ -413,14 +413,14 @@ func (UnimplementedAdminServiceHandler) SetLoggerLevel(context.Context, *connect return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.SetLoggerLevel is not implemented")) } -func (UnimplementedAdminServiceHandler) GetLoggerLevel(context.Context, *connect.Request[v1.GetLoggerLevelRequest]) (*connect.Response[v1.GetLoggerLevelResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.GetLoggerLevel is not implemented")) +func (UnimplementedAdminServiceHandler) LoggerLevel(context.Context, *connect.Request[v1.LoggerLevelRequest]) (*connect.Response[v1.LoggerLevelResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.LoggerLevel is not implemented")) } -func (UnimplementedAdminServiceHandler) GetConfig(context.Context, *connect.Request[v1.GetConfigRequest]) (*connect.Response[v1.GetConfigResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.GetConfig is not implemented")) +func (UnimplementedAdminServiceHandler) Config(context.Context, *connect.Request[v1.ConfigRequest]) (*connect.Response[v1.ConfigResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.Config is not implemented")) } -func (UnimplementedAdminServiceHandler) DBGet(context.Context, *connect.Request[v1.DBGetRequest]) (*connect.Response[v1.DBGetResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.DBGet is not implemented")) +func (UnimplementedAdminServiceHandler) DB(context.Context, *connect.Request[v1.DBRequest]) (*connect.Response[v1.DBResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("admin.v1.AdminService.DB is not implemented")) } diff --git a/proto/pb/admin/v1/service.pb.go b/proto/pb/admin/v1/service.pb.go index 37c6e5af5805..3b2011307255 100644 --- a/proto/pb/admin/v1/service.pb.go +++ b/proto/pb/admin/v1/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc (unknown) +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: admin/v1/service.proto package adminv1 @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -70,9 +71,9 @@ func (ErrorCode) EnumDescriptor() ([]byte, []int) { } type StartCPUProfilerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StartCPUProfilerRequest) Reset() { @@ -106,9 +107,9 @@ func (*StartCPUProfilerRequest) Descriptor() ([]byte, []int) { } type StartCPUProfilerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StartCPUProfilerResponse) Reset() { @@ -142,9 +143,9 @@ func (*StartCPUProfilerResponse) Descriptor() ([]byte, []int) { } type StopCPUProfilerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StopCPUProfilerRequest) Reset() { @@ -178,9 +179,9 @@ func (*StopCPUProfilerRequest) Descriptor() ([]byte, []int) { } type StopCPUProfilerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StopCPUProfilerResponse) Reset() { @@ -214,9 +215,9 @@ func (*StopCPUProfilerResponse) Descriptor() ([]byte, []int) { } type MemoryProfileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MemoryProfileRequest) Reset() { @@ -250,9 +251,9 @@ func (*MemoryProfileRequest) Descriptor() ([]byte, []int) { } type MemoryProfileResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MemoryProfileResponse) Reset() { @@ -286,9 +287,9 @@ func (*MemoryProfileResponse) Descriptor() ([]byte, []int) { } type LockProfileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *LockProfileRequest) Reset() { @@ -322,9 +323,9 @@ func (*LockProfileRequest) Descriptor() ([]byte, []int) { } type LockProfileResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *LockProfileResponse) Reset() { @@ -358,12 +359,11 @@ func (*LockProfileResponse) Descriptor() ([]byte, []int) { } type AliasRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` unknownFields protoimpl.UnknownFields - - Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AliasRequest) Reset() { @@ -411,9 +411,9 @@ func (x *AliasRequest) GetAlias() string { } type AliasResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AliasResponse) Reset() { @@ -447,12 +447,11 @@ func (*AliasResponse) Descriptor() ([]byte, []int) { } type AliasChainRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` unknownFields protoimpl.UnknownFields - - Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AliasChainRequest) Reset() { @@ -500,9 +499,9 @@ func (x *AliasChainRequest) GetAlias() string { } type AliasChainResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AliasChainResponse) Reset() { @@ -535,28 +534,27 @@ func (*AliasChainResponse) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{11} } -type GetChainAliasesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type ChainAliasesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` unknownFields protoimpl.UnknownFields - - Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetChainAliasesRequest) Reset() { - *x = GetChainAliasesRequest{} +func (x *ChainAliasesRequest) Reset() { + *x = ChainAliasesRequest{} mi := &file_admin_v1_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetChainAliasesRequest) String() string { +func (x *ChainAliasesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetChainAliasesRequest) ProtoMessage() {} +func (*ChainAliasesRequest) ProtoMessage() {} -func (x *GetChainAliasesRequest) ProtoReflect() protoreflect.Message { +func (x *ChainAliasesRequest) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -568,40 +566,39 @@ func (x *GetChainAliasesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetChainAliasesRequest.ProtoReflect.Descriptor instead. -func (*GetChainAliasesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ChainAliasesRequest.ProtoReflect.Descriptor instead. +func (*ChainAliasesRequest) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{12} } -func (x *GetChainAliasesRequest) GetChain() string { +func (x *ChainAliasesRequest) GetChain() string { if x != nil { return x.Chain } return "" } -type GetChainAliasesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type ChainAliasesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` unknownFields protoimpl.UnknownFields - - Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetChainAliasesResponse) Reset() { - *x = GetChainAliasesResponse{} +func (x *ChainAliasesResponse) Reset() { + *x = ChainAliasesResponse{} mi := &file_admin_v1_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetChainAliasesResponse) String() string { +func (x *ChainAliasesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetChainAliasesResponse) ProtoMessage() {} +func (*ChainAliasesResponse) ProtoMessage() {} -func (x *GetChainAliasesResponse) ProtoReflect() protoreflect.Message { +func (x *ChainAliasesResponse) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -613,12 +610,12 @@ func (x *GetChainAliasesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetChainAliasesResponse.ProtoReflect.Descriptor instead. -func (*GetChainAliasesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ChainAliasesResponse.ProtoReflect.Descriptor instead. +func (*ChainAliasesResponse) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{13} } -func (x *GetChainAliasesResponse) GetAliases() []string { +func (x *ChainAliasesResponse) GetAliases() []string { if x != nil { return x.Aliases } @@ -626,9 +623,9 @@ func (x *GetChainAliasesResponse) GetAliases() []string { } type StacktraceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StacktraceRequest) Reset() { @@ -662,9 +659,9 @@ func (*StacktraceRequest) Descriptor() ([]byte, []int) { } type StacktraceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StacktraceResponse) Reset() { @@ -698,13 +695,12 @@ func (*StacktraceResponse) Descriptor() ([]byte, []int) { } type SetLoggerLevelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + LoggerName string `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"` + LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` + DisplayLevel string `protobuf:"bytes,3,opt,name=display_level,json=displayLevel,proto3" json:"display_level,omitempty"` unknownFields protoimpl.UnknownFields - - LoggerName string `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"` - LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` - DisplayLevel string `protobuf:"bytes,3,opt,name=display_level,json=displayLevel,proto3" json:"display_level,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetLoggerLevelRequest) Reset() { @@ -759,11 +755,10 @@ func (x *SetLoggerLevelRequest) GetDisplayLevel() string { } type SetLoggerLevelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + LoggerLevels map[string]*LogAndDisplayLevels `protobuf:"bytes,1,rep,name=logger_levels,json=loggerLevels,proto3" json:"logger_levels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - LoggerLevels map[string]*LogAndDisplayLevels `protobuf:"bytes,1,rep,name=logger_levels,json=loggerLevels,proto3" json:"logger_levels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *SetLoggerLevelResponse) Reset() { @@ -803,28 +798,27 @@ func (x *SetLoggerLevelResponse) GetLoggerLevels() map[string]*LogAndDisplayLeve return nil } -type GetLoggerLevelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type LoggerLevelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + LoggerName string `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"` unknownFields protoimpl.UnknownFields - - LoggerName string `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetLoggerLevelRequest) Reset() { - *x = GetLoggerLevelRequest{} +func (x *LoggerLevelRequest) Reset() { + *x = LoggerLevelRequest{} mi := &file_admin_v1_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetLoggerLevelRequest) String() string { +func (x *LoggerLevelRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetLoggerLevelRequest) ProtoMessage() {} +func (*LoggerLevelRequest) ProtoMessage() {} -func (x *GetLoggerLevelRequest) ProtoReflect() protoreflect.Message { +func (x *LoggerLevelRequest) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -836,40 +830,39 @@ func (x *GetLoggerLevelRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetLoggerLevelRequest.ProtoReflect.Descriptor instead. -func (*GetLoggerLevelRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use LoggerLevelRequest.ProtoReflect.Descriptor instead. +func (*LoggerLevelRequest) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{18} } -func (x *GetLoggerLevelRequest) GetLoggerName() string { +func (x *LoggerLevelRequest) GetLoggerName() string { if x != nil { return x.LoggerName } return "" } -type GetLoggerLevelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type LoggerLevelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + LoggerLevels map[string]*LogAndDisplayLevels `protobuf:"bytes,1,rep,name=logger_levels,json=loggerLevels,proto3" json:"logger_levels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - LoggerLevels map[string]*LogAndDisplayLevels `protobuf:"bytes,1,rep,name=logger_levels,json=loggerLevels,proto3" json:"logger_levels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } -func (x *GetLoggerLevelResponse) Reset() { - *x = GetLoggerLevelResponse{} +func (x *LoggerLevelResponse) Reset() { + *x = LoggerLevelResponse{} mi := &file_admin_v1_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetLoggerLevelResponse) String() string { +func (x *LoggerLevelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetLoggerLevelResponse) ProtoMessage() {} +func (*LoggerLevelResponse) ProtoMessage() {} -func (x *GetLoggerLevelResponse) ProtoReflect() protoreflect.Message { +func (x *LoggerLevelResponse) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -881,38 +874,38 @@ func (x *GetLoggerLevelResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetLoggerLevelResponse.ProtoReflect.Descriptor instead. -func (*GetLoggerLevelResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use LoggerLevelResponse.ProtoReflect.Descriptor instead. +func (*LoggerLevelResponse) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{19} } -func (x *GetLoggerLevelResponse) GetLoggerLevels() map[string]*LogAndDisplayLevels { +func (x *LoggerLevelResponse) GetLoggerLevels() map[string]*LogAndDisplayLevels { if x != nil { return x.LoggerLevels } return nil } -type GetConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type ConfigRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetConfigRequest) Reset() { - *x = GetConfigRequest{} +func (x *ConfigRequest) Reset() { + *x = ConfigRequest{} mi := &file_admin_v1_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetConfigRequest) String() string { +func (x *ConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetConfigRequest) ProtoMessage() {} +func (*ConfigRequest) ProtoMessage() {} -func (x *GetConfigRequest) ProtoReflect() protoreflect.Message { +func (x *ConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -924,33 +917,32 @@ func (x *GetConfigRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetConfigRequest.ProtoReflect.Descriptor instead. -func (*GetConfigRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead. +func (*ConfigRequest) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{20} } -type GetConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type ConfigResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ConfigJson string `protobuf:"bytes,1,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"` unknownFields protoimpl.UnknownFields - - ConfigJson string `protobuf:"bytes,1,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetConfigResponse) Reset() { - *x = GetConfigResponse{} +func (x *ConfigResponse) Reset() { + *x = ConfigResponse{} mi := &file_admin_v1_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetConfigResponse) String() string { +func (x *ConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetConfigResponse) ProtoMessage() {} +func (*ConfigResponse) ProtoMessage() {} -func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { +func (x *ConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -962,40 +954,39 @@ func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead. -func (*GetConfigResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ConfigResponse.ProtoReflect.Descriptor instead. +func (*ConfigResponse) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{21} } -func (x *GetConfigResponse) GetConfigJson() string { +func (x *ConfigResponse) GetConfigJson() string { if x != nil { return x.ConfigJson } return "" } -type DBGetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type DBRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *DBGetRequest) Reset() { - *x = DBGetRequest{} +func (x *DBRequest) Reset() { + *x = DBRequest{} mi := &file_admin_v1_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *DBGetRequest) String() string { +func (x *DBRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DBGetRequest) ProtoMessage() {} +func (*DBRequest) ProtoMessage() {} -func (x *DBGetRequest) ProtoReflect() protoreflect.Message { +func (x *DBRequest) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1007,41 +998,40 @@ func (x *DBGetRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DBGetRequest.ProtoReflect.Descriptor instead. -func (*DBGetRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DBRequest.ProtoReflect.Descriptor instead. +func (*DBRequest) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{22} } -func (x *DBGetRequest) GetKey() string { +func (x *DBRequest) GetKey() string { if x != nil { return x.Key } return "" } -type DBGetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type DBResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + ErrorCode ErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=admin.v1.ErrorCode" json:"error_code,omitempty"` unknownFields protoimpl.UnknownFields - - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - ErrorCode ErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=admin.v1.ErrorCode" json:"error_code,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *DBGetResponse) Reset() { - *x = DBGetResponse{} +func (x *DBResponse) Reset() { + *x = DBResponse{} mi := &file_admin_v1_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *DBGetResponse) String() string { +func (x *DBResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DBGetResponse) ProtoMessage() {} +func (*DBResponse) ProtoMessage() {} -func (x *DBGetResponse) ProtoReflect() protoreflect.Message { +func (x *DBResponse) ProtoReflect() protoreflect.Message { mi := &file_admin_v1_service_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1053,19 +1043,19 @@ func (x *DBGetResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DBGetResponse.ProtoReflect.Descriptor instead. -func (*DBGetResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use DBResponse.ProtoReflect.Descriptor instead. +func (*DBResponse) Descriptor() ([]byte, []int) { return file_admin_v1_service_proto_rawDescGZIP(), []int{23} } -func (x *DBGetResponse) GetValue() string { +func (x *DBResponse) GetValue() string { if x != nil { return x.Value } return "" } -func (x *DBGetResponse) GetErrorCode() ErrorCode { +func (x *DBResponse) GetErrorCode() ErrorCode { if x != nil { return x.ErrorCode } @@ -1073,12 +1063,11 @@ func (x *DBGetResponse) GetErrorCode() ErrorCode { } type LogAndDisplayLevels struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + LogLevel string `protobuf:"bytes,1,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` + DisplayLevel string `protobuf:"bytes,2,opt,name=display_level,json=displayLevel,proto3" json:"display_level,omitempty"` unknownFields protoimpl.UnknownFields - - LogLevel string `protobuf:"bytes,1,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` - DisplayLevel string `protobuf:"bytes,2,opt,name=display_level,json=displayLevel,proto3" json:"display_level,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LogAndDisplayLevels) Reset() { @@ -1126,11 +1115,10 @@ func (x *LogAndDisplayLevels) GetDisplayLevel() string { } type VMAliases struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` unknownFields protoimpl.UnknownFields - - Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` + sizeCache protoimpl.SizeCache } func (x *VMAliases) Reset() { @@ -1172,180 +1160,93 @@ func (x *VMAliases) GetAliases() []string { var File_admin_v1_service_proto protoreflect.FileDescriptor -var file_admin_v1_service_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x31, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1a, 0x0a, - 0x18, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x6f, - 0x70, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x50, 0x55, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, - 0x0a, 0x14, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x14, 0x0a, 0x12, 0x4c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x0c, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x0f, - 0x0a, 0x0d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x3f, 0x0a, 0x11, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x22, 0x14, 0x0a, 0x12, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x53, - 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x14, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7a, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, - 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x23, 0x0a, - 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, - 0x0d, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x1a, 0x5e, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x41, 0x6e, 0x64, 0x44, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, - 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0d, 0x6c, - 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x73, 0x1a, 0x5e, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0x20, - 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x22, 0x59, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x57, 0x0a, 0x13, 0x4c, - 0x6f, 0x67, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x22, 0x25, 0x0a, 0x09, 0x56, 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x2a, 0x60, 0x0a, 0x09, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, - 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x1d, - 0x0a, 0x19, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, - 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xad, 0x07, - 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, - 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x72, 0x12, 0x21, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0f, 0x53, 0x74, 0x6f, - 0x70, 0x43, 0x50, 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x50, 0x55, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x50, - 0x55, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, - 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x38, 0x0a, 0x05, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x53, 0x74, - 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x44, 0x42, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x42, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3b, 0x5a, - 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, - 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, - 0x76, 0x31, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} +const file_admin_v1_service_proto_rawDesc = "" + + "\n" + + "\x16admin/v1/service.proto\x12\badmin.v1\"\x19\n" + + "\x17StartCPUProfilerRequest\"\x1a\n" + + "\x18StartCPUProfilerResponse\"\x18\n" + + "\x16StopCPUProfilerRequest\"\x19\n" + + "\x17StopCPUProfilerResponse\"\x16\n" + + "\x14MemoryProfileRequest\"\x17\n" + + "\x15MemoryProfileResponse\"\x14\n" + + "\x12LockProfileRequest\"\x15\n" + + "\x13LockProfileResponse\"@\n" + + "\fAliasRequest\x12\x1a\n" + + "\bendpoint\x18\x01 \x01(\tR\bendpoint\x12\x14\n" + + "\x05alias\x18\x02 \x01(\tR\x05alias\"\x0f\n" + + "\rAliasResponse\"?\n" + + "\x11AliasChainRequest\x12\x14\n" + + "\x05chain\x18\x01 \x01(\tR\x05chain\x12\x14\n" + + "\x05alias\x18\x02 \x01(\tR\x05alias\"\x14\n" + + "\x12AliasChainResponse\"+\n" + + "\x13ChainAliasesRequest\x12\x14\n" + + "\x05chain\x18\x01 \x01(\tR\x05chain\"0\n" + + "\x14ChainAliasesResponse\x12\x18\n" + + "\aaliases\x18\x01 \x03(\tR\aaliases\"\x13\n" + + "\x11StacktraceRequest\"\x14\n" + + "\x12StacktraceResponse\"z\n" + + "\x15SetLoggerLevelRequest\x12\x1f\n" + + "\vlogger_name\x18\x01 \x01(\tR\n" + + "loggerName\x12\x1b\n" + + "\tlog_level\x18\x02 \x01(\tR\blogLevel\x12#\n" + + "\rdisplay_level\x18\x03 \x01(\tR\fdisplayLevel\"\xd1\x01\n" + + "\x16SetLoggerLevelResponse\x12W\n" + + "\rlogger_levels\x18\x01 \x03(\v22.admin.v1.SetLoggerLevelResponse.LoggerLevelsEntryR\floggerLevels\x1a^\n" + + "\x11LoggerLevelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x123\n" + + "\x05value\x18\x02 \x01(\v2\x1d.admin.v1.LogAndDisplayLevelsR\x05value:\x028\x01\"5\n" + + "\x12LoggerLevelRequest\x12\x1f\n" + + "\vlogger_name\x18\x01 \x01(\tR\n" + + "loggerName\"\xcb\x01\n" + + "\x13LoggerLevelResponse\x12T\n" + + "\rlogger_levels\x18\x01 \x03(\v2/.admin.v1.LoggerLevelResponse.LoggerLevelsEntryR\floggerLevels\x1a^\n" + + "\x11LoggerLevelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x123\n" + + "\x05value\x18\x02 \x01(\v2\x1d.admin.v1.LogAndDisplayLevelsR\x05value:\x028\x01\"\x0f\n" + + "\rConfigRequest\"1\n" + + "\x0eConfigResponse\x12\x1f\n" + + "\vconfig_json\x18\x01 \x01(\tR\n" + + "configJson\"\x1d\n" + + "\tDBRequest\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\"V\n" + + "\n" + + "DBResponse\x12\x14\n" + + "\x05value\x18\x01 \x01(\tR\x05value\x122\n" + + "\n" + + "error_code\x18\x02 \x01(\x0e2\x13.admin.v1.ErrorCodeR\terrorCode\"W\n" + + "\x13LogAndDisplayLevels\x12\x1b\n" + + "\tlog_level\x18\x01 \x01(\tR\blogLevel\x12#\n" + + "\rdisplay_level\x18\x02 \x01(\tR\fdisplayLevel\"%\n" + + "\tVMAliases\x12\x18\n" + + "\aaliases\x18\x01 \x03(\tR\aaliases*`\n" + + "\tErrorCode\x12\x1a\n" + + "\x16ERROR_CODE_UNSPECIFIED\x10\x00\x12\x18\n" + + "\x14ERROR_CODE_NOT_FOUND\x10\x01\x12\x1d\n" + + "\x19ERROR_CODE_DATABASE_ERROR\x10\x022\x89\a\n" + + "\fAdminService\x12Y\n" + + "\x10StartCPUProfiler\x12!.admin.v1.StartCPUProfilerRequest\x1a\".admin.v1.StartCPUProfilerResponse\x12V\n" + + "\x0fStopCPUProfiler\x12 .admin.v1.StopCPUProfilerRequest\x1a!.admin.v1.StopCPUProfilerResponse\x12P\n" + + "\rMemoryProfile\x12\x1e.admin.v1.MemoryProfileRequest\x1a\x1f.admin.v1.MemoryProfileResponse\x12J\n" + + "\vLockProfile\x12\x1c.admin.v1.LockProfileRequest\x1a\x1d.admin.v1.LockProfileResponse\x128\n" + + "\x05Alias\x12\x16.admin.v1.AliasRequest\x1a\x17.admin.v1.AliasResponse\x12G\n" + + "\n" + + "AliasChain\x12\x1b.admin.v1.AliasChainRequest\x1a\x1c.admin.v1.AliasChainResponse\x12M\n" + + "\fChainAliases\x12\x1d.admin.v1.ChainAliasesRequest\x1a\x1e.admin.v1.ChainAliasesResponse\x12G\n" + + "\n" + + "Stacktrace\x12\x1b.admin.v1.StacktraceRequest\x1a\x1c.admin.v1.StacktraceResponse\x12S\n" + + "\x0eSetLoggerLevel\x12\x1f.admin.v1.SetLoggerLevelRequest\x1a .admin.v1.SetLoggerLevelResponse\x12J\n" + + "\vLoggerLevel\x12\x1c.admin.v1.LoggerLevelRequest\x1a\x1d.admin.v1.LoggerLevelResponse\x12;\n" + + "\x06Config\x12\x17.admin.v1.ConfigRequest\x1a\x18.admin.v1.ConfigResponse\x12/\n" + + "\x02DB\x12\x13.admin.v1.DBRequest\x1a\x14.admin.v1.DBResponseB;Z9github.com/ava-labs/avalanchego/proto/pb/admin/v1;adminv1b\x06proto3" var ( file_admin_v1_service_proto_rawDescOnce sync.Once - file_admin_v1_service_proto_rawDescData = file_admin_v1_service_proto_rawDesc + file_admin_v1_service_proto_rawDescData []byte ) func file_admin_v1_service_proto_rawDescGZIP() []byte { file_admin_v1_service_proto_rawDescOnce.Do(func() { - file_admin_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_admin_v1_service_proto_rawDescData) + file_admin_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_admin_v1_service_proto_rawDesc), len(file_admin_v1_service_proto_rawDesc))) }) return file_admin_v1_service_proto_rawDescData } @@ -1366,53 +1267,53 @@ var file_admin_v1_service_proto_goTypes = []any{ (*AliasResponse)(nil), // 10: admin.v1.AliasResponse (*AliasChainRequest)(nil), // 11: admin.v1.AliasChainRequest (*AliasChainResponse)(nil), // 12: admin.v1.AliasChainResponse - (*GetChainAliasesRequest)(nil), // 13: admin.v1.GetChainAliasesRequest - (*GetChainAliasesResponse)(nil), // 14: admin.v1.GetChainAliasesResponse + (*ChainAliasesRequest)(nil), // 13: admin.v1.ChainAliasesRequest + (*ChainAliasesResponse)(nil), // 14: admin.v1.ChainAliasesResponse (*StacktraceRequest)(nil), // 15: admin.v1.StacktraceRequest (*StacktraceResponse)(nil), // 16: admin.v1.StacktraceResponse (*SetLoggerLevelRequest)(nil), // 17: admin.v1.SetLoggerLevelRequest (*SetLoggerLevelResponse)(nil), // 18: admin.v1.SetLoggerLevelResponse - (*GetLoggerLevelRequest)(nil), // 19: admin.v1.GetLoggerLevelRequest - (*GetLoggerLevelResponse)(nil), // 20: admin.v1.GetLoggerLevelResponse - (*GetConfigRequest)(nil), // 21: admin.v1.GetConfigRequest - (*GetConfigResponse)(nil), // 22: admin.v1.GetConfigResponse - (*DBGetRequest)(nil), // 23: admin.v1.DBGetRequest - (*DBGetResponse)(nil), // 24: admin.v1.DBGetResponse + (*LoggerLevelRequest)(nil), // 19: admin.v1.LoggerLevelRequest + (*LoggerLevelResponse)(nil), // 20: admin.v1.LoggerLevelResponse + (*ConfigRequest)(nil), // 21: admin.v1.ConfigRequest + (*ConfigResponse)(nil), // 22: admin.v1.ConfigResponse + (*DBRequest)(nil), // 23: admin.v1.DBRequest + (*DBResponse)(nil), // 24: admin.v1.DBResponse (*LogAndDisplayLevels)(nil), // 25: admin.v1.LogAndDisplayLevels (*VMAliases)(nil), // 26: admin.v1.VMAliases nil, // 27: admin.v1.SetLoggerLevelResponse.LoggerLevelsEntry - nil, // 28: admin.v1.GetLoggerLevelResponse.LoggerLevelsEntry + nil, // 28: admin.v1.LoggerLevelResponse.LoggerLevelsEntry } var file_admin_v1_service_proto_depIdxs = []int32{ 27, // 0: admin.v1.SetLoggerLevelResponse.logger_levels:type_name -> admin.v1.SetLoggerLevelResponse.LoggerLevelsEntry - 28, // 1: admin.v1.GetLoggerLevelResponse.logger_levels:type_name -> admin.v1.GetLoggerLevelResponse.LoggerLevelsEntry - 0, // 2: admin.v1.DBGetResponse.error_code:type_name -> admin.v1.ErrorCode + 28, // 1: admin.v1.LoggerLevelResponse.logger_levels:type_name -> admin.v1.LoggerLevelResponse.LoggerLevelsEntry + 0, // 2: admin.v1.DBResponse.error_code:type_name -> admin.v1.ErrorCode 25, // 3: admin.v1.SetLoggerLevelResponse.LoggerLevelsEntry.value:type_name -> admin.v1.LogAndDisplayLevels - 25, // 4: admin.v1.GetLoggerLevelResponse.LoggerLevelsEntry.value:type_name -> admin.v1.LogAndDisplayLevels + 25, // 4: admin.v1.LoggerLevelResponse.LoggerLevelsEntry.value:type_name -> admin.v1.LogAndDisplayLevels 1, // 5: admin.v1.AdminService.StartCPUProfiler:input_type -> admin.v1.StartCPUProfilerRequest 3, // 6: admin.v1.AdminService.StopCPUProfiler:input_type -> admin.v1.StopCPUProfilerRequest 5, // 7: admin.v1.AdminService.MemoryProfile:input_type -> admin.v1.MemoryProfileRequest 7, // 8: admin.v1.AdminService.LockProfile:input_type -> admin.v1.LockProfileRequest 9, // 9: admin.v1.AdminService.Alias:input_type -> admin.v1.AliasRequest 11, // 10: admin.v1.AdminService.AliasChain:input_type -> admin.v1.AliasChainRequest - 13, // 11: admin.v1.AdminService.GetChainAliases:input_type -> admin.v1.GetChainAliasesRequest + 13, // 11: admin.v1.AdminService.ChainAliases:input_type -> admin.v1.ChainAliasesRequest 15, // 12: admin.v1.AdminService.Stacktrace:input_type -> admin.v1.StacktraceRequest 17, // 13: admin.v1.AdminService.SetLoggerLevel:input_type -> admin.v1.SetLoggerLevelRequest - 19, // 14: admin.v1.AdminService.GetLoggerLevel:input_type -> admin.v1.GetLoggerLevelRequest - 21, // 15: admin.v1.AdminService.GetConfig:input_type -> admin.v1.GetConfigRequest - 23, // 16: admin.v1.AdminService.DBGet:input_type -> admin.v1.DBGetRequest + 19, // 14: admin.v1.AdminService.LoggerLevel:input_type -> admin.v1.LoggerLevelRequest + 21, // 15: admin.v1.AdminService.Config:input_type -> admin.v1.ConfigRequest + 23, // 16: admin.v1.AdminService.DB:input_type -> admin.v1.DBRequest 2, // 17: admin.v1.AdminService.StartCPUProfiler:output_type -> admin.v1.StartCPUProfilerResponse 4, // 18: admin.v1.AdminService.StopCPUProfiler:output_type -> admin.v1.StopCPUProfilerResponse 6, // 19: admin.v1.AdminService.MemoryProfile:output_type -> admin.v1.MemoryProfileResponse 8, // 20: admin.v1.AdminService.LockProfile:output_type -> admin.v1.LockProfileResponse 10, // 21: admin.v1.AdminService.Alias:output_type -> admin.v1.AliasResponse 12, // 22: admin.v1.AdminService.AliasChain:output_type -> admin.v1.AliasChainResponse - 14, // 23: admin.v1.AdminService.GetChainAliases:output_type -> admin.v1.GetChainAliasesResponse + 14, // 23: admin.v1.AdminService.ChainAliases:output_type -> admin.v1.ChainAliasesResponse 16, // 24: admin.v1.AdminService.Stacktrace:output_type -> admin.v1.StacktraceResponse 18, // 25: admin.v1.AdminService.SetLoggerLevel:output_type -> admin.v1.SetLoggerLevelResponse - 20, // 26: admin.v1.AdminService.GetLoggerLevel:output_type -> admin.v1.GetLoggerLevelResponse - 22, // 27: admin.v1.AdminService.GetConfig:output_type -> admin.v1.GetConfigResponse - 24, // 28: admin.v1.AdminService.DBGet:output_type -> admin.v1.DBGetResponse + 20, // 26: admin.v1.AdminService.LoggerLevel:output_type -> admin.v1.LoggerLevelResponse + 22, // 27: admin.v1.AdminService.Config:output_type -> admin.v1.ConfigResponse + 24, // 28: admin.v1.AdminService.DB:output_type -> admin.v1.DBResponse 17, // [17:29] is the sub-list for method output_type 5, // [5:17] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -1429,7 +1330,7 @@ func file_admin_v1_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_admin_v1_service_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_admin_v1_service_proto_rawDesc), len(file_admin_v1_service_proto_rawDesc)), NumEnums: 1, NumMessages: 28, NumExtensions: 0, @@ -1441,7 +1342,6 @@ func file_admin_v1_service_proto_init() { MessageInfos: file_admin_v1_service_proto_msgTypes, }.Build() File_admin_v1_service_proto = out.File - file_admin_v1_service_proto_rawDesc = nil file_admin_v1_service_proto_goTypes = nil file_admin_v1_service_proto_depIdxs = nil } diff --git a/proto/pb/admin/v1/service_grpc.pb.go b/proto/pb/admin/v1/service_grpc.pb.go index 751c3db307e4..7198f6850d71 100644 --- a/proto/pb/admin/v1/service_grpc.pb.go +++ b/proto/pb/admin/v1/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.3 // source: admin/v1/service.proto package adminv1 @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AdminService_StartCPUProfiler_FullMethodName = "/admin.v1.AdminService/StartCPUProfiler" @@ -25,17 +25,19 @@ const ( AdminService_LockProfile_FullMethodName = "/admin.v1.AdminService/LockProfile" AdminService_Alias_FullMethodName = "/admin.v1.AdminService/Alias" AdminService_AliasChain_FullMethodName = "/admin.v1.AdminService/AliasChain" - AdminService_GetChainAliases_FullMethodName = "/admin.v1.AdminService/GetChainAliases" + AdminService_ChainAliases_FullMethodName = "/admin.v1.AdminService/ChainAliases" AdminService_Stacktrace_FullMethodName = "/admin.v1.AdminService/Stacktrace" AdminService_SetLoggerLevel_FullMethodName = "/admin.v1.AdminService/SetLoggerLevel" - AdminService_GetLoggerLevel_FullMethodName = "/admin.v1.AdminService/GetLoggerLevel" - AdminService_GetConfig_FullMethodName = "/admin.v1.AdminService/GetConfig" - AdminService_DBGet_FullMethodName = "/admin.v1.AdminService/DBGet" + AdminService_LoggerLevel_FullMethodName = "/admin.v1.AdminService/LoggerLevel" + AdminService_Config_FullMethodName = "/admin.v1.AdminService/Config" + AdminService_DB_FullMethodName = "/admin.v1.AdminService/DB" ) // AdminServiceClient is the client API for AdminService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// AdminService is the API service for node admin management type AdminServiceClient interface { StartCPUProfiler(ctx context.Context, in *StartCPUProfilerRequest, opts ...grpc.CallOption) (*StartCPUProfilerResponse, error) StopCPUProfiler(ctx context.Context, in *StopCPUProfilerRequest, opts ...grpc.CallOption) (*StopCPUProfilerResponse, error) @@ -43,12 +45,12 @@ type AdminServiceClient interface { LockProfile(ctx context.Context, in *LockProfileRequest, opts ...grpc.CallOption) (*LockProfileResponse, error) Alias(ctx context.Context, in *AliasRequest, opts ...grpc.CallOption) (*AliasResponse, error) AliasChain(ctx context.Context, in *AliasChainRequest, opts ...grpc.CallOption) (*AliasChainResponse, error) - GetChainAliases(ctx context.Context, in *GetChainAliasesRequest, opts ...grpc.CallOption) (*GetChainAliasesResponse, error) + ChainAliases(ctx context.Context, in *ChainAliasesRequest, opts ...grpc.CallOption) (*ChainAliasesResponse, error) Stacktrace(ctx context.Context, in *StacktraceRequest, opts ...grpc.CallOption) (*StacktraceResponse, error) SetLoggerLevel(ctx context.Context, in *SetLoggerLevelRequest, opts ...grpc.CallOption) (*SetLoggerLevelResponse, error) - GetLoggerLevel(ctx context.Context, in *GetLoggerLevelRequest, opts ...grpc.CallOption) (*GetLoggerLevelResponse, error) - GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) - DBGet(ctx context.Context, in *DBGetRequest, opts ...grpc.CallOption) (*DBGetResponse, error) + LoggerLevel(ctx context.Context, in *LoggerLevelRequest, opts ...grpc.CallOption) (*LoggerLevelResponse, error) + Config(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (*ConfigResponse, error) + DB(ctx context.Context, in *DBRequest, opts ...grpc.CallOption) (*DBResponse, error) } type adminServiceClient struct { @@ -60,8 +62,9 @@ func NewAdminServiceClient(cc grpc.ClientConnInterface) AdminServiceClient { } func (c *adminServiceClient) StartCPUProfiler(ctx context.Context, in *StartCPUProfilerRequest, opts ...grpc.CallOption) (*StartCPUProfilerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartCPUProfilerResponse) - err := c.cc.Invoke(ctx, AdminService_StartCPUProfiler_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_StartCPUProfiler_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -69,8 +72,9 @@ func (c *adminServiceClient) StartCPUProfiler(ctx context.Context, in *StartCPUP } func (c *adminServiceClient) StopCPUProfiler(ctx context.Context, in *StopCPUProfilerRequest, opts ...grpc.CallOption) (*StopCPUProfilerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StopCPUProfilerResponse) - err := c.cc.Invoke(ctx, AdminService_StopCPUProfiler_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_StopCPUProfiler_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -78,8 +82,9 @@ func (c *adminServiceClient) StopCPUProfiler(ctx context.Context, in *StopCPUPro } func (c *adminServiceClient) MemoryProfile(ctx context.Context, in *MemoryProfileRequest, opts ...grpc.CallOption) (*MemoryProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MemoryProfileResponse) - err := c.cc.Invoke(ctx, AdminService_MemoryProfile_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_MemoryProfile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -87,8 +92,9 @@ func (c *adminServiceClient) MemoryProfile(ctx context.Context, in *MemoryProfil } func (c *adminServiceClient) LockProfile(ctx context.Context, in *LockProfileRequest, opts ...grpc.CallOption) (*LockProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LockProfileResponse) - err := c.cc.Invoke(ctx, AdminService_LockProfile_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_LockProfile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -96,8 +102,9 @@ func (c *adminServiceClient) LockProfile(ctx context.Context, in *LockProfileReq } func (c *adminServiceClient) Alias(ctx context.Context, in *AliasRequest, opts ...grpc.CallOption) (*AliasResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AliasResponse) - err := c.cc.Invoke(ctx, AdminService_Alias_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_Alias_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -105,17 +112,19 @@ func (c *adminServiceClient) Alias(ctx context.Context, in *AliasRequest, opts . } func (c *adminServiceClient) AliasChain(ctx context.Context, in *AliasChainRequest, opts ...grpc.CallOption) (*AliasChainResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AliasChainResponse) - err := c.cc.Invoke(ctx, AdminService_AliasChain_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_AliasChain_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *adminServiceClient) GetChainAliases(ctx context.Context, in *GetChainAliasesRequest, opts ...grpc.CallOption) (*GetChainAliasesResponse, error) { - out := new(GetChainAliasesResponse) - err := c.cc.Invoke(ctx, AdminService_GetChainAliases_FullMethodName, in, out, opts...) +func (c *adminServiceClient) ChainAliases(ctx context.Context, in *ChainAliasesRequest, opts ...grpc.CallOption) (*ChainAliasesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ChainAliasesResponse) + err := c.cc.Invoke(ctx, AdminService_ChainAliases_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -123,8 +132,9 @@ func (c *adminServiceClient) GetChainAliases(ctx context.Context, in *GetChainAl } func (c *adminServiceClient) Stacktrace(ctx context.Context, in *StacktraceRequest, opts ...grpc.CallOption) (*StacktraceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StacktraceResponse) - err := c.cc.Invoke(ctx, AdminService_Stacktrace_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_Stacktrace_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -132,35 +142,39 @@ func (c *adminServiceClient) Stacktrace(ctx context.Context, in *StacktraceReque } func (c *adminServiceClient) SetLoggerLevel(ctx context.Context, in *SetLoggerLevelRequest, opts ...grpc.CallOption) (*SetLoggerLevelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetLoggerLevelResponse) - err := c.cc.Invoke(ctx, AdminService_SetLoggerLevel_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdminService_SetLoggerLevel_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *adminServiceClient) GetLoggerLevel(ctx context.Context, in *GetLoggerLevelRequest, opts ...grpc.CallOption) (*GetLoggerLevelResponse, error) { - out := new(GetLoggerLevelResponse) - err := c.cc.Invoke(ctx, AdminService_GetLoggerLevel_FullMethodName, in, out, opts...) +func (c *adminServiceClient) LoggerLevel(ctx context.Context, in *LoggerLevelRequest, opts ...grpc.CallOption) (*LoggerLevelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LoggerLevelResponse) + err := c.cc.Invoke(ctx, AdminService_LoggerLevel_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *adminServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) { - out := new(GetConfigResponse) - err := c.cc.Invoke(ctx, AdminService_GetConfig_FullMethodName, in, out, opts...) +func (c *adminServiceClient) Config(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (*ConfigResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ConfigResponse) + err := c.cc.Invoke(ctx, AdminService_Config_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *adminServiceClient) DBGet(ctx context.Context, in *DBGetRequest, opts ...grpc.CallOption) (*DBGetResponse, error) { - out := new(DBGetResponse) - err := c.cc.Invoke(ctx, AdminService_DBGet_FullMethodName, in, out, opts...) +func (c *adminServiceClient) DB(ctx context.Context, in *DBRequest, opts ...grpc.CallOption) (*DBResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DBResponse) + err := c.cc.Invoke(ctx, AdminService_DB_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -169,7 +183,9 @@ func (c *adminServiceClient) DBGet(ctx context.Context, in *DBGetRequest, opts . // AdminServiceServer is the server API for AdminService service. // All implementations must embed UnimplementedAdminServiceServer -// for forward compatibility +// for forward compatibility. +// +// AdminService is the API service for node admin management type AdminServiceServer interface { StartCPUProfiler(context.Context, *StartCPUProfilerRequest) (*StartCPUProfilerResponse, error) StopCPUProfiler(context.Context, *StopCPUProfilerRequest) (*StopCPUProfilerResponse, error) @@ -177,18 +193,21 @@ type AdminServiceServer interface { LockProfile(context.Context, *LockProfileRequest) (*LockProfileResponse, error) Alias(context.Context, *AliasRequest) (*AliasResponse, error) AliasChain(context.Context, *AliasChainRequest) (*AliasChainResponse, error) - GetChainAliases(context.Context, *GetChainAliasesRequest) (*GetChainAliasesResponse, error) + ChainAliases(context.Context, *ChainAliasesRequest) (*ChainAliasesResponse, error) Stacktrace(context.Context, *StacktraceRequest) (*StacktraceResponse, error) SetLoggerLevel(context.Context, *SetLoggerLevelRequest) (*SetLoggerLevelResponse, error) - GetLoggerLevel(context.Context, *GetLoggerLevelRequest) (*GetLoggerLevelResponse, error) - GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) - DBGet(context.Context, *DBGetRequest) (*DBGetResponse, error) + LoggerLevel(context.Context, *LoggerLevelRequest) (*LoggerLevelResponse, error) + Config(context.Context, *ConfigRequest) (*ConfigResponse, error) + DB(context.Context, *DBRequest) (*DBResponse, error) mustEmbedUnimplementedAdminServiceServer() } -// UnimplementedAdminServiceServer must be embedded to have forward compatible implementations. -type UnimplementedAdminServiceServer struct { -} +// UnimplementedAdminServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAdminServiceServer struct{} func (UnimplementedAdminServiceServer) StartCPUProfiler(context.Context, *StartCPUProfilerRequest) (*StartCPUProfilerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartCPUProfiler not implemented") @@ -208,8 +227,8 @@ func (UnimplementedAdminServiceServer) Alias(context.Context, *AliasRequest) (*A func (UnimplementedAdminServiceServer) AliasChain(context.Context, *AliasChainRequest) (*AliasChainResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AliasChain not implemented") } -func (UnimplementedAdminServiceServer) GetChainAliases(context.Context, *GetChainAliasesRequest) (*GetChainAliasesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChainAliases not implemented") +func (UnimplementedAdminServiceServer) ChainAliases(context.Context, *ChainAliasesRequest) (*ChainAliasesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChainAliases not implemented") } func (UnimplementedAdminServiceServer) Stacktrace(context.Context, *StacktraceRequest) (*StacktraceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Stacktrace not implemented") @@ -217,16 +236,17 @@ func (UnimplementedAdminServiceServer) Stacktrace(context.Context, *StacktraceRe func (UnimplementedAdminServiceServer) SetLoggerLevel(context.Context, *SetLoggerLevelRequest) (*SetLoggerLevelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetLoggerLevel not implemented") } -func (UnimplementedAdminServiceServer) GetLoggerLevel(context.Context, *GetLoggerLevelRequest) (*GetLoggerLevelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLoggerLevel not implemented") +func (UnimplementedAdminServiceServer) LoggerLevel(context.Context, *LoggerLevelRequest) (*LoggerLevelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoggerLevel not implemented") } -func (UnimplementedAdminServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") +func (UnimplementedAdminServiceServer) Config(context.Context, *ConfigRequest) (*ConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Config not implemented") } -func (UnimplementedAdminServiceServer) DBGet(context.Context, *DBGetRequest) (*DBGetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DBGet not implemented") +func (UnimplementedAdminServiceServer) DB(context.Context, *DBRequest) (*DBResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DB not implemented") } func (UnimplementedAdminServiceServer) mustEmbedUnimplementedAdminServiceServer() {} +func (UnimplementedAdminServiceServer) testEmbeddedByValue() {} // UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdminServiceServer will @@ -236,6 +256,13 @@ type UnsafeAdminServiceServer interface { } func RegisterAdminServiceServer(s grpc.ServiceRegistrar, srv AdminServiceServer) { + // If the following call pancis, it indicates UnimplementedAdminServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AdminService_ServiceDesc, srv) } @@ -347,20 +374,20 @@ func _AdminService_AliasChain_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _AdminService_GetChainAliases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetChainAliasesRequest) +func _AdminService_ChainAliases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChainAliasesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminServiceServer).GetChainAliases(ctx, in) + return srv.(AdminServiceServer).ChainAliases(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AdminService_GetChainAliases_FullMethodName, + FullMethod: AdminService_ChainAliases_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).GetChainAliases(ctx, req.(*GetChainAliasesRequest)) + return srv.(AdminServiceServer).ChainAliases(ctx, req.(*ChainAliasesRequest)) } return interceptor(ctx, in, info, handler) } @@ -401,56 +428,56 @@ func _AdminService_SetLoggerLevel_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _AdminService_GetLoggerLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLoggerLevelRequest) +func _AdminService_LoggerLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoggerLevelRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminServiceServer).GetLoggerLevel(ctx, in) + return srv.(AdminServiceServer).LoggerLevel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AdminService_GetLoggerLevel_FullMethodName, + FullMethod: AdminService_LoggerLevel_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).GetLoggerLevel(ctx, req.(*GetLoggerLevelRequest)) + return srv.(AdminServiceServer).LoggerLevel(ctx, req.(*LoggerLevelRequest)) } return interceptor(ctx, in, info, handler) } -func _AdminService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConfigRequest) +func _AdminService_Config_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminServiceServer).GetConfig(ctx, in) + return srv.(AdminServiceServer).Config(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AdminService_GetConfig_FullMethodName, + FullMethod: AdminService_Config_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).GetConfig(ctx, req.(*GetConfigRequest)) + return srv.(AdminServiceServer).Config(ctx, req.(*ConfigRequest)) } return interceptor(ctx, in, info, handler) } -func _AdminService_DBGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DBGetRequest) +func _AdminService_DB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DBRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminServiceServer).DBGet(ctx, in) + return srv.(AdminServiceServer).DB(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AdminService_DBGet_FullMethodName, + FullMethod: AdminService_DB_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).DBGet(ctx, req.(*DBGetRequest)) + return srv.(AdminServiceServer).DB(ctx, req.(*DBRequest)) } return interceptor(ctx, in, info, handler) } @@ -487,8 +514,8 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{ Handler: _AdminService_AliasChain_Handler, }, { - MethodName: "GetChainAliases", - Handler: _AdminService_GetChainAliases_Handler, + MethodName: "ChainAliases", + Handler: _AdminService_ChainAliases_Handler, }, { MethodName: "Stacktrace", @@ -499,16 +526,16 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{ Handler: _AdminService_SetLoggerLevel_Handler, }, { - MethodName: "GetLoggerLevel", - Handler: _AdminService_GetLoggerLevel_Handler, + MethodName: "LoggerLevel", + Handler: _AdminService_LoggerLevel_Handler, }, { - MethodName: "GetConfig", - Handler: _AdminService_GetConfig_Handler, + MethodName: "Config", + Handler: _AdminService_Config_Handler, }, { - MethodName: "DBGet", - Handler: _AdminService_DBGet_Handler, + MethodName: "DB", + Handler: _AdminService_DB_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/proto/pb/info/v1/infov1connect/service.connect.go b/proto/pb/info/v1/infov1connect/service.connect.go index 1ca0a749790f..3dd9e44e4998 100644 --- a/proto/pb/info/v1/infov1connect/service.connect.go +++ b/proto/pb/info/v1/infov1connect/service.connect.go @@ -36,22 +36,19 @@ const ( // reflection-formatted method names, remove the leading slash and convert the remaining slash to a // period. const ( - // InfoServiceGetNodeVersionProcedure is the fully-qualified name of the InfoService's - // GetNodeVersion RPC. - InfoServiceGetNodeVersionProcedure = "/info.v1.InfoService/GetNodeVersion" - // InfoServiceGetNodeIDProcedure is the fully-qualified name of the InfoService's GetNodeID RPC. - InfoServiceGetNodeIDProcedure = "/info.v1.InfoService/GetNodeID" - // InfoServiceGetNodeIPProcedure is the fully-qualified name of the InfoService's GetNodeIP RPC. - InfoServiceGetNodeIPProcedure = "/info.v1.InfoService/GetNodeIP" - // InfoServiceGetNetworkIDProcedure is the fully-qualified name of the InfoService's GetNetworkID + // InfoServiceNodeVersionProcedure is the fully-qualified name of the InfoService's NodeVersion RPC. + InfoServiceNodeVersionProcedure = "/info.v1.InfoService/NodeVersion" + // InfoServiceNodeIDProcedure is the fully-qualified name of the InfoService's NodeID RPC. + InfoServiceNodeIDProcedure = "/info.v1.InfoService/NodeID" + // InfoServiceNodeIPProcedure is the fully-qualified name of the InfoService's NodeIP RPC. + InfoServiceNodeIPProcedure = "/info.v1.InfoService/NodeIP" + // InfoServiceNetworkIDProcedure is the fully-qualified name of the InfoService's NetworkID RPC. + InfoServiceNetworkIDProcedure = "/info.v1.InfoService/NetworkID" + // InfoServiceNetworkNameProcedure is the fully-qualified name of the InfoService's NetworkName RPC. + InfoServiceNetworkNameProcedure = "/info.v1.InfoService/NetworkName" + // InfoServiceBlockchainIDProcedure is the fully-qualified name of the InfoService's BlockchainID // RPC. - InfoServiceGetNetworkIDProcedure = "/info.v1.InfoService/GetNetworkID" - // InfoServiceGetNetworkNameProcedure is the fully-qualified name of the InfoService's - // GetNetworkName RPC. - InfoServiceGetNetworkNameProcedure = "/info.v1.InfoService/GetNetworkName" - // InfoServiceGetBlockchainIDProcedure is the fully-qualified name of the InfoService's - // GetBlockchainID RPC. - InfoServiceGetBlockchainIDProcedure = "/info.v1.InfoService/GetBlockchainID" + InfoServiceBlockchainIDProcedure = "/info.v1.InfoService/BlockchainID" // InfoServicePeersProcedure is the fully-qualified name of the InfoService's Peers RPC. InfoServicePeersProcedure = "/info.v1.InfoService/Peers" // InfoServiceIsBootstrappedProcedure is the fully-qualified name of the InfoService's @@ -61,23 +58,23 @@ const ( InfoServiceUpgradesProcedure = "/info.v1.InfoService/Upgrades" // InfoServiceUptimeProcedure is the fully-qualified name of the InfoService's Uptime RPC. InfoServiceUptimeProcedure = "/info.v1.InfoService/Uptime" - // InfoServiceGetVMsProcedure is the fully-qualified name of the InfoService's GetVMs RPC. - InfoServiceGetVMsProcedure = "/info.v1.InfoService/GetVMs" + // InfoServiceVMsProcedure is the fully-qualified name of the InfoService's VMs RPC. + InfoServiceVMsProcedure = "/info.v1.InfoService/VMs" ) // InfoServiceClient is a client for the info.v1.InfoService service. type InfoServiceClient interface { - GetNodeVersion(context.Context, *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) - GetNodeID(context.Context, *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) - GetNodeIP(context.Context, *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) - GetNetworkID(context.Context, *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) - GetNetworkName(context.Context, *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) - GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) + NodeVersion(context.Context, *connect.Request[v1.NodeVersionRequest]) (*connect.Response[v1.NodeVersionResponse], error) + NodeID(context.Context, *connect.Request[v1.NodeIDRequest]) (*connect.Response[v1.NodeIDResponse], error) + NodeIP(context.Context, *connect.Request[v1.NodeIPRequest]) (*connect.Response[v1.NodeIPResponse], error) + NetworkID(context.Context, *connect.Request[v1.NetworkIDRequest]) (*connect.Response[v1.NetworkIDResponse], error) + NetworkName(context.Context, *connect.Request[v1.NetworkNameRequest]) (*connect.Response[v1.NetworkNameResponse], error) + BlockchainID(context.Context, *connect.Request[v1.BlockchainIDRequest]) (*connect.Response[v1.BlockchainIDResponse], error) Peers(context.Context, *connect.Request[v1.PeersRequest]) (*connect.Response[v1.PeersResponse], error) IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedRequest]) (*connect.Response[v1.IsBootstrappedResponse], error) Upgrades(context.Context, *connect.Request[v1.UpgradesRequest]) (*connect.Response[v1.UpgradesResponse], error) Uptime(context.Context, *connect.Request[v1.UptimeRequest]) (*connect.Response[v1.UptimeResponse], error) - GetVMs(context.Context, *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) + VMs(context.Context, *connect.Request[v1.VMsRequest]) (*connect.Response[v1.VMsResponse], error) } // NewInfoServiceClient constructs a client for the info.v1.InfoService service. By default, it uses @@ -91,40 +88,40 @@ func NewInfoServiceClient(httpClient connect.HTTPClient, baseURL string, opts .. baseURL = strings.TrimRight(baseURL, "/") infoServiceMethods := v1.File_info_v1_service_proto.Services().ByName("InfoService").Methods() return &infoServiceClient{ - getNodeVersion: connect.NewClient[v1.GetNodeVersionRequest, v1.GetNodeVersionResponse]( + nodeVersion: connect.NewClient[v1.NodeVersionRequest, v1.NodeVersionResponse]( httpClient, - baseURL+InfoServiceGetNodeVersionProcedure, - connect.WithSchema(infoServiceMethods.ByName("GetNodeVersion")), + baseURL+InfoServiceNodeVersionProcedure, + connect.WithSchema(infoServiceMethods.ByName("NodeVersion")), connect.WithClientOptions(opts...), ), - getNodeID: connect.NewClient[v1.GetNodeIDRequest, v1.GetNodeIDResponse]( + nodeID: connect.NewClient[v1.NodeIDRequest, v1.NodeIDResponse]( httpClient, - baseURL+InfoServiceGetNodeIDProcedure, - connect.WithSchema(infoServiceMethods.ByName("GetNodeID")), + baseURL+InfoServiceNodeIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("NodeID")), connect.WithClientOptions(opts...), ), - getNodeIP: connect.NewClient[v1.GetNodeIPRequest, v1.GetNodeIPResponse]( + nodeIP: connect.NewClient[v1.NodeIPRequest, v1.NodeIPResponse]( httpClient, - baseURL+InfoServiceGetNodeIPProcedure, - connect.WithSchema(infoServiceMethods.ByName("GetNodeIP")), + baseURL+InfoServiceNodeIPProcedure, + connect.WithSchema(infoServiceMethods.ByName("NodeIP")), connect.WithClientOptions(opts...), ), - getNetworkID: connect.NewClient[v1.GetNetworkIDRequest, v1.GetNetworkIDResponse]( + networkID: connect.NewClient[v1.NetworkIDRequest, v1.NetworkIDResponse]( httpClient, - baseURL+InfoServiceGetNetworkIDProcedure, - connect.WithSchema(infoServiceMethods.ByName("GetNetworkID")), + baseURL+InfoServiceNetworkIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("NetworkID")), connect.WithClientOptions(opts...), ), - getNetworkName: connect.NewClient[v1.GetNetworkNameRequest, v1.GetNetworkNameResponse]( + networkName: connect.NewClient[v1.NetworkNameRequest, v1.NetworkNameResponse]( httpClient, - baseURL+InfoServiceGetNetworkNameProcedure, - connect.WithSchema(infoServiceMethods.ByName("GetNetworkName")), + baseURL+InfoServiceNetworkNameProcedure, + connect.WithSchema(infoServiceMethods.ByName("NetworkName")), connect.WithClientOptions(opts...), ), - getBlockchainID: connect.NewClient[v1.GetBlockchainIDRequest, v1.GetBlockchainIDResponse]( + blockchainID: connect.NewClient[v1.BlockchainIDRequest, v1.BlockchainIDResponse]( httpClient, - baseURL+InfoServiceGetBlockchainIDProcedure, - connect.WithSchema(infoServiceMethods.ByName("GetBlockchainID")), + baseURL+InfoServiceBlockchainIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("BlockchainID")), connect.WithClientOptions(opts...), ), peers: connect.NewClient[v1.PeersRequest, v1.PeersResponse]( @@ -151,10 +148,10 @@ func NewInfoServiceClient(httpClient connect.HTTPClient, baseURL string, opts .. connect.WithSchema(infoServiceMethods.ByName("Uptime")), connect.WithClientOptions(opts...), ), - getVMs: connect.NewClient[v1.GetVMsRequest, v1.GetVMsResponse]( + vMs: connect.NewClient[v1.VMsRequest, v1.VMsResponse]( httpClient, - baseURL+InfoServiceGetVMsProcedure, - connect.WithSchema(infoServiceMethods.ByName("GetVMs")), + baseURL+InfoServiceVMsProcedure, + connect.WithSchema(infoServiceMethods.ByName("VMs")), connect.WithClientOptions(opts...), ), } @@ -162,47 +159,47 @@ func NewInfoServiceClient(httpClient connect.HTTPClient, baseURL string, opts .. // infoServiceClient implements InfoServiceClient. type infoServiceClient struct { - getNodeVersion *connect.Client[v1.GetNodeVersionRequest, v1.GetNodeVersionResponse] - getNodeID *connect.Client[v1.GetNodeIDRequest, v1.GetNodeIDResponse] - getNodeIP *connect.Client[v1.GetNodeIPRequest, v1.GetNodeIPResponse] - getNetworkID *connect.Client[v1.GetNetworkIDRequest, v1.GetNetworkIDResponse] - getNetworkName *connect.Client[v1.GetNetworkNameRequest, v1.GetNetworkNameResponse] - getBlockchainID *connect.Client[v1.GetBlockchainIDRequest, v1.GetBlockchainIDResponse] - peers *connect.Client[v1.PeersRequest, v1.PeersResponse] - isBootstrapped *connect.Client[v1.IsBootstrappedRequest, v1.IsBootstrappedResponse] - upgrades *connect.Client[v1.UpgradesRequest, v1.UpgradesResponse] - uptime *connect.Client[v1.UptimeRequest, v1.UptimeResponse] - getVMs *connect.Client[v1.GetVMsRequest, v1.GetVMsResponse] + nodeVersion *connect.Client[v1.NodeVersionRequest, v1.NodeVersionResponse] + nodeID *connect.Client[v1.NodeIDRequest, v1.NodeIDResponse] + nodeIP *connect.Client[v1.NodeIPRequest, v1.NodeIPResponse] + networkID *connect.Client[v1.NetworkIDRequest, v1.NetworkIDResponse] + networkName *connect.Client[v1.NetworkNameRequest, v1.NetworkNameResponse] + blockchainID *connect.Client[v1.BlockchainIDRequest, v1.BlockchainIDResponse] + peers *connect.Client[v1.PeersRequest, v1.PeersResponse] + isBootstrapped *connect.Client[v1.IsBootstrappedRequest, v1.IsBootstrappedResponse] + upgrades *connect.Client[v1.UpgradesRequest, v1.UpgradesResponse] + uptime *connect.Client[v1.UptimeRequest, v1.UptimeResponse] + vMs *connect.Client[v1.VMsRequest, v1.VMsResponse] } -// GetNodeVersion calls info.v1.InfoService.GetNodeVersion. -func (c *infoServiceClient) GetNodeVersion(ctx context.Context, req *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) { - return c.getNodeVersion.CallUnary(ctx, req) +// NodeVersion calls info.v1.InfoService.NodeVersion. +func (c *infoServiceClient) NodeVersion(ctx context.Context, req *connect.Request[v1.NodeVersionRequest]) (*connect.Response[v1.NodeVersionResponse], error) { + return c.nodeVersion.CallUnary(ctx, req) } -// GetNodeID calls info.v1.InfoService.GetNodeID. -func (c *infoServiceClient) GetNodeID(ctx context.Context, req *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) { - return c.getNodeID.CallUnary(ctx, req) +// NodeID calls info.v1.InfoService.NodeID. +func (c *infoServiceClient) NodeID(ctx context.Context, req *connect.Request[v1.NodeIDRequest]) (*connect.Response[v1.NodeIDResponse], error) { + return c.nodeID.CallUnary(ctx, req) } -// GetNodeIP calls info.v1.InfoService.GetNodeIP. -func (c *infoServiceClient) GetNodeIP(ctx context.Context, req *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) { - return c.getNodeIP.CallUnary(ctx, req) +// NodeIP calls info.v1.InfoService.NodeIP. +func (c *infoServiceClient) NodeIP(ctx context.Context, req *connect.Request[v1.NodeIPRequest]) (*connect.Response[v1.NodeIPResponse], error) { + return c.nodeIP.CallUnary(ctx, req) } -// GetNetworkID calls info.v1.InfoService.GetNetworkID. -func (c *infoServiceClient) GetNetworkID(ctx context.Context, req *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) { - return c.getNetworkID.CallUnary(ctx, req) +// NetworkID calls info.v1.InfoService.NetworkID. +func (c *infoServiceClient) NetworkID(ctx context.Context, req *connect.Request[v1.NetworkIDRequest]) (*connect.Response[v1.NetworkIDResponse], error) { + return c.networkID.CallUnary(ctx, req) } -// GetNetworkName calls info.v1.InfoService.GetNetworkName. -func (c *infoServiceClient) GetNetworkName(ctx context.Context, req *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) { - return c.getNetworkName.CallUnary(ctx, req) +// NetworkName calls info.v1.InfoService.NetworkName. +func (c *infoServiceClient) NetworkName(ctx context.Context, req *connect.Request[v1.NetworkNameRequest]) (*connect.Response[v1.NetworkNameResponse], error) { + return c.networkName.CallUnary(ctx, req) } -// GetBlockchainID calls info.v1.InfoService.GetBlockchainID. -func (c *infoServiceClient) GetBlockchainID(ctx context.Context, req *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) { - return c.getBlockchainID.CallUnary(ctx, req) +// BlockchainID calls info.v1.InfoService.BlockchainID. +func (c *infoServiceClient) BlockchainID(ctx context.Context, req *connect.Request[v1.BlockchainIDRequest]) (*connect.Response[v1.BlockchainIDResponse], error) { + return c.blockchainID.CallUnary(ctx, req) } // Peers calls info.v1.InfoService.Peers. @@ -225,24 +222,24 @@ func (c *infoServiceClient) Uptime(ctx context.Context, req *connect.Request[v1. return c.uptime.CallUnary(ctx, req) } -// GetVMs calls info.v1.InfoService.GetVMs. -func (c *infoServiceClient) GetVMs(ctx context.Context, req *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) { - return c.getVMs.CallUnary(ctx, req) +// VMs calls info.v1.InfoService.VMs. +func (c *infoServiceClient) VMs(ctx context.Context, req *connect.Request[v1.VMsRequest]) (*connect.Response[v1.VMsResponse], error) { + return c.vMs.CallUnary(ctx, req) } // InfoServiceHandler is an implementation of the info.v1.InfoService service. type InfoServiceHandler interface { - GetNodeVersion(context.Context, *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) - GetNodeID(context.Context, *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) - GetNodeIP(context.Context, *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) - GetNetworkID(context.Context, *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) - GetNetworkName(context.Context, *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) - GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) + NodeVersion(context.Context, *connect.Request[v1.NodeVersionRequest]) (*connect.Response[v1.NodeVersionResponse], error) + NodeID(context.Context, *connect.Request[v1.NodeIDRequest]) (*connect.Response[v1.NodeIDResponse], error) + NodeIP(context.Context, *connect.Request[v1.NodeIPRequest]) (*connect.Response[v1.NodeIPResponse], error) + NetworkID(context.Context, *connect.Request[v1.NetworkIDRequest]) (*connect.Response[v1.NetworkIDResponse], error) + NetworkName(context.Context, *connect.Request[v1.NetworkNameRequest]) (*connect.Response[v1.NetworkNameResponse], error) + BlockchainID(context.Context, *connect.Request[v1.BlockchainIDRequest]) (*connect.Response[v1.BlockchainIDResponse], error) Peers(context.Context, *connect.Request[v1.PeersRequest]) (*connect.Response[v1.PeersResponse], error) IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedRequest]) (*connect.Response[v1.IsBootstrappedResponse], error) Upgrades(context.Context, *connect.Request[v1.UpgradesRequest]) (*connect.Response[v1.UpgradesResponse], error) Uptime(context.Context, *connect.Request[v1.UptimeRequest]) (*connect.Response[v1.UptimeResponse], error) - GetVMs(context.Context, *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) + VMs(context.Context, *connect.Request[v1.VMsRequest]) (*connect.Response[v1.VMsResponse], error) } // NewInfoServiceHandler builds an HTTP handler from the service implementation. It returns the path @@ -252,40 +249,40 @@ type InfoServiceHandler interface { // and JSON codecs. They also support gzip compression. func NewInfoServiceHandler(svc InfoServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { infoServiceMethods := v1.File_info_v1_service_proto.Services().ByName("InfoService").Methods() - infoServiceGetNodeVersionHandler := connect.NewUnaryHandler( - InfoServiceGetNodeVersionProcedure, - svc.GetNodeVersion, - connect.WithSchema(infoServiceMethods.ByName("GetNodeVersion")), + infoServiceNodeVersionHandler := connect.NewUnaryHandler( + InfoServiceNodeVersionProcedure, + svc.NodeVersion, + connect.WithSchema(infoServiceMethods.ByName("NodeVersion")), connect.WithHandlerOptions(opts...), ) - infoServiceGetNodeIDHandler := connect.NewUnaryHandler( - InfoServiceGetNodeIDProcedure, - svc.GetNodeID, - connect.WithSchema(infoServiceMethods.ByName("GetNodeID")), + infoServiceNodeIDHandler := connect.NewUnaryHandler( + InfoServiceNodeIDProcedure, + svc.NodeID, + connect.WithSchema(infoServiceMethods.ByName("NodeID")), connect.WithHandlerOptions(opts...), ) - infoServiceGetNodeIPHandler := connect.NewUnaryHandler( - InfoServiceGetNodeIPProcedure, - svc.GetNodeIP, - connect.WithSchema(infoServiceMethods.ByName("GetNodeIP")), + infoServiceNodeIPHandler := connect.NewUnaryHandler( + InfoServiceNodeIPProcedure, + svc.NodeIP, + connect.WithSchema(infoServiceMethods.ByName("NodeIP")), connect.WithHandlerOptions(opts...), ) - infoServiceGetNetworkIDHandler := connect.NewUnaryHandler( - InfoServiceGetNetworkIDProcedure, - svc.GetNetworkID, - connect.WithSchema(infoServiceMethods.ByName("GetNetworkID")), + infoServiceNetworkIDHandler := connect.NewUnaryHandler( + InfoServiceNetworkIDProcedure, + svc.NetworkID, + connect.WithSchema(infoServiceMethods.ByName("NetworkID")), connect.WithHandlerOptions(opts...), ) - infoServiceGetNetworkNameHandler := connect.NewUnaryHandler( - InfoServiceGetNetworkNameProcedure, - svc.GetNetworkName, - connect.WithSchema(infoServiceMethods.ByName("GetNetworkName")), + infoServiceNetworkNameHandler := connect.NewUnaryHandler( + InfoServiceNetworkNameProcedure, + svc.NetworkName, + connect.WithSchema(infoServiceMethods.ByName("NetworkName")), connect.WithHandlerOptions(opts...), ) - infoServiceGetBlockchainIDHandler := connect.NewUnaryHandler( - InfoServiceGetBlockchainIDProcedure, - svc.GetBlockchainID, - connect.WithSchema(infoServiceMethods.ByName("GetBlockchainID")), + infoServiceBlockchainIDHandler := connect.NewUnaryHandler( + InfoServiceBlockchainIDProcedure, + svc.BlockchainID, + connect.WithSchema(infoServiceMethods.ByName("BlockchainID")), connect.WithHandlerOptions(opts...), ) infoServicePeersHandler := connect.NewUnaryHandler( @@ -312,26 +309,26 @@ func NewInfoServiceHandler(svc InfoServiceHandler, opts ...connect.HandlerOption connect.WithSchema(infoServiceMethods.ByName("Uptime")), connect.WithHandlerOptions(opts...), ) - infoServiceGetVMsHandler := connect.NewUnaryHandler( - InfoServiceGetVMsProcedure, - svc.GetVMs, - connect.WithSchema(infoServiceMethods.ByName("GetVMs")), + infoServiceVMsHandler := connect.NewUnaryHandler( + InfoServiceVMsProcedure, + svc.VMs, + connect.WithSchema(infoServiceMethods.ByName("VMs")), connect.WithHandlerOptions(opts...), ) return "/info.v1.InfoService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { - case InfoServiceGetNodeVersionProcedure: - infoServiceGetNodeVersionHandler.ServeHTTP(w, r) - case InfoServiceGetNodeIDProcedure: - infoServiceGetNodeIDHandler.ServeHTTP(w, r) - case InfoServiceGetNodeIPProcedure: - infoServiceGetNodeIPHandler.ServeHTTP(w, r) - case InfoServiceGetNetworkIDProcedure: - infoServiceGetNetworkIDHandler.ServeHTTP(w, r) - case InfoServiceGetNetworkNameProcedure: - infoServiceGetNetworkNameHandler.ServeHTTP(w, r) - case InfoServiceGetBlockchainIDProcedure: - infoServiceGetBlockchainIDHandler.ServeHTTP(w, r) + case InfoServiceNodeVersionProcedure: + infoServiceNodeVersionHandler.ServeHTTP(w, r) + case InfoServiceNodeIDProcedure: + infoServiceNodeIDHandler.ServeHTTP(w, r) + case InfoServiceNodeIPProcedure: + infoServiceNodeIPHandler.ServeHTTP(w, r) + case InfoServiceNetworkIDProcedure: + infoServiceNetworkIDHandler.ServeHTTP(w, r) + case InfoServiceNetworkNameProcedure: + infoServiceNetworkNameHandler.ServeHTTP(w, r) + case InfoServiceBlockchainIDProcedure: + infoServiceBlockchainIDHandler.ServeHTTP(w, r) case InfoServicePeersProcedure: infoServicePeersHandler.ServeHTTP(w, r) case InfoServiceIsBootstrappedProcedure: @@ -340,8 +337,8 @@ func NewInfoServiceHandler(svc InfoServiceHandler, opts ...connect.HandlerOption infoServiceUpgradesHandler.ServeHTTP(w, r) case InfoServiceUptimeProcedure: infoServiceUptimeHandler.ServeHTTP(w, r) - case InfoServiceGetVMsProcedure: - infoServiceGetVMsHandler.ServeHTTP(w, r) + case InfoServiceVMsProcedure: + infoServiceVMsHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -351,28 +348,28 @@ func NewInfoServiceHandler(svc InfoServiceHandler, opts ...connect.HandlerOption // UnimplementedInfoServiceHandler returns CodeUnimplemented from all methods. type UnimplementedInfoServiceHandler struct{} -func (UnimplementedInfoServiceHandler) GetNodeVersion(context.Context, *connect.Request[v1.GetNodeVersionRequest]) (*connect.Response[v1.GetNodeVersionResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeVersion is not implemented")) +func (UnimplementedInfoServiceHandler) NodeVersion(context.Context, *connect.Request[v1.NodeVersionRequest]) (*connect.Response[v1.NodeVersionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.NodeVersion is not implemented")) } -func (UnimplementedInfoServiceHandler) GetNodeID(context.Context, *connect.Request[v1.GetNodeIDRequest]) (*connect.Response[v1.GetNodeIDResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeID is not implemented")) +func (UnimplementedInfoServiceHandler) NodeID(context.Context, *connect.Request[v1.NodeIDRequest]) (*connect.Response[v1.NodeIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.NodeID is not implemented")) } -func (UnimplementedInfoServiceHandler) GetNodeIP(context.Context, *connect.Request[v1.GetNodeIPRequest]) (*connect.Response[v1.GetNodeIPResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeIP is not implemented")) +func (UnimplementedInfoServiceHandler) NodeIP(context.Context, *connect.Request[v1.NodeIPRequest]) (*connect.Response[v1.NodeIPResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.NodeIP is not implemented")) } -func (UnimplementedInfoServiceHandler) GetNetworkID(context.Context, *connect.Request[v1.GetNetworkIDRequest]) (*connect.Response[v1.GetNetworkIDResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNetworkID is not implemented")) +func (UnimplementedInfoServiceHandler) NetworkID(context.Context, *connect.Request[v1.NetworkIDRequest]) (*connect.Response[v1.NetworkIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.NetworkID is not implemented")) } -func (UnimplementedInfoServiceHandler) GetNetworkName(context.Context, *connect.Request[v1.GetNetworkNameRequest]) (*connect.Response[v1.GetNetworkNameResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNetworkName is not implemented")) +func (UnimplementedInfoServiceHandler) NetworkName(context.Context, *connect.Request[v1.NetworkNameRequest]) (*connect.Response[v1.NetworkNameResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.NetworkName is not implemented")) } -func (UnimplementedInfoServiceHandler) GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDRequest]) (*connect.Response[v1.GetBlockchainIDResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetBlockchainID is not implemented")) +func (UnimplementedInfoServiceHandler) BlockchainID(context.Context, *connect.Request[v1.BlockchainIDRequest]) (*connect.Response[v1.BlockchainIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.BlockchainID is not implemented")) } func (UnimplementedInfoServiceHandler) Peers(context.Context, *connect.Request[v1.PeersRequest]) (*connect.Response[v1.PeersResponse], error) { @@ -391,6 +388,6 @@ func (UnimplementedInfoServiceHandler) Uptime(context.Context, *connect.Request[ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.Uptime is not implemented")) } -func (UnimplementedInfoServiceHandler) GetVMs(context.Context, *connect.Request[v1.GetVMsRequest]) (*connect.Response[v1.GetVMsResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetVMs is not implemented")) +func (UnimplementedInfoServiceHandler) VMs(context.Context, *connect.Request[v1.VMsRequest]) (*connect.Response[v1.VMsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.VMs is not implemented")) } diff --git a/proto/pb/info/v1/service.pb.go b/proto/pb/info/v1/service.pb.go index 0d8e023b3ecd..ade53377afab 100644 --- a/proto/pb/info/v1/service.pb.go +++ b/proto/pb/info/v1/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc (unknown) +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: info/v1/service.proto package infov1 @@ -12,6 +12,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -21,26 +22,26 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type GetNodeVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type NodeVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNodeVersionRequest) Reset() { - *x = GetNodeVersionRequest{} +func (x *NodeVersionRequest) Reset() { + *x = NodeVersionRequest{} mi := &file_info_v1_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNodeVersionRequest) String() string { +func (x *NodeVersionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNodeVersionRequest) ProtoMessage() {} +func (*NodeVersionRequest) ProtoMessage() {} -func (x *GetNodeVersionRequest) ProtoReflect() protoreflect.Message { +func (x *NodeVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -52,37 +53,36 @@ func (x *GetNodeVersionRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNodeVersionRequest.ProtoReflect.Descriptor instead. -func (*GetNodeVersionRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use NodeVersionRequest.ProtoReflect.Descriptor instead. +func (*NodeVersionRequest) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{0} } -type GetNodeVersionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - DatabaseVersion string `protobuf:"bytes,2,opt,name=database_version,json=databaseVersion,proto3" json:"database_version,omitempty"` - RpcProtocolVersion uint32 `protobuf:"varint,3,opt,name=rpc_protocol_version,json=rpcProtocolVersion,proto3" json:"rpc_protocol_version,omitempty"` - GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` - VmVersions map[string]string `protobuf:"bytes,5,rep,name=vm_versions,json=vmVersions,proto3" json:"vm_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +type NodeVersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + DatabaseVersion string `protobuf:"bytes,2,opt,name=database_version,json=databaseVersion,proto3" json:"database_version,omitempty"` + RpcProtocolVersion uint32 `protobuf:"varint,3,opt,name=rpc_protocol_version,json=rpcProtocolVersion,proto3" json:"rpc_protocol_version,omitempty"` + GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` + VmVersions map[string]string `protobuf:"bytes,5,rep,name=vm_versions,json=vmVersions,proto3" json:"vm_versions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNodeVersionResponse) Reset() { - *x = GetNodeVersionResponse{} +func (x *NodeVersionResponse) Reset() { + *x = NodeVersionResponse{} mi := &file_info_v1_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNodeVersionResponse) String() string { +func (x *NodeVersionResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNodeVersionResponse) ProtoMessage() {} +func (*NodeVersionResponse) ProtoMessage() {} -func (x *GetNodeVersionResponse) ProtoReflect() protoreflect.Message { +func (x *NodeVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -94,66 +94,66 @@ func (x *GetNodeVersionResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNodeVersionResponse.ProtoReflect.Descriptor instead. -func (*GetNodeVersionResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use NodeVersionResponse.ProtoReflect.Descriptor instead. +func (*NodeVersionResponse) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{1} } -func (x *GetNodeVersionResponse) GetVersion() string { +func (x *NodeVersionResponse) GetVersion() string { if x != nil { return x.Version } return "" } -func (x *GetNodeVersionResponse) GetDatabaseVersion() string { +func (x *NodeVersionResponse) GetDatabaseVersion() string { if x != nil { return x.DatabaseVersion } return "" } -func (x *GetNodeVersionResponse) GetRpcProtocolVersion() uint32 { +func (x *NodeVersionResponse) GetRpcProtocolVersion() uint32 { if x != nil { return x.RpcProtocolVersion } return 0 } -func (x *GetNodeVersionResponse) GetGitCommit() string { +func (x *NodeVersionResponse) GetGitCommit() string { if x != nil { return x.GitCommit } return "" } -func (x *GetNodeVersionResponse) GetVmVersions() map[string]string { +func (x *NodeVersionResponse) GetVmVersions() map[string]string { if x != nil { return x.VmVersions } return nil } -type GetNodeIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type NodeIDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNodeIDRequest) Reset() { - *x = GetNodeIDRequest{} +func (x *NodeIDRequest) Reset() { + *x = NodeIDRequest{} mi := &file_info_v1_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNodeIDRequest) String() string { +func (x *NodeIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNodeIDRequest) ProtoMessage() {} +func (*NodeIDRequest) ProtoMessage() {} -func (x *GetNodeIDRequest) ProtoReflect() protoreflect.Message { +func (x *NodeIDRequest) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -165,34 +165,33 @@ func (x *GetNodeIDRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNodeIDRequest.ProtoReflect.Descriptor instead. -func (*GetNodeIDRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use NodeIDRequest.ProtoReflect.Descriptor instead. +func (*NodeIDRequest) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{2} } -type GetNodeIDResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - NodePop []byte `protobuf:"bytes,2,opt,name=node_pop,json=nodePop,proto3" json:"node_pop,omitempty"` +type ProofOfPossession struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + ProofOfPossession string `protobuf:"bytes,2,opt,name=proofOfPossession,proto3" json:"proofOfPossession,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNodeIDResponse) Reset() { - *x = GetNodeIDResponse{} +func (x *ProofOfPossession) Reset() { + *x = ProofOfPossession{} mi := &file_info_v1_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNodeIDResponse) String() string { +func (x *ProofOfPossession) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNodeIDResponse) ProtoMessage() {} +func (*ProofOfPossession) ProtoMessage() {} -func (x *GetNodeIDResponse) ProtoReflect() protoreflect.Message { +func (x *ProofOfPossession) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -204,45 +203,47 @@ func (x *GetNodeIDResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNodeIDResponse.ProtoReflect.Descriptor instead. -func (*GetNodeIDResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ProofOfPossession.ProtoReflect.Descriptor instead. +func (*ProofOfPossession) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{3} } -func (x *GetNodeIDResponse) GetNodeId() string { +func (x *ProofOfPossession) GetPublicKey() string { if x != nil { - return x.NodeId + return x.PublicKey } return "" } -func (x *GetNodeIDResponse) GetNodePop() []byte { +func (x *ProofOfPossession) GetProofOfPossession() string { if x != nil { - return x.NodePop + return x.ProofOfPossession } - return nil + return "" } -type GetNodeIPRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type NodeIDResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + NodePop *ProofOfPossession `protobuf:"bytes,2,opt,name=node_pop,json=nodePop,proto3" json:"node_pop,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNodeIPRequest) Reset() { - *x = GetNodeIPRequest{} +func (x *NodeIDResponse) Reset() { + *x = NodeIDResponse{} mi := &file_info_v1_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNodeIPRequest) String() string { +func (x *NodeIDResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNodeIPRequest) ProtoMessage() {} +func (*NodeIDResponse) ProtoMessage() {} -func (x *GetNodeIPRequest) ProtoReflect() protoreflect.Message { +func (x *NodeIDResponse) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -254,33 +255,45 @@ func (x *GetNodeIPRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNodeIPRequest.ProtoReflect.Descriptor instead. -func (*GetNodeIPRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use NodeIDResponse.ProtoReflect.Descriptor instead. +func (*NodeIDResponse) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{4} } -type GetNodeIPResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *NodeIDResponse) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *NodeIDResponse) GetNodePop() *ProofOfPossession { + if x != nil { + return x.NodePop + } + return nil +} - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` +type NodeIPRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNodeIPResponse) Reset() { - *x = GetNodeIPResponse{} +func (x *NodeIPRequest) Reset() { + *x = NodeIPRequest{} mi := &file_info_v1_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNodeIPResponse) String() string { +func (x *NodeIPRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNodeIPResponse) ProtoMessage() {} +func (*NodeIPRequest) ProtoMessage() {} -func (x *GetNodeIPResponse) ProtoReflect() protoreflect.Message { +func (x *NodeIPRequest) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -292,38 +305,32 @@ func (x *GetNodeIPResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNodeIPResponse.ProtoReflect.Descriptor instead. -func (*GetNodeIPResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use NodeIPRequest.ProtoReflect.Descriptor instead. +func (*NodeIPRequest) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{5} } -func (x *GetNodeIPResponse) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -type GetNetworkIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type NodeIPResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNetworkIDRequest) Reset() { - *x = GetNetworkIDRequest{} +func (x *NodeIPResponse) Reset() { + *x = NodeIPResponse{} mi := &file_info_v1_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNetworkIDRequest) String() string { +func (x *NodeIPResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNetworkIDRequest) ProtoMessage() {} +func (*NodeIPResponse) ProtoMessage() {} -func (x *GetNetworkIDRequest) ProtoReflect() protoreflect.Message { +func (x *NodeIPResponse) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -335,33 +342,38 @@ func (x *GetNetworkIDRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNetworkIDRequest.ProtoReflect.Descriptor instead. -func (*GetNetworkIDRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use NodeIPResponse.ProtoReflect.Descriptor instead. +func (*NodeIPResponse) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{6} } -type GetNetworkIDResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *NodeIPResponse) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} - NetworkId uint32 `protobuf:"varint,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` +type NetworkIDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNetworkIDResponse) Reset() { - *x = GetNetworkIDResponse{} +func (x *NetworkIDRequest) Reset() { + *x = NetworkIDRequest{} mi := &file_info_v1_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNetworkIDResponse) String() string { +func (x *NetworkIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNetworkIDResponse) ProtoMessage() {} +func (*NetworkIDRequest) ProtoMessage() {} -func (x *GetNetworkIDResponse) ProtoReflect() protoreflect.Message { +func (x *NetworkIDRequest) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -373,38 +385,32 @@ func (x *GetNetworkIDResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNetworkIDResponse.ProtoReflect.Descriptor instead. -func (*GetNetworkIDResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use NetworkIDRequest.ProtoReflect.Descriptor instead. +func (*NetworkIDRequest) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{7} } -func (x *GetNetworkIDResponse) GetNetworkId() uint32 { - if x != nil { - return x.NetworkId - } - return 0 -} - -type GetNetworkNameRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type NetworkIDResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + NetworkId uint32 `protobuf:"varint,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNetworkNameRequest) Reset() { - *x = GetNetworkNameRequest{} +func (x *NetworkIDResponse) Reset() { + *x = NetworkIDResponse{} mi := &file_info_v1_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNetworkNameRequest) String() string { +func (x *NetworkIDResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNetworkNameRequest) ProtoMessage() {} +func (*NetworkIDResponse) ProtoMessage() {} -func (x *GetNetworkNameRequest) ProtoReflect() protoreflect.Message { +func (x *NetworkIDResponse) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -416,33 +422,38 @@ func (x *GetNetworkNameRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNetworkNameRequest.ProtoReflect.Descriptor instead. -func (*GetNetworkNameRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use NetworkIDResponse.ProtoReflect.Descriptor instead. +func (*NetworkIDResponse) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{8} } -type GetNetworkNameResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *NetworkIDResponse) GetNetworkId() uint32 { + if x != nil { + return x.NetworkId + } + return 0 +} - NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` +type NetworkNameRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetNetworkNameResponse) Reset() { - *x = GetNetworkNameResponse{} +func (x *NetworkNameRequest) Reset() { + *x = NetworkNameRequest{} mi := &file_info_v1_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetNetworkNameResponse) String() string { +func (x *NetworkNameRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetNetworkNameResponse) ProtoMessage() {} +func (*NetworkNameRequest) ProtoMessage() {} -func (x *GetNetworkNameResponse) ProtoReflect() protoreflect.Message { +func (x *NetworkNameRequest) ProtoReflect() protoreflect.Message { mi := &file_info_v1_service_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -454,41 +465,77 @@ func (x *GetNetworkNameResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetNetworkNameResponse.ProtoReflect.Descriptor instead. -func (*GetNetworkNameResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use NetworkNameRequest.ProtoReflect.Descriptor instead. +func (*NetworkNameRequest) Descriptor() ([]byte, []int) { return file_info_v1_service_proto_rawDescGZIP(), []int{9} } -func (x *GetNetworkNameResponse) GetNetworkName() string { +type NetworkNameResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NetworkNameResponse) Reset() { + *x = NetworkNameResponse{} + mi := &file_info_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NetworkNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkNameResponse) ProtoMessage() {} + +func (x *NetworkNameResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkNameResponse.ProtoReflect.Descriptor instead. +func (*NetworkNameResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *NetworkNameResponse) GetNetworkName() string { if x != nil { return x.NetworkName } return "" } -type GetBlockchainIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type BlockchainIDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` unknownFields protoimpl.UnknownFields - - Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetBlockchainIDRequest) Reset() { - *x = GetBlockchainIDRequest{} - mi := &file_info_v1_service_proto_msgTypes[10] +func (x *BlockchainIDRequest) Reset() { + *x = BlockchainIDRequest{} + mi := &file_info_v1_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetBlockchainIDRequest) String() string { +func (x *BlockchainIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBlockchainIDRequest) ProtoMessage() {} +func (*BlockchainIDRequest) ProtoMessage() {} -func (x *GetBlockchainIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[10] +func (x *BlockchainIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -499,41 +546,40 @@ func (x *GetBlockchainIDRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBlockchainIDRequest.ProtoReflect.Descriptor instead. -func (*GetBlockchainIDRequest) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{10} +// Deprecated: Use BlockchainIDRequest.ProtoReflect.Descriptor instead. +func (*BlockchainIDRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{11} } -func (x *GetBlockchainIDRequest) GetAlias() string { +func (x *BlockchainIDRequest) GetAlias() string { if x != nil { return x.Alias } return "" } -type GetBlockchainIDResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type BlockchainIDResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockchainId string `protobuf:"bytes,1,opt,name=blockchain_id,json=blockchainId,proto3" json:"blockchain_id,omitempty"` unknownFields protoimpl.UnknownFields - - BlockchainId string `protobuf:"bytes,1,opt,name=blockchain_id,json=blockchainId,proto3" json:"blockchain_id,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetBlockchainIDResponse) Reset() { - *x = GetBlockchainIDResponse{} - mi := &file_info_v1_service_proto_msgTypes[11] +func (x *BlockchainIDResponse) Reset() { + *x = BlockchainIDResponse{} + mi := &file_info_v1_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetBlockchainIDResponse) String() string { +func (x *BlockchainIDResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBlockchainIDResponse) ProtoMessage() {} +func (*BlockchainIDResponse) ProtoMessage() {} -func (x *GetBlockchainIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[11] +func (x *BlockchainIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -544,12 +590,12 @@ func (x *GetBlockchainIDResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBlockchainIDResponse.ProtoReflect.Descriptor instead. -func (*GetBlockchainIDResponse) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{11} +// Deprecated: Use BlockchainIDResponse.ProtoReflect.Descriptor instead. +func (*BlockchainIDResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{12} } -func (x *GetBlockchainIDResponse) GetBlockchainId() string { +func (x *BlockchainIDResponse) GetBlockchainId() string { if x != nil { return x.BlockchainId } @@ -557,16 +603,15 @@ func (x *GetBlockchainIDResponse) GetBlockchainId() string { } type PeersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + NodeIds []string `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` unknownFields protoimpl.UnknownFields - - NodeIds []string `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PeersRequest) Reset() { *x = PeersRequest{} - mi := &file_info_v1_service_proto_msgTypes[12] + mi := &file_info_v1_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -578,7 +623,7 @@ func (x *PeersRequest) String() string { func (*PeersRequest) ProtoMessage() {} func (x *PeersRequest) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[12] + mi := &file_info_v1_service_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -591,7 +636,7 @@ func (x *PeersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PeersRequest.ProtoReflect.Descriptor instead. func (*PeersRequest) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{12} + return file_info_v1_service_proto_rawDescGZIP(), []int{13} } func (x *PeersRequest) GetNodeIds() []string { @@ -603,24 +648,23 @@ func (x *PeersRequest) GetNodeIds() []string { // PeerInfo provides metadata about a connected peer in the network type PeerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` - PublicIp string `protobuf:"bytes,2,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` - NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - LastSent string `protobuf:"bytes,5,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"` - LastReceived string `protobuf:"bytes,6,opt,name=last_received,json=lastReceived,proto3" json:"last_received,omitempty"` - Benched []string `protobuf:"bytes,7,rep,name=benched,proto3" json:"benched,omitempty"` - ObservedUptime uint32 `protobuf:"varint,8,opt,name=observed_uptime,json=observedUptime,proto3" json:"observed_uptime,omitempty"` - TrackedSubnets []string `protobuf:"bytes,9,rep,name=tracked_subnets,json=trackedSubnets,proto3" json:"tracked_subnets,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + PublicIp string `protobuf:"bytes,2,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` + NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + LastSent string `protobuf:"bytes,5,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"` + LastReceived string `protobuf:"bytes,6,opt,name=last_received,json=lastReceived,proto3" json:"last_received,omitempty"` + Benched []string `protobuf:"bytes,7,rep,name=benched,proto3" json:"benched,omitempty"` + ObservedUptime uint32 `protobuf:"varint,8,opt,name=observed_uptime,json=observedUptime,proto3" json:"observed_uptime,omitempty"` + TrackedSubnets []string `protobuf:"bytes,9,rep,name=tracked_subnets,json=trackedSubnets,proto3" json:"tracked_subnets,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PeerInfo) Reset() { *x = PeerInfo{} - mi := &file_info_v1_service_proto_msgTypes[13] + mi := &file_info_v1_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -632,7 +676,7 @@ func (x *PeerInfo) String() string { func (*PeerInfo) ProtoMessage() {} func (x *PeerInfo) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[13] + mi := &file_info_v1_service_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -645,7 +689,7 @@ func (x *PeerInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead. func (*PeerInfo) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{13} + return file_info_v1_service_proto_rawDescGZIP(), []int{14} } func (x *PeerInfo) GetIp() string { @@ -712,17 +756,16 @@ func (x *PeerInfo) GetTrackedSubnets() []string { } type PeersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + NumPeers uint32 `protobuf:"varint,1,opt,name=num_peers,json=numPeers,proto3" json:"num_peers,omitempty"` + Peers []*PeerInfo `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` unknownFields protoimpl.UnknownFields - - NumPeers uint32 `protobuf:"varint,1,opt,name=num_peers,json=numPeers,proto3" json:"num_peers,omitempty"` - Peers []*PeerInfo `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PeersResponse) Reset() { *x = PeersResponse{} - mi := &file_info_v1_service_proto_msgTypes[14] + mi := &file_info_v1_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -734,7 +777,7 @@ func (x *PeersResponse) String() string { func (*PeersResponse) ProtoMessage() {} func (x *PeersResponse) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[14] + mi := &file_info_v1_service_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -747,7 +790,7 @@ func (x *PeersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PeersResponse.ProtoReflect.Descriptor instead. func (*PeersResponse) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{14} + return file_info_v1_service_proto_rawDescGZIP(), []int{15} } func (x *PeersResponse) GetNumPeers() uint32 { @@ -765,18 +808,16 @@ func (x *PeersResponse) GetPeers() []*PeerInfo { } type IsBootstrappedRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Alias of the chain - // Can also be the string representation of the chain's ID - Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IsBootstrappedRequest) Reset() { *x = IsBootstrappedRequest{} - mi := &file_info_v1_service_proto_msgTypes[15] + mi := &file_info_v1_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -788,7 +829,7 @@ func (x *IsBootstrappedRequest) String() string { func (*IsBootstrappedRequest) ProtoMessage() {} func (x *IsBootstrappedRequest) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[15] + mi := &file_info_v1_service_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -801,7 +842,7 @@ func (x *IsBootstrappedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IsBootstrappedRequest.ProtoReflect.Descriptor instead. func (*IsBootstrappedRequest) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{15} + return file_info_v1_service_proto_rawDescGZIP(), []int{16} } func (x *IsBootstrappedRequest) GetChain() string { @@ -812,17 +853,16 @@ func (x *IsBootstrappedRequest) GetChain() string { } type IsBootstrappedResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // True iff the chain exists and is done bootstrapping IsBootstrapped bool `protobuf:"varint,1,opt,name=is_bootstrapped,json=isBootstrapped,proto3" json:"is_bootstrapped,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IsBootstrappedResponse) Reset() { *x = IsBootstrappedResponse{} - mi := &file_info_v1_service_proto_msgTypes[16] + mi := &file_info_v1_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -834,7 +874,7 @@ func (x *IsBootstrappedResponse) String() string { func (*IsBootstrappedResponse) ProtoMessage() {} func (x *IsBootstrappedResponse) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[16] + mi := &file_info_v1_service_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -847,7 +887,7 @@ func (x *IsBootstrappedResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use IsBootstrappedResponse.ProtoReflect.Descriptor instead. func (*IsBootstrappedResponse) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{16} + return file_info_v1_service_proto_rawDescGZIP(), []int{17} } func (x *IsBootstrappedResponse) GetIsBootstrapped() bool { @@ -858,14 +898,14 @@ func (x *IsBootstrappedResponse) GetIsBootstrapped() bool { } type UpgradesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpgradesRequest) Reset() { *x = UpgradesRequest{} - mi := &file_info_v1_service_proto_msgTypes[17] + mi := &file_info_v1_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -877,7 +917,7 @@ func (x *UpgradesRequest) String() string { func (*UpgradesRequest) ProtoMessage() {} func (x *UpgradesRequest) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[17] + mi := &file_info_v1_service_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -890,14 +930,11 @@ func (x *UpgradesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpgradesRequest.ProtoReflect.Descriptor instead. func (*UpgradesRequest) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{17} + return file_info_v1_service_proto_rawDescGZIP(), []int{18} } type UpgradesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` ApricotPhase1Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=apricot_phase1_time,json=apricotPhase1Time,proto3" json:"apricot_phase1_time,omitempty"` ApricotPhase2Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=apricot_phase2_time,json=apricotPhase2Time,proto3" json:"apricot_phase2_time,omitempty"` ApricotPhase3Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=apricot_phase3_time,json=apricotPhase3Time,proto3" json:"apricot_phase3_time,omitempty"` @@ -914,11 +951,13 @@ type UpgradesResponse struct { EtnaTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=etna_time,json=etnaTime,proto3" json:"etna_time,omitempty"` FortunaTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=fortuna_time,json=fortunaTime,proto3" json:"fortuna_time,omitempty"` GraniteTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=granite_time,json=graniteTime,proto3" json:"granite_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpgradesResponse) Reset() { *x = UpgradesResponse{} - mi := &file_info_v1_service_proto_msgTypes[18] + mi := &file_info_v1_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -930,7 +969,7 @@ func (x *UpgradesResponse) String() string { func (*UpgradesResponse) ProtoMessage() {} func (x *UpgradesResponse) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[18] + mi := &file_info_v1_service_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -943,7 +982,7 @@ func (x *UpgradesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpgradesResponse.ProtoReflect.Descriptor instead. func (*UpgradesResponse) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{18} + return file_info_v1_service_proto_rawDescGZIP(), []int{19} } func (x *UpgradesResponse) GetApricotPhase1Time() *timestamppb.Timestamp { @@ -1059,14 +1098,14 @@ func (x *UpgradesResponse) GetGraniteTime() *timestamppb.Timestamp { } type UptimeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UptimeRequest) Reset() { *x = UptimeRequest{} - mi := &file_info_v1_service_proto_msgTypes[19] + mi := &file_info_v1_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1078,7 +1117,7 @@ func (x *UptimeRequest) String() string { func (*UptimeRequest) ProtoMessage() {} func (x *UptimeRequest) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[19] + mi := &file_info_v1_service_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1091,21 +1130,20 @@ func (x *UptimeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UptimeRequest.ProtoReflect.Descriptor instead. func (*UptimeRequest) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{19} + return file_info_v1_service_proto_rawDescGZIP(), []int{20} } type UptimeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RewardingStakePercentage float64 `protobuf:"fixed64,1,opt,name=rewarding_stake_percentage,json=rewardingStakePercentage,proto3" json:"rewarding_stake_percentage,omitempty"` - WeightedAveragePercentage float64 `protobuf:"fixed64,2,opt,name=weighted_average_percentage,json=weightedAveragePercentage,proto3" json:"weighted_average_percentage,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RewardingStakePercentage float64 `protobuf:"fixed64,1,opt,name=rewarding_stake_percentage,json=rewardingStakePercentage,proto3" json:"rewarding_stake_percentage,omitempty"` + WeightedAveragePercentage float64 `protobuf:"fixed64,2,opt,name=weighted_average_percentage,json=weightedAveragePercentage,proto3" json:"weighted_average_percentage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UptimeResponse) Reset() { *x = UptimeResponse{} - mi := &file_info_v1_service_proto_msgTypes[20] + mi := &file_info_v1_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1117,7 +1155,7 @@ func (x *UptimeResponse) String() string { func (*UptimeResponse) ProtoMessage() {} func (x *UptimeResponse) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[20] + mi := &file_info_v1_service_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1130,7 +1168,7 @@ func (x *UptimeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UptimeResponse.ProtoReflect.Descriptor instead. func (*UptimeResponse) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{20} + return file_info_v1_service_proto_rawDescGZIP(), []int{21} } func (x *UptimeResponse) GetRewardingStakePercentage() float64 { @@ -1147,27 +1185,27 @@ func (x *UptimeResponse) GetWeightedAveragePercentage() float64 { return 0 } -type GetVMsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type VMsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetVMsRequest) Reset() { - *x = GetVMsRequest{} - mi := &file_info_v1_service_proto_msgTypes[21] +func (x *VMsRequest) Reset() { + *x = VMsRequest{} + mi := &file_info_v1_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetVMsRequest) String() string { +func (x *VMsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetVMsRequest) ProtoMessage() {} +func (*VMsRequest) ProtoMessage() {} -func (x *GetVMsRequest) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[21] +func (x *VMsRequest) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1178,35 +1216,34 @@ func (x *GetVMsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetVMsRequest.ProtoReflect.Descriptor instead. -func (*GetVMsRequest) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{21} +// Deprecated: Use VMsRequest.ProtoReflect.Descriptor instead. +func (*VMsRequest) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{22} } -type GetVMsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type VMsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vms map[string]*VMAliases `protobuf:"bytes,1,rep,name=vms,proto3" json:"vms,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Fxs map[string]string `protobuf:"bytes,2,rep,name=fxs,proto3" json:"fxs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Vms map[string]*VMAliases `protobuf:"bytes,1,rep,name=vms,proto3" json:"vms,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Fxs map[string]string `protobuf:"bytes,2,rep,name=fxs,proto3" json:"fxs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } -func (x *GetVMsResponse) Reset() { - *x = GetVMsResponse{} - mi := &file_info_v1_service_proto_msgTypes[22] +func (x *VMsResponse) Reset() { + *x = VMsResponse{} + mi := &file_info_v1_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetVMsResponse) String() string { +func (x *VMsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetVMsResponse) ProtoMessage() {} +func (*VMsResponse) ProtoMessage() {} -func (x *GetVMsResponse) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[22] +func (x *VMsResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1217,19 +1254,19 @@ func (x *GetVMsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetVMsResponse.ProtoReflect.Descriptor instead. -func (*GetVMsResponse) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{22} +// Deprecated: Use VMsResponse.ProtoReflect.Descriptor instead. +func (*VMsResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{23} } -func (x *GetVMsResponse) GetVms() map[string]*VMAliases { +func (x *VMsResponse) GetVms() map[string]*VMAliases { if x != nil { return x.Vms } return nil } -func (x *GetVMsResponse) GetFxs() map[string]string { +func (x *VMsResponse) GetFxs() map[string]string { if x != nil { return x.Fxs } @@ -1237,16 +1274,15 @@ func (x *GetVMsResponse) GetFxs() map[string]string { } type VMAliases struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` unknownFields protoimpl.UnknownFields - - Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` + sizeCache protoimpl.SizeCache } func (x *VMAliases) Reset() { *x = VMAliases{} - mi := &file_info_v1_service_proto_msgTypes[23] + mi := &file_info_v1_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1258,7 +1294,7 @@ func (x *VMAliases) String() string { func (*VMAliases) ProtoMessage() {} func (x *VMAliases) ProtoReflect() protoreflect.Message { - mi := &file_info_v1_service_proto_msgTypes[23] + mi := &file_info_v1_service_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1271,7 +1307,7 @@ func (x *VMAliases) ProtoReflect() protoreflect.Message { // Deprecated: Use VMAliases.ProtoReflect.Descriptor instead. func (*VMAliases) Descriptor() ([]byte, []int) { - return file_info_v1_service_proto_rawDescGZIP(), []int{23} + return file_info_v1_service_proto_rawDescGZIP(), []int{24} } func (x *VMAliases) GetAliases() []string { @@ -1283,342 +1319,203 @@ func (x *VMAliases) GetAliases() []string { var File_info_v1_service_proto protoreflect.FileDescriptor -var file_info_v1_service_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xbf, 0x02, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x29, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x70, - 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, - 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x0b, 0x76, - 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x56, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0a, 0x76, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, - 0x0f, 0x56, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x12, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x47, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x70, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x23, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, - 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, - 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, - 0x73, 0x22, 0x98, 0x02, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1b, - 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, - 0x64, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, - 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x55, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x73, - 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, - 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x0d, - 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x65, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x6e, 0x66, 0x6f, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x70, 0x65, - 0x65, 0x72, 0x73, 0x22, 0x2d, 0x0a, 0x15, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x16, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfe, 0x08, 0x0a, 0x10, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, - 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x31, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, - 0x68, 0x61, 0x73, 0x65, 0x31, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, - 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x32, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, - 0x32, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x33, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, - 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x33, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, - 0x73, 0x65, 0x34, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, - 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, - 0x21, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x34, 0x5f, - 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1c, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, - 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x34, 0x4d, 0x69, 0x6e, 0x50, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, - 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x35, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x35, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x17, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, - 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x36, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x14, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x50, 0x72, 0x65, - 0x36, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x36, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, - 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x36, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x53, 0x0a, 0x18, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, - 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x36, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x15, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x50, 0x6f, 0x73, - 0x74, 0x36, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x66, 0x66, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x66, 0x66, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x41, 0x0a, 0x1e, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, 0x5f, 0x78, 0x5f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, - 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, - 0x61, 0x58, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x6f, 0x70, 0x56, 0x65, 0x72, 0x74, 0x65, - 0x78, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x75, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x74, 0x6e, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x08, 0x65, 0x74, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x66, - 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x66, - 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x67, 0x72, - 0x61, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x67, 0x72, - 0x61, 0x6e, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x55, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x0e, 0x55, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, - 0x1a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x18, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x19, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, - 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfc, 0x01, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x32, 0x0a, 0x03, 0x76, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, - 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, - 0x76, 0x6d, 0x73, 0x12, 0x32, 0x0a, 0x03, 0x66, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x78, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x03, 0x66, 0x78, 0x73, 0x1a, 0x4a, 0x0a, 0x08, 0x56, 0x6d, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x36, 0x0a, 0x08, 0x46, 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x09, 0x56, - 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x65, 0x73, 0x32, 0xa0, 0x06, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x44, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, - 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x47, 0x65, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, - 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x44, 0x12, 0x1c, 0x2e, - 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, - 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x69, - 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, - 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, - 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x15, 0x2e, 0x69, - 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x49, - 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x1e, 0x2e, - 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, - 0x0a, 0x08, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x69, 0x6e, 0x66, - 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x39, 0x0a, 0x06, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x69, 0x6e, 0x66, 0x6f, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x47, 0x65, - 0x74, 0x56, 0x4d, 0x73, 0x12, 0x16, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, - 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, - 0x62, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x66, 0x6f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_info_v1_service_proto_rawDesc = "" + + "\n" + + "\x15info/v1/service.proto\x12\ainfo.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x14\n" + + "\x12NodeVersionRequest\"\xb9\x02\n" + + "\x13NodeVersionResponse\x12\x18\n" + + "\aversion\x18\x01 \x01(\tR\aversion\x12)\n" + + "\x10database_version\x18\x02 \x01(\tR\x0fdatabaseVersion\x120\n" + + "\x14rpc_protocol_version\x18\x03 \x01(\rR\x12rpcProtocolVersion\x12\x1d\n" + + "\n" + + "git_commit\x18\x04 \x01(\tR\tgitCommit\x12M\n" + + "\vvm_versions\x18\x05 \x03(\v2,.info.v1.NodeVersionResponse.VmVersionsEntryR\n" + + "vmVersions\x1a=\n" + + "\x0fVmVersionsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x0f\n" + + "\rNodeIDRequest\"_\n" + + "\x11ProofOfPossession\x12\x1c\n" + + "\tpublicKey\x18\x01 \x01(\tR\tpublicKey\x12,\n" + + "\x11proofOfPossession\x18\x02 \x01(\tR\x11proofOfPossession\"`\n" + + "\x0eNodeIDResponse\x12\x17\n" + + "\anode_id\x18\x01 \x01(\tR\x06nodeId\x125\n" + + "\bnode_pop\x18\x02 \x01(\v2\x1a.info.v1.ProofOfPossessionR\anodePop\"\x0f\n" + + "\rNodeIPRequest\" \n" + + "\x0eNodeIPResponse\x12\x0e\n" + + "\x02ip\x18\x01 \x01(\tR\x02ip\"\x12\n" + + "\x10NetworkIDRequest\"2\n" + + "\x11NetworkIDResponse\x12\x1d\n" + + "\n" + + "network_id\x18\x01 \x01(\rR\tnetworkId\"\x14\n" + + "\x12NetworkNameRequest\"8\n" + + "\x13NetworkNameResponse\x12!\n" + + "\fnetwork_name\x18\x01 \x01(\tR\vnetworkName\"+\n" + + "\x13BlockchainIDRequest\x12\x14\n" + + "\x05alias\x18\x01 \x01(\tR\x05alias\";\n" + + "\x14BlockchainIDResponse\x12#\n" + + "\rblockchain_id\x18\x01 \x01(\tR\fblockchainId\")\n" + + "\fPeersRequest\x12\x19\n" + + "\bnode_ids\x18\x01 \x03(\tR\anodeIds\"\x98\x02\n" + + "\bPeerInfo\x12\x0e\n" + + "\x02ip\x18\x01 \x01(\tR\x02ip\x12\x1b\n" + + "\tpublic_ip\x18\x02 \x01(\tR\bpublicIp\x12\x17\n" + + "\anode_id\x18\x03 \x01(\tR\x06nodeId\x12\x18\n" + + "\aversion\x18\x04 \x01(\tR\aversion\x12\x1b\n" + + "\tlast_sent\x18\x05 \x01(\tR\blastSent\x12#\n" + + "\rlast_received\x18\x06 \x01(\tR\flastReceived\x12\x18\n" + + "\abenched\x18\a \x03(\tR\abenched\x12'\n" + + "\x0fobserved_uptime\x18\b \x01(\rR\x0eobservedUptime\x12'\n" + + "\x0ftracked_subnets\x18\t \x03(\tR\x0etrackedSubnets\"U\n" + + "\rPeersResponse\x12\x1b\n" + + "\tnum_peers\x18\x01 \x01(\rR\bnumPeers\x12'\n" + + "\x05peers\x18\x02 \x03(\v2\x11.info.v1.PeerInfoR\x05peers\"-\n" + + "\x15IsBootstrappedRequest\x12\x14\n" + + "\x05chain\x18\x01 \x01(\tR\x05chain\"A\n" + + "\x16IsBootstrappedResponse\x12'\n" + + "\x0fis_bootstrapped\x18\x01 \x01(\bR\x0eisBootstrapped\"\x11\n" + + "\x0fUpgradesRequest\"\xfe\b\n" + + "\x10UpgradesResponse\x12J\n" + + "\x13apricot_phase1_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x11apricotPhase1Time\x12J\n" + + "\x13apricot_phase2_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x11apricotPhase2Time\x12J\n" + + "\x13apricot_phase3_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x11apricotPhase3Time\x12J\n" + + "\x13apricot_phase4_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x11apricotPhase4Time\x12G\n" + + "!apricot_phase4_min_p_chain_height\x18\x05 \x01(\x04R\x1capricotPhase4MinPChainHeight\x12J\n" + + "\x13apricot_phase5_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x11apricotPhase5Time\x12Q\n" + + "\x17apricot_phase_pre6_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x14apricotPhasePre6Time\x12J\n" + + "\x13apricot_phase6_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\x11apricotPhase6Time\x12S\n" + + "\x18apricot_phase_post6_time\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\x15apricotPhasePost6Time\x129\n" + + "\n" + + "banff_time\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tbanffTime\x12=\n" + + "\fcortina_time\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\vcortinaTime\x12A\n" + + "\x1ecortina_x_chain_stop_vertex_id\x18\f \x01(\tR\x19cortinaXChainStopVertexId\x12=\n" + + "\fdurango_time\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\vdurangoTime\x127\n" + + "\tetna_time\x18\x0e \x01(\v2\x1a.google.protobuf.TimestampR\betnaTime\x12=\n" + + "\ffortuna_time\x18\x0f \x01(\v2\x1a.google.protobuf.TimestampR\vfortunaTime\x12=\n" + + "\fgranite_time\x18\x10 \x01(\v2\x1a.google.protobuf.TimestampR\vgraniteTime\"\x0f\n" + + "\rUptimeRequest\"\x8e\x01\n" + + "\x0eUptimeResponse\x12<\n" + + "\x1arewarding_stake_percentage\x18\x01 \x01(\x01R\x18rewardingStakePercentage\x12>\n" + + "\x1bweighted_average_percentage\x18\x02 \x01(\x01R\x19weightedAveragePercentage\"\f\n" + + "\n" + + "VMsRequest\"\xf3\x01\n" + + "\vVMsResponse\x12/\n" + + "\x03vms\x18\x01 \x03(\v2\x1d.info.v1.VMsResponse.VmsEntryR\x03vms\x12/\n" + + "\x03fxs\x18\x02 \x03(\v2\x1d.info.v1.VMsResponse.FxsEntryR\x03fxs\x1aJ\n" + + "\bVmsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12(\n" + + "\x05value\x18\x02 \x01(\v2\x12.info.v1.VMAliasesR\x05value:\x028\x01\x1a6\n" + + "\bFxsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"%\n" + + "\tVMAliases\x12\x18\n" + + "\aaliases\x18\x01 \x03(\tR\aaliases2\xe1\x05\n" + + "\vInfoService\x12H\n" + + "\vNodeVersion\x12\x1b.info.v1.NodeVersionRequest\x1a\x1c.info.v1.NodeVersionResponse\x129\n" + + "\x06NodeID\x12\x16.info.v1.NodeIDRequest\x1a\x17.info.v1.NodeIDResponse\x129\n" + + "\x06NodeIP\x12\x16.info.v1.NodeIPRequest\x1a\x17.info.v1.NodeIPResponse\x12B\n" + + "\tNetworkID\x12\x19.info.v1.NetworkIDRequest\x1a\x1a.info.v1.NetworkIDResponse\x12H\n" + + "\vNetworkName\x12\x1b.info.v1.NetworkNameRequest\x1a\x1c.info.v1.NetworkNameResponse\x12K\n" + + "\fBlockchainID\x12\x1c.info.v1.BlockchainIDRequest\x1a\x1d.info.v1.BlockchainIDResponse\x126\n" + + "\x05Peers\x12\x15.info.v1.PeersRequest\x1a\x16.info.v1.PeersResponse\x12Q\n" + + "\x0eIsBootstrapped\x12\x1e.info.v1.IsBootstrappedRequest\x1a\x1f.info.v1.IsBootstrappedResponse\x12?\n" + + "\bUpgrades\x12\x18.info.v1.UpgradesRequest\x1a\x19.info.v1.UpgradesResponse\x129\n" + + "\x06Uptime\x12\x16.info.v1.UptimeRequest\x1a\x17.info.v1.UptimeResponse\x120\n" + + "\x03VMs\x12\x13.info.v1.VMsRequest\x1a\x14.info.v1.VMsResponseB9Z7github.com/ava-labs/avalanchego/proto/pb/info/v1;infov1b\x06proto3" var ( file_info_v1_service_proto_rawDescOnce sync.Once - file_info_v1_service_proto_rawDescData = file_info_v1_service_proto_rawDesc + file_info_v1_service_proto_rawDescData []byte ) func file_info_v1_service_proto_rawDescGZIP() []byte { file_info_v1_service_proto_rawDescOnce.Do(func() { - file_info_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_info_v1_service_proto_rawDescData) + file_info_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_info_v1_service_proto_rawDesc), len(file_info_v1_service_proto_rawDesc))) }) return file_info_v1_service_proto_rawDescData } -var file_info_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_info_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_info_v1_service_proto_goTypes = []any{ - (*GetNodeVersionRequest)(nil), // 0: info.v1.GetNodeVersionRequest - (*GetNodeVersionResponse)(nil), // 1: info.v1.GetNodeVersionResponse - (*GetNodeIDRequest)(nil), // 2: info.v1.GetNodeIDRequest - (*GetNodeIDResponse)(nil), // 3: info.v1.GetNodeIDResponse - (*GetNodeIPRequest)(nil), // 4: info.v1.GetNodeIPRequest - (*GetNodeIPResponse)(nil), // 5: info.v1.GetNodeIPResponse - (*GetNetworkIDRequest)(nil), // 6: info.v1.GetNetworkIDRequest - (*GetNetworkIDResponse)(nil), // 7: info.v1.GetNetworkIDResponse - (*GetNetworkNameRequest)(nil), // 8: info.v1.GetNetworkNameRequest - (*GetNetworkNameResponse)(nil), // 9: info.v1.GetNetworkNameResponse - (*GetBlockchainIDRequest)(nil), // 10: info.v1.GetBlockchainIDRequest - (*GetBlockchainIDResponse)(nil), // 11: info.v1.GetBlockchainIDResponse - (*PeersRequest)(nil), // 12: info.v1.PeersRequest - (*PeerInfo)(nil), // 13: info.v1.PeerInfo - (*PeersResponse)(nil), // 14: info.v1.PeersResponse - (*IsBootstrappedRequest)(nil), // 15: info.v1.IsBootstrappedRequest - (*IsBootstrappedResponse)(nil), // 16: info.v1.IsBootstrappedResponse - (*UpgradesRequest)(nil), // 17: info.v1.UpgradesRequest - (*UpgradesResponse)(nil), // 18: info.v1.UpgradesResponse - (*UptimeRequest)(nil), // 19: info.v1.UptimeRequest - (*UptimeResponse)(nil), // 20: info.v1.UptimeResponse - (*GetVMsRequest)(nil), // 21: info.v1.GetVMsRequest - (*GetVMsResponse)(nil), // 22: info.v1.GetVMsResponse - (*VMAliases)(nil), // 23: info.v1.VMAliases - nil, // 24: info.v1.GetNodeVersionResponse.VmVersionsEntry - nil, // 25: info.v1.GetVMsResponse.VmsEntry - nil, // 26: info.v1.GetVMsResponse.FxsEntry - (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp + (*NodeVersionRequest)(nil), // 0: info.v1.NodeVersionRequest + (*NodeVersionResponse)(nil), // 1: info.v1.NodeVersionResponse + (*NodeIDRequest)(nil), // 2: info.v1.NodeIDRequest + (*ProofOfPossession)(nil), // 3: info.v1.ProofOfPossession + (*NodeIDResponse)(nil), // 4: info.v1.NodeIDResponse + (*NodeIPRequest)(nil), // 5: info.v1.NodeIPRequest + (*NodeIPResponse)(nil), // 6: info.v1.NodeIPResponse + (*NetworkIDRequest)(nil), // 7: info.v1.NetworkIDRequest + (*NetworkIDResponse)(nil), // 8: info.v1.NetworkIDResponse + (*NetworkNameRequest)(nil), // 9: info.v1.NetworkNameRequest + (*NetworkNameResponse)(nil), // 10: info.v1.NetworkNameResponse + (*BlockchainIDRequest)(nil), // 11: info.v1.BlockchainIDRequest + (*BlockchainIDResponse)(nil), // 12: info.v1.BlockchainIDResponse + (*PeersRequest)(nil), // 13: info.v1.PeersRequest + (*PeerInfo)(nil), // 14: info.v1.PeerInfo + (*PeersResponse)(nil), // 15: info.v1.PeersResponse + (*IsBootstrappedRequest)(nil), // 16: info.v1.IsBootstrappedRequest + (*IsBootstrappedResponse)(nil), // 17: info.v1.IsBootstrappedResponse + (*UpgradesRequest)(nil), // 18: info.v1.UpgradesRequest + (*UpgradesResponse)(nil), // 19: info.v1.UpgradesResponse + (*UptimeRequest)(nil), // 20: info.v1.UptimeRequest + (*UptimeResponse)(nil), // 21: info.v1.UptimeResponse + (*VMsRequest)(nil), // 22: info.v1.VMsRequest + (*VMsResponse)(nil), // 23: info.v1.VMsResponse + (*VMAliases)(nil), // 24: info.v1.VMAliases + nil, // 25: info.v1.NodeVersionResponse.VmVersionsEntry + nil, // 26: info.v1.VMsResponse.VmsEntry + nil, // 27: info.v1.VMsResponse.FxsEntry + (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp } var file_info_v1_service_proto_depIdxs = []int32{ - 24, // 0: info.v1.GetNodeVersionResponse.vm_versions:type_name -> info.v1.GetNodeVersionResponse.VmVersionsEntry - 13, // 1: info.v1.PeersResponse.peers:type_name -> info.v1.PeerInfo - 27, // 2: info.v1.UpgradesResponse.apricot_phase1_time:type_name -> google.protobuf.Timestamp - 27, // 3: info.v1.UpgradesResponse.apricot_phase2_time:type_name -> google.protobuf.Timestamp - 27, // 4: info.v1.UpgradesResponse.apricot_phase3_time:type_name -> google.protobuf.Timestamp - 27, // 5: info.v1.UpgradesResponse.apricot_phase4_time:type_name -> google.protobuf.Timestamp - 27, // 6: info.v1.UpgradesResponse.apricot_phase5_time:type_name -> google.protobuf.Timestamp - 27, // 7: info.v1.UpgradesResponse.apricot_phase_pre6_time:type_name -> google.protobuf.Timestamp - 27, // 8: info.v1.UpgradesResponse.apricot_phase6_time:type_name -> google.protobuf.Timestamp - 27, // 9: info.v1.UpgradesResponse.apricot_phase_post6_time:type_name -> google.protobuf.Timestamp - 27, // 10: info.v1.UpgradesResponse.banff_time:type_name -> google.protobuf.Timestamp - 27, // 11: info.v1.UpgradesResponse.cortina_time:type_name -> google.protobuf.Timestamp - 27, // 12: info.v1.UpgradesResponse.durango_time:type_name -> google.protobuf.Timestamp - 27, // 13: info.v1.UpgradesResponse.etna_time:type_name -> google.protobuf.Timestamp - 27, // 14: info.v1.UpgradesResponse.fortuna_time:type_name -> google.protobuf.Timestamp - 27, // 15: info.v1.UpgradesResponse.granite_time:type_name -> google.protobuf.Timestamp - 25, // 16: info.v1.GetVMsResponse.vms:type_name -> info.v1.GetVMsResponse.VmsEntry - 26, // 17: info.v1.GetVMsResponse.fxs:type_name -> info.v1.GetVMsResponse.FxsEntry - 23, // 18: info.v1.GetVMsResponse.VmsEntry.value:type_name -> info.v1.VMAliases - 0, // 19: info.v1.InfoService.GetNodeVersion:input_type -> info.v1.GetNodeVersionRequest - 2, // 20: info.v1.InfoService.GetNodeID:input_type -> info.v1.GetNodeIDRequest - 4, // 21: info.v1.InfoService.GetNodeIP:input_type -> info.v1.GetNodeIPRequest - 6, // 22: info.v1.InfoService.GetNetworkID:input_type -> info.v1.GetNetworkIDRequest - 8, // 23: info.v1.InfoService.GetNetworkName:input_type -> info.v1.GetNetworkNameRequest - 10, // 24: info.v1.InfoService.GetBlockchainID:input_type -> info.v1.GetBlockchainIDRequest - 12, // 25: info.v1.InfoService.Peers:input_type -> info.v1.PeersRequest - 15, // 26: info.v1.InfoService.IsBootstrapped:input_type -> info.v1.IsBootstrappedRequest - 17, // 27: info.v1.InfoService.Upgrades:input_type -> info.v1.UpgradesRequest - 19, // 28: info.v1.InfoService.Uptime:input_type -> info.v1.UptimeRequest - 21, // 29: info.v1.InfoService.GetVMs:input_type -> info.v1.GetVMsRequest - 1, // 30: info.v1.InfoService.GetNodeVersion:output_type -> info.v1.GetNodeVersionResponse - 3, // 31: info.v1.InfoService.GetNodeID:output_type -> info.v1.GetNodeIDResponse - 5, // 32: info.v1.InfoService.GetNodeIP:output_type -> info.v1.GetNodeIPResponse - 7, // 33: info.v1.InfoService.GetNetworkID:output_type -> info.v1.GetNetworkIDResponse - 9, // 34: info.v1.InfoService.GetNetworkName:output_type -> info.v1.GetNetworkNameResponse - 11, // 35: info.v1.InfoService.GetBlockchainID:output_type -> info.v1.GetBlockchainIDResponse - 14, // 36: info.v1.InfoService.Peers:output_type -> info.v1.PeersResponse - 16, // 37: info.v1.InfoService.IsBootstrapped:output_type -> info.v1.IsBootstrappedResponse - 18, // 38: info.v1.InfoService.Upgrades:output_type -> info.v1.UpgradesResponse - 20, // 39: info.v1.InfoService.Uptime:output_type -> info.v1.UptimeResponse - 22, // 40: info.v1.InfoService.GetVMs:output_type -> info.v1.GetVMsResponse - 30, // [30:41] is the sub-list for method output_type - 19, // [19:30] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 25, // 0: info.v1.NodeVersionResponse.vm_versions:type_name -> info.v1.NodeVersionResponse.VmVersionsEntry + 3, // 1: info.v1.NodeIDResponse.node_pop:type_name -> info.v1.ProofOfPossession + 14, // 2: info.v1.PeersResponse.peers:type_name -> info.v1.PeerInfo + 28, // 3: info.v1.UpgradesResponse.apricot_phase1_time:type_name -> google.protobuf.Timestamp + 28, // 4: info.v1.UpgradesResponse.apricot_phase2_time:type_name -> google.protobuf.Timestamp + 28, // 5: info.v1.UpgradesResponse.apricot_phase3_time:type_name -> google.protobuf.Timestamp + 28, // 6: info.v1.UpgradesResponse.apricot_phase4_time:type_name -> google.protobuf.Timestamp + 28, // 7: info.v1.UpgradesResponse.apricot_phase5_time:type_name -> google.protobuf.Timestamp + 28, // 8: info.v1.UpgradesResponse.apricot_phase_pre6_time:type_name -> google.protobuf.Timestamp + 28, // 9: info.v1.UpgradesResponse.apricot_phase6_time:type_name -> google.protobuf.Timestamp + 28, // 10: info.v1.UpgradesResponse.apricot_phase_post6_time:type_name -> google.protobuf.Timestamp + 28, // 11: info.v1.UpgradesResponse.banff_time:type_name -> google.protobuf.Timestamp + 28, // 12: info.v1.UpgradesResponse.cortina_time:type_name -> google.protobuf.Timestamp + 28, // 13: info.v1.UpgradesResponse.durango_time:type_name -> google.protobuf.Timestamp + 28, // 14: info.v1.UpgradesResponse.etna_time:type_name -> google.protobuf.Timestamp + 28, // 15: info.v1.UpgradesResponse.fortuna_time:type_name -> google.protobuf.Timestamp + 28, // 16: info.v1.UpgradesResponse.granite_time:type_name -> google.protobuf.Timestamp + 26, // 17: info.v1.VMsResponse.vms:type_name -> info.v1.VMsResponse.VmsEntry + 27, // 18: info.v1.VMsResponse.fxs:type_name -> info.v1.VMsResponse.FxsEntry + 24, // 19: info.v1.VMsResponse.VmsEntry.value:type_name -> info.v1.VMAliases + 0, // 20: info.v1.InfoService.NodeVersion:input_type -> info.v1.NodeVersionRequest + 2, // 21: info.v1.InfoService.NodeID:input_type -> info.v1.NodeIDRequest + 5, // 22: info.v1.InfoService.NodeIP:input_type -> info.v1.NodeIPRequest + 7, // 23: info.v1.InfoService.NetworkID:input_type -> info.v1.NetworkIDRequest + 9, // 24: info.v1.InfoService.NetworkName:input_type -> info.v1.NetworkNameRequest + 11, // 25: info.v1.InfoService.BlockchainID:input_type -> info.v1.BlockchainIDRequest + 13, // 26: info.v1.InfoService.Peers:input_type -> info.v1.PeersRequest + 16, // 27: info.v1.InfoService.IsBootstrapped:input_type -> info.v1.IsBootstrappedRequest + 18, // 28: info.v1.InfoService.Upgrades:input_type -> info.v1.UpgradesRequest + 20, // 29: info.v1.InfoService.Uptime:input_type -> info.v1.UptimeRequest + 22, // 30: info.v1.InfoService.VMs:input_type -> info.v1.VMsRequest + 1, // 31: info.v1.InfoService.NodeVersion:output_type -> info.v1.NodeVersionResponse + 4, // 32: info.v1.InfoService.NodeID:output_type -> info.v1.NodeIDResponse + 6, // 33: info.v1.InfoService.NodeIP:output_type -> info.v1.NodeIPResponse + 8, // 34: info.v1.InfoService.NetworkID:output_type -> info.v1.NetworkIDResponse + 10, // 35: info.v1.InfoService.NetworkName:output_type -> info.v1.NetworkNameResponse + 12, // 36: info.v1.InfoService.BlockchainID:output_type -> info.v1.BlockchainIDResponse + 15, // 37: info.v1.InfoService.Peers:output_type -> info.v1.PeersResponse + 17, // 38: info.v1.InfoService.IsBootstrapped:output_type -> info.v1.IsBootstrappedResponse + 19, // 39: info.v1.InfoService.Upgrades:output_type -> info.v1.UpgradesResponse + 21, // 40: info.v1.InfoService.Uptime:output_type -> info.v1.UptimeResponse + 23, // 41: info.v1.InfoService.VMs:output_type -> info.v1.VMsResponse + 31, // [31:42] is the sub-list for method output_type + 20, // [20:31] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_info_v1_service_proto_init() } @@ -1630,9 +1527,9 @@ func file_info_v1_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_info_v1_service_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_info_v1_service_proto_rawDesc), len(file_info_v1_service_proto_rawDesc)), NumEnums: 0, - NumMessages: 27, + NumMessages: 28, NumExtensions: 0, NumServices: 1, }, @@ -1641,7 +1538,6 @@ func file_info_v1_service_proto_init() { MessageInfos: file_info_v1_service_proto_msgTypes, }.Build() File_info_v1_service_proto = out.File - file_info_v1_service_proto_rawDesc = nil file_info_v1_service_proto_goTypes = nil file_info_v1_service_proto_depIdxs = nil } diff --git a/proto/pb/info/v1/service_grpc.pb.go b/proto/pb/info/v1/service_grpc.pb.go index 08e03479abe0..1d7852e3b634 100644 --- a/proto/pb/info/v1/service_grpc.pb.go +++ b/proto/pb/info/v1/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.3 // source: info/v1/service.proto package infov1 @@ -15,38 +15,40 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( - InfoService_GetNodeVersion_FullMethodName = "/info.v1.InfoService/GetNodeVersion" - InfoService_GetNodeID_FullMethodName = "/info.v1.InfoService/GetNodeID" - InfoService_GetNodeIP_FullMethodName = "/info.v1.InfoService/GetNodeIP" - InfoService_GetNetworkID_FullMethodName = "/info.v1.InfoService/GetNetworkID" - InfoService_GetNetworkName_FullMethodName = "/info.v1.InfoService/GetNetworkName" - InfoService_GetBlockchainID_FullMethodName = "/info.v1.InfoService/GetBlockchainID" - InfoService_Peers_FullMethodName = "/info.v1.InfoService/Peers" - InfoService_IsBootstrapped_FullMethodName = "/info.v1.InfoService/IsBootstrapped" - InfoService_Upgrades_FullMethodName = "/info.v1.InfoService/Upgrades" - InfoService_Uptime_FullMethodName = "/info.v1.InfoService/Uptime" - InfoService_GetVMs_FullMethodName = "/info.v1.InfoService/GetVMs" + InfoService_NodeVersion_FullMethodName = "/info.v1.InfoService/NodeVersion" + InfoService_NodeID_FullMethodName = "/info.v1.InfoService/NodeID" + InfoService_NodeIP_FullMethodName = "/info.v1.InfoService/NodeIP" + InfoService_NetworkID_FullMethodName = "/info.v1.InfoService/NetworkID" + InfoService_NetworkName_FullMethodName = "/info.v1.InfoService/NetworkName" + InfoService_BlockchainID_FullMethodName = "/info.v1.InfoService/BlockchainID" + InfoService_Peers_FullMethodName = "/info.v1.InfoService/Peers" + InfoService_IsBootstrapped_FullMethodName = "/info.v1.InfoService/IsBootstrapped" + InfoService_Upgrades_FullMethodName = "/info.v1.InfoService/Upgrades" + InfoService_Uptime_FullMethodName = "/info.v1.InfoService/Uptime" + InfoService_VMs_FullMethodName = "/info.v1.InfoService/VMs" ) // InfoServiceClient is the client API for InfoService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// InfoService is the API service for unprivileged info on a node type InfoServiceClient interface { - GetNodeVersion(ctx context.Context, in *GetNodeVersionRequest, opts ...grpc.CallOption) (*GetNodeVersionResponse, error) - GetNodeID(ctx context.Context, in *GetNodeIDRequest, opts ...grpc.CallOption) (*GetNodeIDResponse, error) - GetNodeIP(ctx context.Context, in *GetNodeIPRequest, opts ...grpc.CallOption) (*GetNodeIPResponse, error) - GetNetworkID(ctx context.Context, in *GetNetworkIDRequest, opts ...grpc.CallOption) (*GetNetworkIDResponse, error) - GetNetworkName(ctx context.Context, in *GetNetworkNameRequest, opts ...grpc.CallOption) (*GetNetworkNameResponse, error) - GetBlockchainID(ctx context.Context, in *GetBlockchainIDRequest, opts ...grpc.CallOption) (*GetBlockchainIDResponse, error) + NodeVersion(ctx context.Context, in *NodeVersionRequest, opts ...grpc.CallOption) (*NodeVersionResponse, error) + NodeID(ctx context.Context, in *NodeIDRequest, opts ...grpc.CallOption) (*NodeIDResponse, error) + NodeIP(ctx context.Context, in *NodeIPRequest, opts ...grpc.CallOption) (*NodeIPResponse, error) + NetworkID(ctx context.Context, in *NetworkIDRequest, opts ...grpc.CallOption) (*NetworkIDResponse, error) + NetworkName(ctx context.Context, in *NetworkNameRequest, opts ...grpc.CallOption) (*NetworkNameResponse, error) + BlockchainID(ctx context.Context, in *BlockchainIDRequest, opts ...grpc.CallOption) (*BlockchainIDResponse, error) Peers(ctx context.Context, in *PeersRequest, opts ...grpc.CallOption) (*PeersResponse, error) IsBootstrapped(ctx context.Context, in *IsBootstrappedRequest, opts ...grpc.CallOption) (*IsBootstrappedResponse, error) Upgrades(ctx context.Context, in *UpgradesRequest, opts ...grpc.CallOption) (*UpgradesResponse, error) Uptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) - GetVMs(ctx context.Context, in *GetVMsRequest, opts ...grpc.CallOption) (*GetVMsResponse, error) + VMs(ctx context.Context, in *VMsRequest, opts ...grpc.CallOption) (*VMsResponse, error) } type infoServiceClient struct { @@ -57,54 +59,60 @@ func NewInfoServiceClient(cc grpc.ClientConnInterface) InfoServiceClient { return &infoServiceClient{cc} } -func (c *infoServiceClient) GetNodeVersion(ctx context.Context, in *GetNodeVersionRequest, opts ...grpc.CallOption) (*GetNodeVersionResponse, error) { - out := new(GetNodeVersionResponse) - err := c.cc.Invoke(ctx, InfoService_GetNodeVersion_FullMethodName, in, out, opts...) +func (c *infoServiceClient) NodeVersion(ctx context.Context, in *NodeVersionRequest, opts ...grpc.CallOption) (*NodeVersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(NodeVersionResponse) + err := c.cc.Invoke(ctx, InfoService_NodeVersion_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *infoServiceClient) GetNodeID(ctx context.Context, in *GetNodeIDRequest, opts ...grpc.CallOption) (*GetNodeIDResponse, error) { - out := new(GetNodeIDResponse) - err := c.cc.Invoke(ctx, InfoService_GetNodeID_FullMethodName, in, out, opts...) +func (c *infoServiceClient) NodeID(ctx context.Context, in *NodeIDRequest, opts ...grpc.CallOption) (*NodeIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(NodeIDResponse) + err := c.cc.Invoke(ctx, InfoService_NodeID_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *infoServiceClient) GetNodeIP(ctx context.Context, in *GetNodeIPRequest, opts ...grpc.CallOption) (*GetNodeIPResponse, error) { - out := new(GetNodeIPResponse) - err := c.cc.Invoke(ctx, InfoService_GetNodeIP_FullMethodName, in, out, opts...) +func (c *infoServiceClient) NodeIP(ctx context.Context, in *NodeIPRequest, opts ...grpc.CallOption) (*NodeIPResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(NodeIPResponse) + err := c.cc.Invoke(ctx, InfoService_NodeIP_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *infoServiceClient) GetNetworkID(ctx context.Context, in *GetNetworkIDRequest, opts ...grpc.CallOption) (*GetNetworkIDResponse, error) { - out := new(GetNetworkIDResponse) - err := c.cc.Invoke(ctx, InfoService_GetNetworkID_FullMethodName, in, out, opts...) +func (c *infoServiceClient) NetworkID(ctx context.Context, in *NetworkIDRequest, opts ...grpc.CallOption) (*NetworkIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(NetworkIDResponse) + err := c.cc.Invoke(ctx, InfoService_NetworkID_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *infoServiceClient) GetNetworkName(ctx context.Context, in *GetNetworkNameRequest, opts ...grpc.CallOption) (*GetNetworkNameResponse, error) { - out := new(GetNetworkNameResponse) - err := c.cc.Invoke(ctx, InfoService_GetNetworkName_FullMethodName, in, out, opts...) +func (c *infoServiceClient) NetworkName(ctx context.Context, in *NetworkNameRequest, opts ...grpc.CallOption) (*NetworkNameResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(NetworkNameResponse) + err := c.cc.Invoke(ctx, InfoService_NetworkName_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *infoServiceClient) GetBlockchainID(ctx context.Context, in *GetBlockchainIDRequest, opts ...grpc.CallOption) (*GetBlockchainIDResponse, error) { - out := new(GetBlockchainIDResponse) - err := c.cc.Invoke(ctx, InfoService_GetBlockchainID_FullMethodName, in, out, opts...) +func (c *infoServiceClient) BlockchainID(ctx context.Context, in *BlockchainIDRequest, opts ...grpc.CallOption) (*BlockchainIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BlockchainIDResponse) + err := c.cc.Invoke(ctx, InfoService_BlockchainID_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -112,8 +120,9 @@ func (c *infoServiceClient) GetBlockchainID(ctx context.Context, in *GetBlockcha } func (c *infoServiceClient) Peers(ctx context.Context, in *PeersRequest, opts ...grpc.CallOption) (*PeersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PeersResponse) - err := c.cc.Invoke(ctx, InfoService_Peers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, InfoService_Peers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -121,8 +130,9 @@ func (c *infoServiceClient) Peers(ctx context.Context, in *PeersRequest, opts .. } func (c *infoServiceClient) IsBootstrapped(ctx context.Context, in *IsBootstrappedRequest, opts ...grpc.CallOption) (*IsBootstrappedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(IsBootstrappedResponse) - err := c.cc.Invoke(ctx, InfoService_IsBootstrapped_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, InfoService_IsBootstrapped_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -130,8 +140,9 @@ func (c *infoServiceClient) IsBootstrapped(ctx context.Context, in *IsBootstrapp } func (c *infoServiceClient) Upgrades(ctx context.Context, in *UpgradesRequest, opts ...grpc.CallOption) (*UpgradesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpgradesResponse) - err := c.cc.Invoke(ctx, InfoService_Upgrades_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, InfoService_Upgrades_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -139,17 +150,19 @@ func (c *infoServiceClient) Upgrades(ctx context.Context, in *UpgradesRequest, o } func (c *infoServiceClient) Uptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UptimeResponse) - err := c.cc.Invoke(ctx, InfoService_Uptime_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, InfoService_Uptime_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *infoServiceClient) GetVMs(ctx context.Context, in *GetVMsRequest, opts ...grpc.CallOption) (*GetVMsResponse, error) { - out := new(GetVMsResponse) - err := c.cc.Invoke(ctx, InfoService_GetVMs_FullMethodName, in, out, opts...) +func (c *infoServiceClient) VMs(ctx context.Context, in *VMsRequest, opts ...grpc.CallOption) (*VMsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VMsResponse) + err := c.cc.Invoke(ctx, InfoService_VMs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -158,43 +171,48 @@ func (c *infoServiceClient) GetVMs(ctx context.Context, in *GetVMsRequest, opts // InfoServiceServer is the server API for InfoService service. // All implementations must embed UnimplementedInfoServiceServer -// for forward compatibility +// for forward compatibility. +// +// InfoService is the API service for unprivileged info on a node type InfoServiceServer interface { - GetNodeVersion(context.Context, *GetNodeVersionRequest) (*GetNodeVersionResponse, error) - GetNodeID(context.Context, *GetNodeIDRequest) (*GetNodeIDResponse, error) - GetNodeIP(context.Context, *GetNodeIPRequest) (*GetNodeIPResponse, error) - GetNetworkID(context.Context, *GetNetworkIDRequest) (*GetNetworkIDResponse, error) - GetNetworkName(context.Context, *GetNetworkNameRequest) (*GetNetworkNameResponse, error) - GetBlockchainID(context.Context, *GetBlockchainIDRequest) (*GetBlockchainIDResponse, error) + NodeVersion(context.Context, *NodeVersionRequest) (*NodeVersionResponse, error) + NodeID(context.Context, *NodeIDRequest) (*NodeIDResponse, error) + NodeIP(context.Context, *NodeIPRequest) (*NodeIPResponse, error) + NetworkID(context.Context, *NetworkIDRequest) (*NetworkIDResponse, error) + NetworkName(context.Context, *NetworkNameRequest) (*NetworkNameResponse, error) + BlockchainID(context.Context, *BlockchainIDRequest) (*BlockchainIDResponse, error) Peers(context.Context, *PeersRequest) (*PeersResponse, error) IsBootstrapped(context.Context, *IsBootstrappedRequest) (*IsBootstrappedResponse, error) Upgrades(context.Context, *UpgradesRequest) (*UpgradesResponse, error) Uptime(context.Context, *UptimeRequest) (*UptimeResponse, error) - GetVMs(context.Context, *GetVMsRequest) (*GetVMsResponse, error) + VMs(context.Context, *VMsRequest) (*VMsResponse, error) mustEmbedUnimplementedInfoServiceServer() } -// UnimplementedInfoServiceServer must be embedded to have forward compatible implementations. -type UnimplementedInfoServiceServer struct { -} +// UnimplementedInfoServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedInfoServiceServer struct{} -func (UnimplementedInfoServiceServer) GetNodeVersion(context.Context, *GetNodeVersionRequest) (*GetNodeVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeVersion not implemented") +func (UnimplementedInfoServiceServer) NodeVersion(context.Context, *NodeVersionRequest) (*NodeVersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeVersion not implemented") } -func (UnimplementedInfoServiceServer) GetNodeID(context.Context, *GetNodeIDRequest) (*GetNodeIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeID not implemented") +func (UnimplementedInfoServiceServer) NodeID(context.Context, *NodeIDRequest) (*NodeIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeID not implemented") } -func (UnimplementedInfoServiceServer) GetNodeIP(context.Context, *GetNodeIPRequest) (*GetNodeIPResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeIP not implemented") +func (UnimplementedInfoServiceServer) NodeIP(context.Context, *NodeIPRequest) (*NodeIPResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeIP not implemented") } -func (UnimplementedInfoServiceServer) GetNetworkID(context.Context, *GetNetworkIDRequest) (*GetNetworkIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNetworkID not implemented") +func (UnimplementedInfoServiceServer) NetworkID(context.Context, *NetworkIDRequest) (*NetworkIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NetworkID not implemented") } -func (UnimplementedInfoServiceServer) GetNetworkName(context.Context, *GetNetworkNameRequest) (*GetNetworkNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNetworkName not implemented") +func (UnimplementedInfoServiceServer) NetworkName(context.Context, *NetworkNameRequest) (*NetworkNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NetworkName not implemented") } -func (UnimplementedInfoServiceServer) GetBlockchainID(context.Context, *GetBlockchainIDRequest) (*GetBlockchainIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockchainID not implemented") +func (UnimplementedInfoServiceServer) BlockchainID(context.Context, *BlockchainIDRequest) (*BlockchainIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BlockchainID not implemented") } func (UnimplementedInfoServiceServer) Peers(context.Context, *PeersRequest) (*PeersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Peers not implemented") @@ -208,10 +226,11 @@ func (UnimplementedInfoServiceServer) Upgrades(context.Context, *UpgradesRequest func (UnimplementedInfoServiceServer) Uptime(context.Context, *UptimeRequest) (*UptimeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Uptime not implemented") } -func (UnimplementedInfoServiceServer) GetVMs(context.Context, *GetVMsRequest) (*GetVMsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetVMs not implemented") +func (UnimplementedInfoServiceServer) VMs(context.Context, *VMsRequest) (*VMsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VMs not implemented") } func (UnimplementedInfoServiceServer) mustEmbedUnimplementedInfoServiceServer() {} +func (UnimplementedInfoServiceServer) testEmbeddedByValue() {} // UnsafeInfoServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to InfoServiceServer will @@ -221,113 +240,120 @@ type UnsafeInfoServiceServer interface { } func RegisterInfoServiceServer(s grpc.ServiceRegistrar, srv InfoServiceServer) { + // If the following call pancis, it indicates UnimplementedInfoServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&InfoService_ServiceDesc, srv) } -func _InfoService_GetNodeVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeVersionRequest) +func _InfoService_NodeVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeVersionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfoServiceServer).GetNodeVersion(ctx, in) + return srv.(InfoServiceServer).NodeVersion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InfoService_GetNodeVersion_FullMethodName, + FullMethod: InfoService_NodeVersion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfoServiceServer).GetNodeVersion(ctx, req.(*GetNodeVersionRequest)) + return srv.(InfoServiceServer).NodeVersion(ctx, req.(*NodeVersionRequest)) } return interceptor(ctx, in, info, handler) } -func _InfoService_GetNodeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeIDRequest) +func _InfoService_NodeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeIDRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfoServiceServer).GetNodeID(ctx, in) + return srv.(InfoServiceServer).NodeID(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InfoService_GetNodeID_FullMethodName, + FullMethod: InfoService_NodeID_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfoServiceServer).GetNodeID(ctx, req.(*GetNodeIDRequest)) + return srv.(InfoServiceServer).NodeID(ctx, req.(*NodeIDRequest)) } return interceptor(ctx, in, info, handler) } -func _InfoService_GetNodeIP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeIPRequest) +func _InfoService_NodeIP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeIPRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfoServiceServer).GetNodeIP(ctx, in) + return srv.(InfoServiceServer).NodeIP(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InfoService_GetNodeIP_FullMethodName, + FullMethod: InfoService_NodeIP_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfoServiceServer).GetNodeIP(ctx, req.(*GetNodeIPRequest)) + return srv.(InfoServiceServer).NodeIP(ctx, req.(*NodeIPRequest)) } return interceptor(ctx, in, info, handler) } -func _InfoService_GetNetworkID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNetworkIDRequest) +func _InfoService_NetworkID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NetworkIDRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfoServiceServer).GetNetworkID(ctx, in) + return srv.(InfoServiceServer).NetworkID(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InfoService_GetNetworkID_FullMethodName, + FullMethod: InfoService_NetworkID_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfoServiceServer).GetNetworkID(ctx, req.(*GetNetworkIDRequest)) + return srv.(InfoServiceServer).NetworkID(ctx, req.(*NetworkIDRequest)) } return interceptor(ctx, in, info, handler) } -func _InfoService_GetNetworkName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNetworkNameRequest) +func _InfoService_NetworkName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NetworkNameRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfoServiceServer).GetNetworkName(ctx, in) + return srv.(InfoServiceServer).NetworkName(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InfoService_GetNetworkName_FullMethodName, + FullMethod: InfoService_NetworkName_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfoServiceServer).GetNetworkName(ctx, req.(*GetNetworkNameRequest)) + return srv.(InfoServiceServer).NetworkName(ctx, req.(*NetworkNameRequest)) } return interceptor(ctx, in, info, handler) } -func _InfoService_GetBlockchainID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockchainIDRequest) +func _InfoService_BlockchainID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockchainIDRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfoServiceServer).GetBlockchainID(ctx, in) + return srv.(InfoServiceServer).BlockchainID(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InfoService_GetBlockchainID_FullMethodName, + FullMethod: InfoService_BlockchainID_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfoServiceServer).GetBlockchainID(ctx, req.(*GetBlockchainIDRequest)) + return srv.(InfoServiceServer).BlockchainID(ctx, req.(*BlockchainIDRequest)) } return interceptor(ctx, in, info, handler) } @@ -404,20 +430,20 @@ func _InfoService_Uptime_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _InfoService_GetVMs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetVMsRequest) +func _InfoService_VMs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfoServiceServer).GetVMs(ctx, in) + return srv.(InfoServiceServer).VMs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InfoService_GetVMs_FullMethodName, + FullMethod: InfoService_VMs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfoServiceServer).GetVMs(ctx, req.(*GetVMsRequest)) + return srv.(InfoServiceServer).VMs(ctx, req.(*VMsRequest)) } return interceptor(ctx, in, info, handler) } @@ -430,28 +456,28 @@ var InfoService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*InfoServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetNodeVersion", - Handler: _InfoService_GetNodeVersion_Handler, + MethodName: "NodeVersion", + Handler: _InfoService_NodeVersion_Handler, }, { - MethodName: "GetNodeID", - Handler: _InfoService_GetNodeID_Handler, + MethodName: "NodeID", + Handler: _InfoService_NodeID_Handler, }, { - MethodName: "GetNodeIP", - Handler: _InfoService_GetNodeIP_Handler, + MethodName: "NodeIP", + Handler: _InfoService_NodeIP_Handler, }, { - MethodName: "GetNetworkID", - Handler: _InfoService_GetNetworkID_Handler, + MethodName: "NetworkID", + Handler: _InfoService_NetworkID_Handler, }, { - MethodName: "GetNetworkName", - Handler: _InfoService_GetNetworkName_Handler, + MethodName: "NetworkName", + Handler: _InfoService_NetworkName_Handler, }, { - MethodName: "GetBlockchainID", - Handler: _InfoService_GetBlockchainID_Handler, + MethodName: "BlockchainID", + Handler: _InfoService_BlockchainID_Handler, }, { MethodName: "Peers", @@ -470,8 +496,8 @@ var InfoService_ServiceDesc = grpc.ServiceDesc{ Handler: _InfoService_Uptime_Handler, }, { - MethodName: "GetVMs", - Handler: _InfoService_GetVMs_Handler, + MethodName: "VMs", + Handler: _InfoService_VMs_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/proto/pb/metrics/v1/metricsv1connect/service.connect.go b/proto/pb/metrics/v1/metricsv1connect/service.connect.go index 360a8989f26e..bf6025c372b7 100644 --- a/proto/pb/metrics/v1/metricsv1connect/service.connect.go +++ b/proto/pb/metrics/v1/metricsv1connect/service.connect.go @@ -36,14 +36,13 @@ const ( // reflection-formatted method names, remove the leading slash and convert the remaining slash to a // period. const ( - // MetricsServiceGetMetricsProcedure is the fully-qualified name of the MetricsService's GetMetrics - // RPC. - MetricsServiceGetMetricsProcedure = "/metrics.v1.MetricsService/GetMetrics" + // MetricsServiceMetricsProcedure is the fully-qualified name of the MetricsService's Metrics RPC. + MetricsServiceMetricsProcedure = "/metrics.v1.MetricsService/Metrics" ) // MetricsServiceClient is a client for the metrics.v1.MetricsService service. type MetricsServiceClient interface { - GetMetrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) + Metrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) } // NewMetricsServiceClient constructs a client for the metrics.v1.MetricsService service. By @@ -57,10 +56,10 @@ func NewMetricsServiceClient(httpClient connect.HTTPClient, baseURL string, opts baseURL = strings.TrimRight(baseURL, "/") metricsServiceMethods := v1.File_metrics_v1_service_proto.Services().ByName("MetricsService").Methods() return &metricsServiceClient{ - getMetrics: connect.NewClient[v1.MetricsRequest, v1.MetricsResponse]( + metrics: connect.NewClient[v1.MetricsRequest, v1.MetricsResponse]( httpClient, - baseURL+MetricsServiceGetMetricsProcedure, - connect.WithSchema(metricsServiceMethods.ByName("GetMetrics")), + baseURL+MetricsServiceMetricsProcedure, + connect.WithSchema(metricsServiceMethods.ByName("Metrics")), connect.WithClientOptions(opts...), ), } @@ -68,17 +67,17 @@ func NewMetricsServiceClient(httpClient connect.HTTPClient, baseURL string, opts // metricsServiceClient implements MetricsServiceClient. type metricsServiceClient struct { - getMetrics *connect.Client[v1.MetricsRequest, v1.MetricsResponse] + metrics *connect.Client[v1.MetricsRequest, v1.MetricsResponse] } -// GetMetrics calls metrics.v1.MetricsService.GetMetrics. -func (c *metricsServiceClient) GetMetrics(ctx context.Context, req *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) { - return c.getMetrics.CallUnary(ctx, req) +// Metrics calls metrics.v1.MetricsService.Metrics. +func (c *metricsServiceClient) Metrics(ctx context.Context, req *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) { + return c.metrics.CallUnary(ctx, req) } // MetricsServiceHandler is an implementation of the metrics.v1.MetricsService service. type MetricsServiceHandler interface { - GetMetrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) + Metrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) } // NewMetricsServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -88,16 +87,16 @@ type MetricsServiceHandler interface { // and JSON codecs. They also support gzip compression. func NewMetricsServiceHandler(svc MetricsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { metricsServiceMethods := v1.File_metrics_v1_service_proto.Services().ByName("MetricsService").Methods() - metricsServiceGetMetricsHandler := connect.NewUnaryHandler( - MetricsServiceGetMetricsProcedure, - svc.GetMetrics, - connect.WithSchema(metricsServiceMethods.ByName("GetMetrics")), + metricsServiceMetricsHandler := connect.NewUnaryHandler( + MetricsServiceMetricsProcedure, + svc.Metrics, + connect.WithSchema(metricsServiceMethods.ByName("Metrics")), connect.WithHandlerOptions(opts...), ) return "/metrics.v1.MetricsService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { - case MetricsServiceGetMetricsProcedure: - metricsServiceGetMetricsHandler.ServeHTTP(w, r) + case MetricsServiceMetricsProcedure: + metricsServiceMetricsHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -107,6 +106,6 @@ func NewMetricsServiceHandler(svc MetricsServiceHandler, opts ...connect.Handler // UnimplementedMetricsServiceHandler returns CodeUnimplemented from all methods. type UnimplementedMetricsServiceHandler struct{} -func (UnimplementedMetricsServiceHandler) GetMetrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metrics.v1.MetricsService.GetMetrics is not implemented")) +func (UnimplementedMetricsServiceHandler) Metrics(context.Context, *connect.Request[v1.MetricsRequest]) (*connect.Response[v1.MetricsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("metrics.v1.MetricsService.Metrics is not implemented")) } diff --git a/proto/pb/metrics/v1/service.pb.go b/proto/pb/metrics/v1/service.pb.go index 99d92dd83890..6ef1f9a00a22 100644 --- a/proto/pb/metrics/v1/service.pb.go +++ b/proto/pb/metrics/v1/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc (unknown) +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: metrics/v1/service.proto package metricsv1 @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -21,9 +22,9 @@ const ( ) type MetricsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MetricsRequest) Reset() { @@ -57,11 +58,10 @@ func (*MetricsRequest) Descriptor() ([]byte, []int) { } type MetricsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` unknownFields protoimpl.UnknownFields - - Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MetricsResponse) Reset() { @@ -102,15 +102,14 @@ func (x *MetricsResponse) GetMetrics() []*Metric { } type Metric struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Help string `protobuf:"bytes,3,opt,name=help,proto3" json:"help,omitempty"` + Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` + Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Help string `protobuf:"bytes,3,opt,name=help,proto3" json:"help,omitempty"` - Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` - Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + sizeCache protoimpl.SizeCache } func (x *Metric) Reset() { @@ -180,48 +179,33 @@ func (x *Metric) GetLabels() map[string]string { var File_metrics_v1_service_proto protoreflect.FileDescriptor -var file_metrics_v1_service_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x10, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x06, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x65, 0x6c, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, - 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x57, 0x0a, 0x0e, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x47, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_metrics_v1_service_proto_rawDesc = "" + + "\n" + + "\x18metrics/v1/service.proto\x12\n" + + "metrics.v1\"\x10\n" + + "\x0eMetricsRequest\"?\n" + + "\x0fMetricsResponse\x12,\n" + + "\ametrics\x18\x01 \x03(\v2\x12.metrics.v1.MetricR\ametrics\"\xcd\x01\n" + + "\x06Metric\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + + "\x04type\x18\x02 \x01(\tR\x04type\x12\x12\n" + + "\x04help\x18\x03 \x01(\tR\x04help\x12\x14\n" + + "\x05value\x18\x04 \x01(\x01R\x05value\x126\n" + + "\x06labels\x18\x05 \x03(\v2\x1e.metrics.v1.Metric.LabelsEntryR\x06labels\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012T\n" + + "\x0eMetricsService\x12B\n" + + "\aMetrics\x12\x1a.metrics.v1.MetricsRequest\x1a\x1b.metrics.v1.MetricsResponseB?Z=github.com/ava-labs/avalanchego/proto/pb/metrics/v1;metricsv1b\x06proto3" var ( file_metrics_v1_service_proto_rawDescOnce sync.Once - file_metrics_v1_service_proto_rawDescData = file_metrics_v1_service_proto_rawDesc + file_metrics_v1_service_proto_rawDescData []byte ) func file_metrics_v1_service_proto_rawDescGZIP() []byte { file_metrics_v1_service_proto_rawDescOnce.Do(func() { - file_metrics_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_metrics_v1_service_proto_rawDescData) + file_metrics_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_metrics_v1_service_proto_rawDesc), len(file_metrics_v1_service_proto_rawDesc))) }) return file_metrics_v1_service_proto_rawDescData } @@ -236,8 +220,8 @@ var file_metrics_v1_service_proto_goTypes = []any{ var file_metrics_v1_service_proto_depIdxs = []int32{ 2, // 0: metrics.v1.MetricsResponse.metrics:type_name -> metrics.v1.Metric 3, // 1: metrics.v1.Metric.labels:type_name -> metrics.v1.Metric.LabelsEntry - 0, // 2: metrics.v1.MetricsService.GetMetrics:input_type -> metrics.v1.MetricsRequest - 1, // 3: metrics.v1.MetricsService.GetMetrics:output_type -> metrics.v1.MetricsResponse + 0, // 2: metrics.v1.MetricsService.Metrics:input_type -> metrics.v1.MetricsRequest + 1, // 3: metrics.v1.MetricsService.Metrics:output_type -> metrics.v1.MetricsResponse 3, // [3:4] is the sub-list for method output_type 2, // [2:3] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -254,7 +238,7 @@ func file_metrics_v1_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_metrics_v1_service_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_metrics_v1_service_proto_rawDesc), len(file_metrics_v1_service_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -265,7 +249,6 @@ func file_metrics_v1_service_proto_init() { MessageInfos: file_metrics_v1_service_proto_msgTypes, }.Build() File_metrics_v1_service_proto = out.File - file_metrics_v1_service_proto_rawDesc = nil file_metrics_v1_service_proto_goTypes = nil file_metrics_v1_service_proto_depIdxs = nil } diff --git a/proto/pb/metrics/v1/service_grpc.pb.go b/proto/pb/metrics/v1/service_grpc.pb.go index b0c1e4f56561..fe8ca8f56059 100644 --- a/proto/pb/metrics/v1/service_grpc.pb.go +++ b/proto/pb/metrics/v1/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.3 // source: metrics/v1/service.proto package metricsv1 @@ -15,18 +15,18 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( - MetricsService_GetMetrics_FullMethodName = "/metrics.v1.MetricsService/GetMetrics" + MetricsService_Metrics_FullMethodName = "/metrics.v1.MetricsService/Metrics" ) // MetricsServiceClient is the client API for MetricsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MetricsServiceClient interface { - GetMetrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) + Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) } type metricsServiceClient struct { @@ -37,9 +37,10 @@ func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient { return &metricsServiceClient{cc} } -func (c *metricsServiceClient) GetMetrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) { +func (c *metricsServiceClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MetricsResponse) - err := c.cc.Invoke(ctx, MetricsService_GetMetrics_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, MetricsService_Metrics_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,20 +49,24 @@ func (c *metricsServiceClient) GetMetrics(ctx context.Context, in *MetricsReques // MetricsServiceServer is the server API for MetricsService service. // All implementations must embed UnimplementedMetricsServiceServer -// for forward compatibility +// for forward compatibility. type MetricsServiceServer interface { - GetMetrics(context.Context, *MetricsRequest) (*MetricsResponse, error) + Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error) mustEmbedUnimplementedMetricsServiceServer() } -// UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations. -type UnimplementedMetricsServiceServer struct { -} +// UnimplementedMetricsServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMetricsServiceServer struct{} -func (UnimplementedMetricsServiceServer) GetMetrics(context.Context, *MetricsRequest) (*MetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") +func (UnimplementedMetricsServiceServer) Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Metrics not implemented") } func (UnimplementedMetricsServiceServer) mustEmbedUnimplementedMetricsServiceServer() {} +func (UnimplementedMetricsServiceServer) testEmbeddedByValue() {} // UnsafeMetricsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MetricsServiceServer will @@ -71,23 +76,30 @@ type UnsafeMetricsServiceServer interface { } func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer) { + // If the following call pancis, it indicates UnimplementedMetricsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&MetricsService_ServiceDesc, srv) } -func _MetricsService_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _MetricsService_Metrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MetricsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MetricsServiceServer).GetMetrics(ctx, in) + return srv.(MetricsServiceServer).Metrics(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: MetricsService_GetMetrics_FullMethodName, + FullMethod: MetricsService_Metrics_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceServer).GetMetrics(ctx, req.(*MetricsRequest)) + return srv.(MetricsServiceServer).Metrics(ctx, req.(*MetricsRequest)) } return interceptor(ctx, in, info, handler) } @@ -100,8 +112,8 @@ var MetricsService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*MetricsServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetMetrics", - Handler: _MetricsService_GetMetrics_Handler, + MethodName: "Metrics", + Handler: _MetricsService_Metrics_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/tests/e2e/connect/connect_suite_test.go b/tests/connect/connect_suite_test.go similarity index 100% rename from tests/e2e/connect/connect_suite_test.go rename to tests/connect/connect_suite_test.go diff --git a/tests/e2e/connect/info_test.go b/tests/connect/info_test.go similarity index 100% rename from tests/e2e/connect/info_test.go rename to tests/connect/info_test.go diff --git a/utils/resource/usage.go b/utils/resource/usage.go index 833f2de538b5..32ffbfe4aa85 100644 --- a/utils/resource/usage.go +++ b/utils/resource/usage.go @@ -22,7 +22,6 @@ var ( lnHalf = math.Log(.5) _ Manager = (*manager)(nil) - _ Manager = (*NoManager)(nil) ) type CPUUser interface { @@ -67,26 +66,6 @@ type Manager interface { Shutdown() } -type NoManager struct{} - -func (NoManager) CPUUsage() float64 { - return 0 -} - -func (NoManager) DiskUsage() (read float64, write float64) { - return 0, 0 -} - -func (NoManager) AvailableDiskBytes() uint64 { - return 0 -} - -func (NoManager) TrackProcess(int) {} - -func (NoManager) UntrackProcess(int) {} - -func (NoManager) Shutdown() {} - type manager struct { log logging.Logger processMetrics *metrics diff --git a/vms/platformvm/signer/proof_of_possession.go b/vms/platformvm/signer/proof_of_possession.go index e292fc6b510b..196cd3f41862 100644 --- a/vms/platformvm/signer/proof_of_possession.go +++ b/vms/platformvm/signer/proof_of_possession.go @@ -67,7 +67,7 @@ func (p *ProofOfPossession) Key() *bls.PublicKey { return p.publicKey } -type jsonProofOfPossession struct { +type JsonProofOfPossession struct { PublicKey string `json:"publicKey"` ProofOfPossession string `json:"proofOfPossession"` } @@ -81,14 +81,14 @@ func (p *ProofOfPossession) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return json.Marshal(jsonProofOfPossession{ + return json.Marshal(JsonProofOfPossession{ PublicKey: pk, ProofOfPossession: pop, }) } func (p *ProofOfPossession) UnmarshalJSON(b []byte) error { - jsonBLS := jsonProofOfPossession{} + jsonBLS := JsonProofOfPossession{} err := json.Unmarshal(b, &jsonBLS) if err != nil { return err diff --git a/vms/rpcchainvm/vm_test.go b/vms/rpcchainvm/vm_test.go index 78f7fbb76c23..914a91f3cb66 100644 --- a/vms/rpcchainvm/vm_test.go +++ b/vms/rpcchainvm/vm_test.go @@ -28,7 +28,6 @@ import ( "github.com/ava-labs/avalanchego/snow/engine/snowman/block/blocktest" "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/avalanchego/utils/logging" - "github.com/ava-labs/avalanchego/utils/resource" "github.com/ava-labs/avalanchego/vms/rpcchainvm/grpcutils" "github.com/ava-labs/avalanchego/vms/rpcchainvm/runtime" "github.com/ava-labs/avalanchego/vms/rpcchainvm/runtime/subprocess" @@ -246,7 +245,7 @@ func TestNewHTTPHandler(t *testing.T) { cc, runtime.NewManager(), 123, - resource.NoManager{}, + nil, metrics.NewLabelGatherer(""), logging.NoLog{}, ) From df6483468f12cfa31729cf56bfbb3647cdc3bb23 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Wed, 16 Jul 2025 13:40:14 -0400 Subject: [PATCH 08/13] mod tidy --- go.mod | 1 - go.sum | 2 -- 2 files changed, 3 deletions(-) diff --git a/go.mod b/go.mod index 976e02961c10..67aa39f7bd6c 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,6 @@ require ( github.com/ava-labs/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60 github.com/ava-labs/libevm v1.13.14-0.3.0.rc.1 github.com/btcsuite/btcd/btcutil v1.1.3 - github.com/bufbuild/connect-go v1.10.0 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 github.com/compose-spec/compose-go v1.20.2 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 diff --git a/go.sum b/go.sum index 523e4d48ac96..4026222ebd88 100644 --- a/go.sum +++ b/go.sum @@ -109,8 +109,6 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/bufbuild/connect-go v1.10.0 h1:QAJ3G9A1OYQW2Jbk3DeoJbkCxuKArrvZgDt47mjdTbg= -github.com/bufbuild/connect-go v1.10.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= From e98f4274cb86ea15d3f10210e6d1d3fbc308b9d8 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Wed, 16 Jul 2025 13:43:38 -0400 Subject: [PATCH 09/13] old test cleanup --- tests/connect/info_test.go | 98 +++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/tests/connect/info_test.go b/tests/connect/info_test.go index 3dc1046f167a..864fd5bf7c74 100644 --- a/tests/connect/info_test.go +++ b/tests/connect/info_test.go @@ -23,56 +23,56 @@ import ( type stubInfoService struct{} -func (*stubInfoService) GetNodeVersion( +func (*stubInfoService) NodeVersion( _ context.Context, - _ *connect.Request[infov1.GetNodeVersionRequest], -) (*connect.Response[infov1.GetNodeVersionResponse], error) { - return connect.NewResponse(&infov1.GetNodeVersionResponse{ + _ *connect.Request[infov1.NodeVersionRequest], +) (*connect.Response[infov1.NodeVersionResponse], error) { + return connect.NewResponse(&infov1.NodeVersionResponse{ Version: "stub-v1.2.3", }), nil } -func (*stubInfoService) GetNodeID( +func (*stubInfoService) NodeID( _ context.Context, - _ *connect.Request[infov1.GetNodeIDRequest], -) (*connect.Response[infov1.GetNodeIDResponse], error) { - return connect.NewResponse(&infov1.GetNodeIDResponse{ + _ *connect.Request[infov1.NodeIDRequest], +) (*connect.Response[infov1.NodeIDResponse], error) { + return connect.NewResponse(&infov1.NodeIDResponse{ NodeId: "NodeID-stub-node", }), nil } -func (*stubInfoService) GetNodeIP( +func (*stubInfoService) NodeIP( _ context.Context, - _ *connect.Request[infov1.GetNodeIPRequest], -) (*connect.Response[infov1.GetNodeIPResponse], error) { - return connect.NewResponse(&infov1.GetNodeIPResponse{ + _ *connect.Request[infov1.NodeIPRequest], +) (*connect.Response[infov1.NodeIPResponse], error) { + return connect.NewResponse(&infov1.NodeIPResponse{ Ip: "127.0.0.1", }), nil } -func (*stubInfoService) GetNetworkID( +func (*stubInfoService) NetworkID( _ context.Context, - _ *connect.Request[infov1.GetNetworkIDRequest], -) (*connect.Response[infov1.GetNetworkIDResponse], error) { - return connect.NewResponse(&infov1.GetNetworkIDResponse{ + _ *connect.Request[infov1.NetworkIDRequest], +) (*connect.Response[infov1.NetworkIDResponse], error) { + return connect.NewResponse(&infov1.NetworkIDResponse{ NetworkId: 1, }), nil } -func (*stubInfoService) GetNetworkName( +func (*stubInfoService) NetworkName( _ context.Context, - _ *connect.Request[infov1.GetNetworkNameRequest], -) (*connect.Response[infov1.GetNetworkNameResponse], error) { - return connect.NewResponse(&infov1.GetNetworkNameResponse{ + _ *connect.Request[infov1.NetworkNameRequest], +) (*connect.Response[infov1.NetworkNameResponse], error) { + return connect.NewResponse(&infov1.NetworkNameResponse{ NetworkName: "network", }), nil } -func (*stubInfoService) GetBlockchainID( +func (*stubInfoService) BlockchainID( _ context.Context, - _ *connect.Request[infov1.GetBlockchainIDRequest], -) (*connect.Response[infov1.GetBlockchainIDResponse], error) { - return connect.NewResponse(&infov1.GetBlockchainIDResponse{ + _ *connect.Request[infov1.BlockchainIDRequest], +) (*connect.Response[infov1.BlockchainIDResponse], error) { + return connect.NewResponse(&infov1.BlockchainIDResponse{ BlockchainId: "blockchain", }), nil } @@ -110,11 +110,11 @@ func (*stubInfoService) Uptime( return connect.NewResponse(&infov1.UptimeResponse{}), nil } -func (*stubInfoService) GetVMs( +func (*stubInfoService) VMs( _ context.Context, - _ *connect.Request[infov1.GetVMsRequest], -) (*connect.Response[infov1.GetVMsResponse], error) { - return connect.NewResponse(&infov1.GetVMsResponse{ + _ *connect.Request[infov1.VMsRequest], +) (*connect.Response[infov1.VMsResponse], error) { + return connect.NewResponse(&infov1.VMsResponse{ Vms: map[string]*infov1.VMAliases{ "avm": {Aliases: []string{"avm"}}, }, @@ -153,50 +153,50 @@ var _ = Describe("InfoService ConnectRPC E2E (integration, no stubs)", func() { } }) - It("GetNodeVersion returns version info", func() { - req := connect.NewRequest(&infov1.GetNodeVersionRequest{}) + It("NodeVersion returns version info", func() { + req := connect.NewRequest(&infov1.NodeVersionRequest{}) req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.GetNodeVersion(ctx, req) + resp, err := client.NodeVersion(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.Version).ToNot(BeEmpty()) }) - It("GetNodeID returns a node ID", func() { - req := connect.NewRequest(&infov1.GetNodeIDRequest{}) + It("NodeID returns a node ID", func() { + req := connect.NewRequest(&infov1.NodeIDRequest{}) req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.GetNodeID(ctx, req) + resp, err := client.NodeID(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.NodeId).To(HavePrefix("NodeID-")) }) - It("GetNetworkID returns a network ID", func() { - req := connect.NewRequest(&infov1.GetNetworkIDRequest{}) + It("NetworkID returns a network ID", func() { + req := connect.NewRequest(&infov1.NetworkIDRequest{}) req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.GetNetworkID(ctx, req) + resp, err := client.NetworkID(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.NetworkId).To(BeNumerically(">", 0)) }) - It("GetNetworkName returns a network name", func() { - req := connect.NewRequest(&infov1.GetNetworkNameRequest{}) + It("NetworkName returns a network name", func() { + req := connect.NewRequest(&infov1.NetworkNameRequest{}) req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.GetNetworkName(ctx, req) + resp, err := client.NetworkName(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.NetworkName).ToNot(BeEmpty()) }) - It("GetNodeIP returns an IP", func() { - req := connect.NewRequest(&infov1.GetNodeIPRequest{}) + It("NodeIP returns an IP", func() { + req := connect.NewRequest(&infov1.NodeIPRequest{}) req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.GetNodeIP(ctx, req) + resp, err := client.NodeIP(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.Ip).ToNot(BeEmpty()) }) - It("GetBlockchainID returns a blockchain ID for X", func() { - req := connect.NewRequest(&infov1.GetBlockchainIDRequest{Alias: "X"}) + It("BlockchainID returns a blockchain ID for X", func() { + req := connect.NewRequest(&infov1.BlockchainIDRequest{Alias: "X"}) req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.GetBlockchainID(ctx, req) + resp, err := client.BlockchainID(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.BlockchainId).ToNot(BeEmpty()) }) @@ -234,10 +234,10 @@ var _ = Describe("InfoService ConnectRPC E2E (integration, no stubs)", func() { Expect(resp.Msg).ToNot(BeNil()) }) - It("GetVMs returns at least avm", func() { - req := connect.NewRequest(&infov1.GetVMsRequest{}) + It("VMs returns at least avm", func() { + req := connect.NewRequest(&infov1.VMsRequest{}) req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.GetVMs(ctx, req) + resp, err := client.VMs(ctx, req) Expect(err).ToNot(HaveOccurred()) Expect(resp.Msg.Vms).To(HaveKey("avm")) }) From 203646a5a213c8518a636c6f2eb38f3865e46369 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Wed, 16 Jul 2025 13:50:34 -0400 Subject: [PATCH 10/13] diff --- go.mod | 1 - proto/info/v1/service.proto | 1 - vms/platformvm/signer/proof_of_possession.go | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 67aa39f7bd6c..e42a992cf8a5 100644 --- a/go.mod +++ b/go.mod @@ -94,7 +94,6 @@ require ( github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect - github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8 // indirect github.com/ava-labs/simplex v0.0.0-20250626192006-220e6aeacdc1 github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect diff --git a/proto/info/v1/service.proto b/proto/info/v1/service.proto index 6e551458d35c..f56624dbf1f1 100644 --- a/proto/info/v1/service.proto +++ b/proto/info/v1/service.proto @@ -64,7 +64,6 @@ message BlockchainIDResponse { message PeersRequest { repeated string node_ids = 1; } -// PeerInfo provides metadata about a connected peer in the network message PeerInfo { string ip = 1; string public_ip = 2; diff --git a/vms/platformvm/signer/proof_of_possession.go b/vms/platformvm/signer/proof_of_possession.go index 196cd3f41862..e292fc6b510b 100644 --- a/vms/platformvm/signer/proof_of_possession.go +++ b/vms/platformvm/signer/proof_of_possession.go @@ -67,7 +67,7 @@ func (p *ProofOfPossession) Key() *bls.PublicKey { return p.publicKey } -type JsonProofOfPossession struct { +type jsonProofOfPossession struct { PublicKey string `json:"publicKey"` ProofOfPossession string `json:"proofOfPossession"` } @@ -81,14 +81,14 @@ func (p *ProofOfPossession) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return json.Marshal(JsonProofOfPossession{ + return json.Marshal(jsonProofOfPossession{ PublicKey: pk, ProofOfPossession: pop, }) } func (p *ProofOfPossession) UnmarshalJSON(b []byte) error { - jsonBLS := JsonProofOfPossession{} + jsonBLS := jsonProofOfPossession{} err := json.Unmarshal(b, &jsonBLS) if err != nil { return err From f5dd3f477e72898d5a949a7b7c7023c926fcd462 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:12:08 -0400 Subject: [PATCH 11/13] info pop proto lint --- api/info/connecthandler/info_connect.go | 15 ++++++++++----- proto/info/v1/service.proto | 4 ++-- proto/pb/info/v1/service.pb.go | 14 +++++++------- snow/engine/common/vm.go | 2 -- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/api/info/connecthandler/info_connect.go b/api/info/connecthandler/info_connect.go index 49eb5486a4cd..b6395129bbc0 100644 --- a/api/info/connecthandler/info_connect.go +++ b/api/info/connecthandler/info_connect.go @@ -67,7 +67,6 @@ func (c *ConnectInfoService) NodeID( return nil, err } - // Convert raw PoP bytes into hex strings pop := jsonResponse.NodePOP if err := pop.Verify(); err != nil { return nil, err @@ -76,16 +75,22 @@ func (c *ConnectInfoService) NodeID( if err != nil { return nil, err } - var popMessage infov1.ProofOfPossession - if err := json.Unmarshal(rawPopJSON, &popMessage); err != nil { + + type jsonProofOfPossession struct { + PublicKey string `json:"publicKey"` + ProofOfPossession string `json:"proofOfPossession"` + } + + var popJSON jsonProofOfPossession + if err := json.Unmarshal(rawPopJSON, &popJSON); err != nil { return nil, err } response := &infov1.NodeIDResponse{ NodeId: jsonResponse.NodeID.String(), NodePop: &infov1.ProofOfPossession{ - PublicKey: popMessage.PublicKey, - ProofOfPossession: popMessage.ProofOfPossession, + PublicKey: popJSON.PublicKey, + ProofOfPossession: popJSON.ProofOfPossession, }, } diff --git a/proto/info/v1/service.proto b/proto/info/v1/service.proto index f56624dbf1f1..d73d1d94a6e9 100644 --- a/proto/info/v1/service.proto +++ b/proto/info/v1/service.proto @@ -31,8 +31,8 @@ message NodeVersionResponse { message NodeIDRequest {} message ProofOfPossession { - string publicKey = 1; - string proofOfPossession = 2; + string public_key = 1; + string proof_of_possession = 2; } message NodeIDResponse { string node_id = 1; diff --git a/proto/pb/info/v1/service.pb.go b/proto/pb/info/v1/service.pb.go index ade53377afab..de626f209ca0 100644 --- a/proto/pb/info/v1/service.pb.go +++ b/proto/pb/info/v1/service.pb.go @@ -172,8 +172,8 @@ func (*NodeIDRequest) Descriptor() ([]byte, []int) { type ProofOfPossession struct { state protoimpl.MessageState `protogen:"open.v1"` - PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - ProofOfPossession string `protobuf:"bytes,2,opt,name=proofOfPossession,proto3" json:"proofOfPossession,omitempty"` + PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + ProofOfPossession string `protobuf:"bytes,2,opt,name=proof_of_possession,json=proofOfPossession,proto3" json:"proof_of_possession,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -646,7 +646,6 @@ func (x *PeersRequest) GetNodeIds() []string { return nil } -// PeerInfo provides metadata about a connected peer in the network type PeerInfo struct { state protoimpl.MessageState `protogen:"open.v1"` Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` @@ -1334,10 +1333,11 @@ const file_info_v1_service_proto_rawDesc = "" + "\x0fVmVersionsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x0f\n" + - "\rNodeIDRequest\"_\n" + - "\x11ProofOfPossession\x12\x1c\n" + - "\tpublicKey\x18\x01 \x01(\tR\tpublicKey\x12,\n" + - "\x11proofOfPossession\x18\x02 \x01(\tR\x11proofOfPossession\"`\n" + + "\rNodeIDRequest\"b\n" + + "\x11ProofOfPossession\x12\x1d\n" + + "\n" + + "public_key\x18\x01 \x01(\tR\tpublicKey\x12.\n" + + "\x13proof_of_possession\x18\x02 \x01(\tR\x11proofOfPossession\"`\n" + "\x0eNodeIDResponse\x12\x17\n" + "\anode_id\x18\x01 \x01(\tR\x06nodeId\x125\n" + "\bnode_pop\x18\x02 \x01(\v2\x1a.info.v1.ProofOfPossessionR\anodePop\"\x0f\n" + diff --git a/snow/engine/common/vm.go b/snow/engine/common/vm.go index f2fe42fc76ac..07d36f9b2733 100644 --- a/snow/engine/common/vm.go +++ b/snow/engine/common/vm.go @@ -64,8 +64,6 @@ type VM interface { // Version returns the version of the VM. Version(context.Context) (string, error) - // Deprecated: implementations should expose apis through NewHTTPHandler. - // // Creates the HTTP handlers for custom chain network calls. // // This exposes handlers that the outside world can use to communicate with From f6c87a21942c9fc6f363eed1cdc819dc5ed40c9b Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:22:49 -0400 Subject: [PATCH 12/13] tmpnet setup for info test suite --- tests/connect/connect_suite_test.go | 16 -- tests/connect/info_e2e_test.go | 175 ++++++++++++++++++++ tests/connect/info_test.go | 244 ---------------------------- 3 files changed, 175 insertions(+), 260 deletions(-) delete mode 100644 tests/connect/connect_suite_test.go create mode 100644 tests/connect/info_e2e_test.go delete mode 100644 tests/connect/info_test.go diff --git a/tests/connect/connect_suite_test.go b/tests/connect/connect_suite_test.go deleted file mode 100644 index 21f58168899e..000000000000 --- a/tests/connect/connect_suite_test.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package connect_test - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestConnect(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Connect Suite") -} diff --git a/tests/connect/info_e2e_test.go b/tests/connect/info_e2e_test.go new file mode 100644 index 000000000000..7bfffa96e8c5 --- /dev/null +++ b/tests/connect/info_e2e_test.go @@ -0,0 +1,175 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connect_test + +import ( + "context" + "net/http" + "os" + "testing" + "time" + + "connectrpc.com/connect" + + "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" + "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" + "github.com/ava-labs/avalanchego/utils/logging" + + infov1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var ( + client infov1connect.InfoServiceClient + ctx context.Context + httpClient *http.Client + network *tmpnet.Network + nodeURI string +) + +func TestInfoE2E(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Info E2E Suite") +} + +var _ = BeforeSuite(func() { + ctx = context.Background() + network = tmpnet.NewDefaultNetwork("info-e2e") + network.DefaultRuntimeConfig.Process = &tmpnet.ProcessRuntimeConfig{} + + // Use environment variable + avaPath := os.Getenv("AVALANCHEGO_PATH") + if avaPath == "" { + avaPath = "./avalanchego" + } + // Fail early if binary does not exist + if _, err := os.Stat(avaPath); err != nil { + Fail("AvalancheGo binary not found at: " + avaPath) + } + network.DefaultRuntimeConfig.Process.AvalancheGoPath = avaPath + + Expect(network.EnsureDefaultConfig(logging.NoLog{})).To(Succeed()) + Expect(network.Create("")).To(Succeed()) + Expect(network.Bootstrap(ctx, logging.NoLog{})).To(Succeed()) + + node := network.Nodes[0] + uri, cancel, err := node.GetLocalURI(ctx) + Expect(err).ToNot(HaveOccurred()) + defer cancel() + nodeURI = uri + + httpClient = &http.Client{Timeout: 10 * time.Second} + client = infov1connect.NewInfoServiceClient(httpClient, nodeURI) +}) + +var _ = AfterSuite(func() { + if network != nil { + _ = network.Stop(ctx) + } +}) + +var _ = Describe("InfoService ConnectRPC E2E", func() { + It("NodeVersion returns version info", func() { + req := connect.NewRequest(&infov1.NodeVersionRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.NodeVersion(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.Version).ToNot(BeEmpty()) + }) + + It("NodeID returns a node ID", func() { + req := connect.NewRequest(&infov1.NodeIDRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.NodeID(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NodeId).To(HavePrefix("NodeID-")) + }) + + It("NetworkID returns a network ID", func() { + req := connect.NewRequest(&infov1.NetworkIDRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.NetworkID(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NetworkId).To(BeNumerically(">", 0)) + }) + + It("NetworkName returns a network name", func() { + req := connect.NewRequest(&infov1.NetworkNameRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.NetworkName(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NetworkName).ToNot(BeEmpty()) + }) + + It("NodeIP returns an IP", func() { + req := connect.NewRequest(&infov1.NodeIPRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.NodeIP(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.Ip).ToNot(BeEmpty()) + }) + + It("BlockchainID returns a blockchain ID for X", func() { + req := connect.NewRequest(&infov1.BlockchainIDRequest{Alias: "X"}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.BlockchainID(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.BlockchainId).ToNot(BeEmpty()) + }) + + It("Peers returns a list", func() { + req := connect.NewRequest(&infov1.PeersRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.Peers(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg.NumPeers).To(BeNumerically(">=", 0)) + }) + + It("IsBootstrapped returns true for X", func() { + Eventually(func() bool { + req := connect.NewRequest(&infov1.IsBootstrappedRequest{Chain: "X"}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.IsBootstrapped(ctx, req) + return err == nil && resp.Msg.IsBootstrapped + }, 60*time.Second, 2*time.Second).Should(BeTrue()) + }) + + It("Upgrades returns a response", func() { + req := connect.NewRequest(&infov1.UpgradesRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.Upgrades(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg).ToNot(BeNil()) + }) + + It("Uptime returns a response", func() { + req := connect.NewRequest(&infov1.UptimeRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.Uptime(ctx, req) + Expect(err).ToNot(HaveOccurred()) + Expect(resp.Msg).ToNot(BeNil()) + }) + + It("VMs returns at least avm", func() { + req := connect.NewRequest(&infov1.VMsRequest{}) + req.Header().Set("Avalanche-API-Route", "info") + resp, err := client.VMs(ctx, req) + Expect(err).ToNot(HaveOccurred()) + found := false + for _, v := range resp.Msg.Vms { + for _, alias := range v.Aliases { + if alias == "avm" { + found = true + break + } + } + if found { + break + } + } + Expect(found).To(BeTrue()) + }) +}) diff --git a/tests/connect/info_test.go b/tests/connect/info_test.go deleted file mode 100644 index 864fd5bf7c74..000000000000 --- a/tests/connect/info_test.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package connect_test - -import ( - "context" - "net/http" - "net/http/httptest" - "time" - - "connectrpc.com/connect" - "golang.org/x/net/http2" - "golang.org/x/net/http2/h2c" - - "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" - - infov1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -type stubInfoService struct{} - -func (*stubInfoService) NodeVersion( - _ context.Context, - _ *connect.Request[infov1.NodeVersionRequest], -) (*connect.Response[infov1.NodeVersionResponse], error) { - return connect.NewResponse(&infov1.NodeVersionResponse{ - Version: "stub-v1.2.3", - }), nil -} - -func (*stubInfoService) NodeID( - _ context.Context, - _ *connect.Request[infov1.NodeIDRequest], -) (*connect.Response[infov1.NodeIDResponse], error) { - return connect.NewResponse(&infov1.NodeIDResponse{ - NodeId: "NodeID-stub-node", - }), nil -} - -func (*stubInfoService) NodeIP( - _ context.Context, - _ *connect.Request[infov1.NodeIPRequest], -) (*connect.Response[infov1.NodeIPResponse], error) { - return connect.NewResponse(&infov1.NodeIPResponse{ - Ip: "127.0.0.1", - }), nil -} - -func (*stubInfoService) NetworkID( - _ context.Context, - _ *connect.Request[infov1.NetworkIDRequest], -) (*connect.Response[infov1.NetworkIDResponse], error) { - return connect.NewResponse(&infov1.NetworkIDResponse{ - NetworkId: 1, - }), nil -} - -func (*stubInfoService) NetworkName( - _ context.Context, - _ *connect.Request[infov1.NetworkNameRequest], -) (*connect.Response[infov1.NetworkNameResponse], error) { - return connect.NewResponse(&infov1.NetworkNameResponse{ - NetworkName: "network", - }), nil -} - -func (*stubInfoService) BlockchainID( - _ context.Context, - _ *connect.Request[infov1.BlockchainIDRequest], -) (*connect.Response[infov1.BlockchainIDResponse], error) { - return connect.NewResponse(&infov1.BlockchainIDResponse{ - BlockchainId: "blockchain", - }), nil -} - -func (*stubInfoService) Peers( - _ context.Context, - _ *connect.Request[infov1.PeersRequest], -) (*connect.Response[infov1.PeersResponse], error) { - return connect.NewResponse(&infov1.PeersResponse{ - NumPeers: 0, - Peers: []*infov1.PeerInfo{}, - }), nil -} - -func (*stubInfoService) IsBootstrapped( - _ context.Context, - _ *connect.Request[infov1.IsBootstrappedRequest], -) (*connect.Response[infov1.IsBootstrappedResponse], error) { - return connect.NewResponse(&infov1.IsBootstrappedResponse{ - IsBootstrapped: true, - }), nil -} - -func (*stubInfoService) Upgrades( - _ context.Context, - _ *connect.Request[infov1.UpgradesRequest], -) (*connect.Response[infov1.UpgradesResponse], error) { - return connect.NewResponse(&infov1.UpgradesResponse{}), nil -} - -func (*stubInfoService) Uptime( - _ context.Context, - _ *connect.Request[infov1.UptimeRequest], -) (*connect.Response[infov1.UptimeResponse], error) { - return connect.NewResponse(&infov1.UptimeResponse{}), nil -} - -func (*stubInfoService) VMs( - _ context.Context, - _ *connect.Request[infov1.VMsRequest], -) (*connect.Response[infov1.VMsResponse], error) { - return connect.NewResponse(&infov1.VMsResponse{ - Vms: map[string]*infov1.VMAliases{ - "avm": {Aliases: []string{"avm"}}, - }, - Fxs: map[string]string{}, - }), nil -} - -var _ = Describe("InfoService ConnectRPC E2E (integration, no stubs)", func() { - var ( - client infov1connect.InfoServiceClient - ctx context.Context - httpClient *http.Client - srv *httptest.Server - ) - - BeforeEach(func() { - ctx = context.Background() - stub := &stubInfoService{} - pattern, handler := infov1connect.NewInfoServiceHandler(stub) - - mux := http.NewServeMux() - mux.Handle(pattern, handler) - - // Start h2c server for testing ConnectRPC with HTTP/2 - srv = httptest.NewUnstartedServer(h2c.NewHandler(mux, &http2.Server{})) - srv.EnableHTTP2 = true - srv.Start() - - httpClient = &http.Client{Timeout: 5 * time.Second} - client = infov1connect.NewInfoServiceClient(httpClient, srv.URL) - }) - - AfterEach(func() { - if srv != nil { - srv.Close() - } - }) - - It("NodeVersion returns version info", func() { - req := connect.NewRequest(&infov1.NodeVersionRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.NodeVersion(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.Version).ToNot(BeEmpty()) - }) - - It("NodeID returns a node ID", func() { - req := connect.NewRequest(&infov1.NodeIDRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.NodeID(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.NodeId).To(HavePrefix("NodeID-")) - }) - - It("NetworkID returns a network ID", func() { - req := connect.NewRequest(&infov1.NetworkIDRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.NetworkID(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.NetworkId).To(BeNumerically(">", 0)) - }) - - It("NetworkName returns a network name", func() { - req := connect.NewRequest(&infov1.NetworkNameRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.NetworkName(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.NetworkName).ToNot(BeEmpty()) - }) - - It("NodeIP returns an IP", func() { - req := connect.NewRequest(&infov1.NodeIPRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.NodeIP(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.Ip).ToNot(BeEmpty()) - }) - - It("BlockchainID returns a blockchain ID for X", func() { - req := connect.NewRequest(&infov1.BlockchainIDRequest{Alias: "X"}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.BlockchainID(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.BlockchainId).ToNot(BeEmpty()) - }) - - It("Peers returns a list (may be empty)", func() { - req := connect.NewRequest(&infov1.PeersRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.Peers(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.NumPeers).To(BeNumerically(">=", 0)) - }) - - It("IsBootstrapped returns true for X", func() { - Eventually(func() bool { - req := connect.NewRequest(&infov1.IsBootstrappedRequest{Chain: "X"}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.IsBootstrapped(ctx, req) - return err == nil && resp.Msg.IsBootstrapped - }, 60*time.Second, 2*time.Second).Should(BeTrue()) - }) - - It("Upgrades returns a response", func() { - req := connect.NewRequest(&infov1.UpgradesRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.Upgrades(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg).ToNot(BeNil()) - }) - - It("Uptime returns a response", func() { - req := connect.NewRequest(&infov1.UptimeRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.Uptime(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg).ToNot(BeNil()) - }) - - It("VMs returns at least avm", func() { - req := connect.NewRequest(&infov1.VMsRequest{}) - req.Header().Set("Avalanche-API-Route", "info") - resp, err := client.VMs(ctx, req) - Expect(err).ToNot(HaveOccurred()) - Expect(resp.Msg.Vms).To(HaveKey("avm")) - }) -}) From 483757ea518d31ebfff34aa00139089ed4c92b10 Mon Sep 17 00:00:00 2001 From: Michael Pignatelli <160453082+mpignatelli12@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:32:13 -0400 Subject: [PATCH 13/13] clean diff --- api/admin/service.go | 2 +- go.mod | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/api/admin/service.go b/api/admin/service.go index f27c6417835a..b756feada37a 100644 --- a/api/admin/service.go +++ b/api/admin/service.go @@ -388,7 +388,7 @@ type DBGetReply struct { ErrorCode rpcdbpb.Error `json:"errorCode"` } -//nolint:stylecheck // renaming this method to DBGet would change the API method from "dbGet" to "dBGet" +//nolint:staticcheck // renaming this method to DBGet would change the API method from "dbGet" to "dBGet" func (a *Admin) DbGet(_ *http.Request, args *DBGetArgs, reply *DBGetReply) error { a.Log.Debug("API called", zap.String("service", "admin"), diff --git a/go.mod b/go.mod index 56eb544b2efe..72b3ae1604c2 100644 --- a/go.mod +++ b/go.mod @@ -94,7 +94,6 @@ require ( github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect - github.com/ava-labs/firewood-go-ethhash/ffi v0.0.8 // indirect github.com/ava-labs/simplex v0.0.0-20250715173145-e4fe035cb9b2 github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect