Documentation ¶
Index ¶
- Variables
- type Config
- type Server
- type ServerOption
- func WithServerLogger(logger *zap.Logger) ServerOption
- func WithServerName(name string) ServerOption
- func WithServerOptions(opts ...grpc.ServerOption) ServerOption
- func WithServerPort(port int) ServerOption
- func WithServerReflection(enabled bool) ServerOption
- func WithServerShutdownTimeout(shutdownTimeout time.Duration) ServerOption
- func WithService(desc *grpc.ServiceDesc, impl any) ServerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var NewServer = c.NewWithValidate[Server, ServerOption]
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Port int `validate:"gt=1000,lt=65536"` ReflectionEnabled bool `json:"reflection_enabled" yaml:"reflection_enabled"` MaxRequestBytes int `json:"max_request_bytes" yaml:"max_request_bytes" validate:"gt=0"` MaxResponseBytes int `json:"max_response_bytes" yaml:"max_response_bytes" validate:"gt=0"` }
type ServerOption ¶
func WithServerLogger ¶
func WithServerLogger(logger *zap.Logger) ServerOption
func WithServerName ¶
func WithServerName(name string) ServerOption
func WithServerOptions ¶
func WithServerOptions(opts ...grpc.ServerOption) ServerOption
func WithServerPort ¶
func WithServerPort(port int) ServerOption
func WithServerReflection ¶
func WithServerReflection(enabled bool) ServerOption
func WithServerShutdownTimeout ¶
func WithServerShutdownTimeout(shutdownTimeout time.Duration) ServerOption
func WithService ¶
func WithService(desc *grpc.ServiceDesc, impl any) ServerOption
Click to show internal directories.
Click to hide internal directories.