Documentation
¶
Index ¶
- type Option
- func CombineOptions(options ...Option) Option
- func NoopOption() Option
- func WithGRPCServerOption(opt grpc.ServerOption) Option
- func WithGracePeriod(t time.Duration) Option
- func WithListen(s string) Option
- func WithNetwork(s string) Option
- func WithOtelTracing() Option
- func WithServer(f registerServerFunc) Option
- func WithStreamServerInterceptor(interceptor grpc.StreamServerInterceptor) Option
- func WithTLSConfig(cfg *tls.Config) Option
- func WithUnaryServerInterceptor(interceptor grpc.UnaryServerInterceptor) Option
- type Options
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option = func(o *Options)
func CombineOptions ¶
func NoopOption ¶
func NoopOption() Option
func WithGRPCServerOption ¶
func WithGRPCServerOption(opt grpc.ServerOption) Option
WithGRPCServerOption allows adding raw grpc.ServerOption's to the instantiated gRPC server.
func WithGracePeriod ¶
WithGracePeriod sets shutdown grace period for gRPC server. Server waits connections to drain for specified amount of time.
func WithListen ¶
WithListen sets address to listen for gRPC server. Server accepts incoming connections on given address.
func WithNetwork ¶
WithNetwork sets network to listen for gRPC server e.g tcp, udp or unix.
func WithOtelTracing ¶
func WithOtelTracing() Option
func WithServer ¶
func WithServer(f registerServerFunc) Option
WithGRPCServer calls the passed gRPC registration functions on the created grpc.Server.
func WithStreamServerInterceptor ¶
func WithStreamServerInterceptor(interceptor grpc.StreamServerInterceptor) Option
func WithTLSConfig ¶
WithTLSConfig sets TLS configuration for gRPC server.
func WithUnaryServerInterceptor ¶
func WithUnaryServerInterceptor(interceptor grpc.UnaryServerInterceptor) Option
Click to show internal directories.
Click to hide internal directories.