start implementing gw serve mux support
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/rs/zerolog"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
@ -23,10 +24,15 @@ type appGRPCServer struct {
|
||||
serverOpts []grpc.ServerOption
|
||||
logger *zerolog.Logger
|
||||
server *grpc.Server
|
||||
gatewayMux *runtime.ServeMux
|
||||
shutdownFunc func(context.Context) error
|
||||
doneChan chan error
|
||||
}
|
||||
|
||||
func (g *appGRPCServer) GetMux() *runtime.ServeMux {
|
||||
return g.gatewayMux
|
||||
}
|
||||
|
||||
// Returns a shutdown func, a channel indicating done / error,
|
||||
// and an up-front error if server fails to start
|
||||
func InitGRPCServer(ctx context.Context, opts *opts.GRPCOpts) (
|
||||
|
Reference in New Issue
Block a user