Documentation ¶
Overview ¶
Package server is generic grpc server-side.
Index ¶
- func Run(port int, registerFn RegisterFn, options ...Option)
- type Option
- func WithSecure(credential credentials.TransportCredentials) Option
- func WithServiceRegister(fn ServiceRegisterFn) Option
- func WithStatConnections(opts ...metrics.ConnectionOption) Option
- func WithStreamInterceptor(interceptors ...grpc.StreamServerInterceptor) Option
- func WithUnaryInterceptor(interceptors ...grpc.UnaryServerInterceptor) Option
- type RegisterFn
- type ServiceRegisterFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*options)
Option set server option
func WithSecure ¶
func WithSecure(credential credentials.TransportCredentials) Option
WithSecure set secure
func WithServiceRegister ¶
func WithServiceRegister(fn ServiceRegisterFn) Option
WithServiceRegister set service register
func WithStatConnections ¶
func WithStatConnections(opts ...metrics.ConnectionOption) Option
WithStatConnections enable stat connections
func WithStreamInterceptor ¶
func WithStreamInterceptor(interceptors ...grpc.StreamServerInterceptor) Option
WithStreamInterceptor set stream interceptor
func WithUnaryInterceptor ¶
func WithUnaryInterceptor(interceptors ...grpc.UnaryServerInterceptor) Option
WithUnaryInterceptor set unary interceptor
Click to show internal directories.
Click to hide internal directories.