Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Addr string `config:"addr" validate:"required"`
// GracePeriod bounds GracefulStop, which waits on in-flight calls forever.
// It has to be under the drain budget the app publishes.
GracePeriod time.Duration `config:"grace_period" validate:"required"`
Reflection bool `config:"reflection"`
Health bool `config:"health"`
// MaxReceiveBytes caps one received message, and takes a binary unit such
// as "16MiB". The server answers a larger message with ResourceExhausted.
MaxReceiveBytes config.Bytes `config:"max_receive_bytes" validate:"min=1"`
}
type Option ¶
type Option func(*options)
func WithAddr ¶ added in v0.5.0
WithAddr replaces the default of addr. A configured addr still replaces this value. An empty addr keeps the default.
func WithMaxReceiveBytes ¶ added in v0.5.0
WithMaxReceiveBytes replaces the default of max_receive_bytes. A configured max_receive_bytes still replaces this value. Zero keeps the default.
func WithStreamInterceptors ¶ added in v0.5.0
func WithStreamInterceptors(interceptors ...StreamInterceptor) Option
WithStreamInterceptors chains the interceptors in the order given, outermost first.
func WithUnaryInterceptors ¶
func WithUnaryInterceptors(interceptors ...UnaryInterceptor) Option
WithUnaryInterceptors chains the interceptors in the order given, outermost first.
type StreamInterceptor ¶ added in v0.5.0
type StreamInterceptor func(do.Injector) (grpc.StreamServerInterceptor, error)
type UnaryInterceptor ¶
type UnaryInterceptor func(do.Injector) (grpc.UnaryServerInterceptor, error)
Click to show internal directories.
Click to hide internal directories.