Documentation ¶
Index ¶
- func NewServer(opts ...Option) service.IService
- type Config
- type ConnectRPCService
- type Option
- func WithConfig(v Config) Option
- func WithConnectRPCOptions(opts ...connect.HandlerOption) Option
- func WithHttpServer(v *http.Server) Option
- func WithLogger(v logger.Logger) Option
- func WithName(v string) Option
- func WithReflection(services ...string) Option
- func WithServeMux(v *http.ServeMux) Option
- func WithServerHandlerWrapper(v func(h http.Handler) http.Handler) Option
- func WithServices(services ...ConnectRPCService) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Enabled bool `default:"true" usage:"allows to enable server" example:"true"` Addr string `default:":9000" validate:"required,hostname_port" usage:"server listen address" example:"localhost:9000"` }
Config provides configuration for grpc server.
type ConnectRPCService ¶
type ConnectRPCService interface { Name() string RegisterHandler(otps ...connect.HandlerOption) (string, http.Handler) }
IService custom interface for gRPC service.
type Option ¶
type Option func(s *connectRPCServer)
Option allows customizing gRPC server.
func WithConnectRPCOptions ¶
func WithConnectRPCOptions(opts ...connect.HandlerOption) Option
WithConnectRPCOptions allows adding new connect rpc options.
func WithHttpServer ¶
WithHttpServer allows set custom http.Server.
func WithReflection ¶
WithServer allows to use reflection for grpc server.
func WithServeMux ¶
WithServer allows set custom gRPC Server.
func WithServerHandlerWrapper ¶
WithServerHandlerWrapper allows set custom server handler wrapper.
func WithServices ¶
func WithServices(services ...ConnectRPCService) Option
WithServices allows adding new gRPC Service.
Click to show internal directories.
Click to hide internal directories.