Documentation ¶
Overview ¶
Package servers provides common servers starting code for all SaaS components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunDebugServer ¶
func RunDebugServer(ctx context.Context, opts *RunDebugServerOpts)
RunDebugServer runs debug server with given options until ctx is canceled. All errors cause panic.
func RunHTTPServer ¶
func RunHTTPServer(ctx context.Context, opts *RunHTTPServerOpts)
RunHTTPServer runs HTTP server with given options until ctx is canceled. All errors cause panic.
Types ¶
type GRPCServer ¶
type GRPCServer interface { // Run runs the server until ctx is canceled. Run(ctx context.Context) // GetUnderlyingServer returns underlying grpc.Server, use it for your server // implementation registration. Don't use any control method of returned grpc.Server; // use GRPCServer.Run method only. GetUnderlyingServer() *grpc.Server }
GRPCServer is an interface wrapper for gRPC Server.
func NewGRPCServer ¶
func NewGRPCServer(ctx context.Context, opts *NewGRPCServerOpts) GRPCServer
NewGRPCServer creates new gRPC server with given options.
type NewGRPCServerOpts ¶
type NewGRPCServerOpts struct { Addr string WarnDuration time.Duration ShutdownTimeout time.Duration }
NewGRPCServerOpts configure gRPC server.
Click to show internal directories.
Click to hide internal directories.