Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomGRPCHeaderMatcher ¶
CustomGRPCHeaderMatcher for mapping request headers to GRPC metadata. HTTP headers that start with 'Grpc-Metadata-' are automatically mapped to gRPC metadata after removing prefix 'Grpc-Metadata-'. We can use this CustomGRPCHeaderMatcher if headers don't start with `Grpc-Metadata-`
Types ¶
type Server ¶
type Server struct { Router *mux.Router GRPCGatewayRouter *runtime.ServeMux ClientCtx client.Context // contains filtered or unexported fields }
Server defines the server's API interface.
func (*Server) SetTelemetry ¶
func (*Server) Start ¶
Start starts the API server. Internally, the API server leverages Tendermint's JSON RPC server. Configuration options are provided via config.APIConfig and are delegated to the Tendermint JSON RPC server. The process is non-blocking, so an external signal handler must be used. and are delegated to the CometBFT JSON RPC server.
Note, this creates a blocking process if the server is started successfully. Otherwise, an error is returned. The caller is expected to provide a Context that is properly canceled or closed to indicate the server should be stopped.