Rename GRPCRouter (#8079)

* rename GRPCRouter

* Update store/types/store.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Fix gofmt

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
This commit is contained in:
Anil Kumar Kammari
2020-12-04 15:06:50 +00:00
committed by GitHub
co-authored by Robert Zaremba
parent 7ec3bcd23a
commit 4a233b8dcf
31 changed files with 76 additions and 53 deletions
+5 -5
View File
@@ -26,9 +26,9 @@ import (
// Server defines the server's API interface.
type Server struct {
Router *mux.Router
GRPCRouter *runtime.ServeMux
ClientCtx client.Context
Router *mux.Router
GRPCGatewayRouter *runtime.ServeMux
ClientCtx client.Context
logger log.Logger
metrics *telemetry.Metrics
@@ -63,7 +63,7 @@ func New(clientCtx client.Context, logger log.Logger) *Server {
Router: mux.NewRouter(),
ClientCtx: clientCtx,
logger: logger,
GRPCRouter: runtime.NewServeMux(
GRPCGatewayRouter: runtime.NewServeMux(
// Custom marshaler option is required for gogo proto
runtime.WithMarshalerOption(runtime.MIMEWildcard, marshalerOption),
@@ -124,7 +124,7 @@ func (s *Server) Close() error {
}
func (s *Server) registerGRPCGatewayRoutes() {
s.Router.PathPrefix("/").Handler(s.GRPCRouter)
s.Router.PathPrefix("/").Handler(s.GRPCGatewayRouter)
}
func (s *Server) registerMetrics() {
+2 -1
View File
@@ -10,8 +10,9 @@ import (
"strings"
"testing"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client/flags"
)
var CancelledInPreRun = errors.New("Canelled in prerun")