server

package
v0.0.0-...-c9859a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GrpcLoggingPayloadModule = fx.Provide(LoggingPayloadDecider)
View Source
var HTTPModule = fx.Provide(NewServeMux)

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

func HandlePrometheusMetrics(mux *http.ServeMux)

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

func NewServeMux(lc fx.Lifecycle, config *viper.Viper, logger *logrus.Entry) *http.ServeMux

func RegisterPrometheus

func RegisterPrometheus(s *grpc.Server)

RegisterPrometheus .

func RegisterProtoMux

func RegisterProtoMux(mux *http.ServeMux, gatewayMux *runtime.ServeMux)

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"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL