Documentation
¶
Index ¶
- Variables
- func HandlePrometheusMetrics(mux *http.ServeMux)
- func LoggingPayloadDecider(config *viper.Viper) grpc_logging.ServerPayloadLoggingDecider
- func NewGatewayServeMux(params GatewayServeMuxParams) *runtime.ServeMux
- func NewGrpcServer(lc fx.Lifecycle, config *viper.Viper, logger *logrus.Entry, p GrpcServerParams) *grpc.Server
- func NewServeMux(lc fx.Lifecycle, config *viper.Viper, logger *logrus.Entry) *http.ServeMux
- func RegisterPrometheus(s *grpc.Server)
- func RegisterProtoMux(mux *http.ServeMux, gatewayMux *runtime.ServeMux)
- type GatewayServeMuxParams
- type GrpcServerParams
- type ServeMuxMarshallerParams
- type ServeMuxMarshallerResult
- type ServerInterceptorResult
Constants ¶
This section is empty.
Variables ¶
View Source
var GatewayMuxModule = fx.Options( fx.Provide(NewServeMuxMarshallerOption), fx.Provide(NewGatewayServeMux), fx.Invoke(RegisterProtoMux), )
View Source
var GrpcLoggingPayloadModule = fx.Provide(LoggingPayloadDecider)
View Source
var HTTPModule = fx.Provide(NewServeMux)
View Source
var InterceptorsModule = fx.Provide(NewStreamServerInterceptors, NewUnaryServerInterceptors)
View Source
var Module = fx.Provide(NewGrpcServer)
Module register grpc server in DI container
View Source
var PrometheusMetrics = fx.Invoke(RegisterPrometheus)
PrometheusMetrics register grpc server in prometheus
View Source
var PrometheusMetricsHandler = fx.Invoke(HandlePrometheusMetrics)
PrometheusMetricsHandler .
Functions ¶
func HandlePrometheusMetrics ¶
HandlePrometheusMetrics .
func LoggingPayloadDecider ¶
func LoggingPayloadDecider(config *viper.Viper) grpc_logging.ServerPayloadLoggingDecider
LoggingPayloadDecider decide is need to log payload
func NewGatewayServeMux ¶
func NewGatewayServeMux(params GatewayServeMuxParams) *runtime.ServeMux
func NewGrpcServer ¶
func NewGrpcServer(lc fx.Lifecycle, config *viper.Viper, logger *logrus.Entry, p GrpcServerParams) *grpc.Server
NewGrpcServer gives new predefined grpc server
func NewServeMux ¶
Types ¶
type GatewayServeMuxParams ¶
type GatewayServeMuxParams struct { fx.In Options []runtime.ServeMuxOption `group:"gateway_server_mux_options"` }
type GrpcServerParams ¶
type GrpcServerParams struct { fx.In ServerOptions []grpc.ServerOption `group:"grpc_server_options"` }
GrpcServerParams .
type ServeMuxMarshallerParams ¶
type ServeMuxMarshallerParams struct { fx.In AnyResolver jsonpb.AnyResolver `name:"gateway_marshaller_any_resolver" optional:"true"` }
type ServeMuxMarshallerResult ¶
type ServeMuxMarshallerResult struct { fx.Out Option runtime.ServeMuxOption `group:"gateway_server_mux_options"` }
func NewServeMuxMarshallerOption ¶
func NewServeMuxMarshallerOption(p ServeMuxMarshallerParams, config *viper.Viper) ServeMuxMarshallerResult
type ServerInterceptorResult ¶
type ServerInterceptorResult struct { fx.Out Option grpc.ServerOption `group:"grpc_server_options"` }
func NewStreamServerInterceptors ¶
func NewStreamServerInterceptors(logger *logrus.Entry, tracer opentracing.Tracer, PayloadLoggingDecider grpcLogging.ServerPayloadLoggingDecider) ServerInterceptorResult
func NewUnaryServerInterceptors ¶
func NewUnaryServerInterceptors(logger *logrus.Entry, tracer opentracing.Tracer, PayloadLoggingDecider grpcLogging.ServerPayloadLoggingDecider) ServerInterceptorResult
Click to show internal directories.
Click to hide internal directories.