Documentation ¶
Index ¶
- type MsOption
- func Address(address string) MsOption
- func ID(id string) MsOption
- func Name(name string) MsOption
- func WitStreamLoggingMiddleware(logger *zap.Logger) MsOption
- func WitStreamPrometheusMiddleware() MsOption
- func WitUnaryLoggingMiddleware(logger *zap.Logger) MsOption
- func WitUnaryPrometheusMiddleware() MsOption
- func WithConnTimeout(t time.Duration) MsOption
- func WithHTTPMiddleware(mw func(http.Handler) http.Handler) MsOption
- func WithHealthz() MsOption
- func WithMaxConcurrentStreams(num uint32) MsOption
- func WithReflection() MsOption
- func WithRestIncomingHeaderMatcher(matcher runtime.HeaderMatcherFunc) MsOption
- func WithRestLoggingMiddleware(logger *zap.Logger) MsOption
- func WithRestMarshaler(mime string, msh runtime.Marshaler) MsOption
- func WithRestOutgoingHeaderMatcher(matcher runtime.HeaderMatcherFunc) MsOption
- func WithRestServices(services ...restMw.RestService) MsOption
- func WithServices(services ...middleware.GrpcService) MsOption
- type MsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MsOption ¶
type MsOption func(*MsOptions)
func WitStreamPrometheusMiddleware ¶
func WitStreamPrometheusMiddleware() MsOption
func WitUnaryPrometheusMiddleware ¶
func WitUnaryPrometheusMiddleware() MsOption
func WithConnTimeout ¶
WithStatsHandler ConnectionTimeout returns a ServerOption that sets the timeout for connection establishment (up to and including HTTP/2 handshaking) for all new connections. If this is not set, the default is 120 seconds.
func WithHealthz ¶
func WithHealthz() MsOption
func WithMaxConcurrentStreams ¶
WithMaxConcurrentStreams returns a ServerOption that will apply a limit on the number of concurrent streams to each ServerTransport.
func WithReflection ¶
func WithReflection() MsOption
WithReflection adds grpc server reflection to the list of Services ref: https://godoc.org/google.golang.org/grpc/reflection
func WithRestIncomingHeaderMatcher ¶
func WithRestIncomingHeaderMatcher(matcher runtime.HeaderMatcherFunc) MsOption
func WithRestMarshaler ¶
grpc-gateway options
func WithRestOutgoingHeaderMatcher ¶
func WithRestOutgoingHeaderMatcher(matcher runtime.HeaderMatcherFunc) MsOption
func WithRestServices ¶
func WithRestServices(services ...restMw.RestService) MsOption
func WithServices ¶
func WithServices(services ...middleware.GrpcService) MsOption
type MsOptions ¶
type MsOptions struct { Name string ID string Address string Version string Services []middleware.GrpcService RestServices []restMw.RestService UnaryInterceptors []grpc.UnaryServerInterceptor StreamInterceptors []grpc.StreamServerInterceptor GrpcOptions []grpc.ServerOption RestOptions []runtime.ServeMuxOption RestMiddleware alice.Chain UsePrometheus bool }
func (*MsOptions) ServerOptions ¶
func (c *MsOptions) ServerOptions() []grpc.ServerOption
Click to show internal directories.
Click to hide internal directories.