Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ListenHTTP string ListenGRPC string ListenInternalHTTP string ListenInternalGRPC string }
Config is the required configuration for the server.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default config for the server.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an option for the server.
func WithGRPCOptions ¶
WithGRPCOptions returns an Option that adds the given GRPC options.
func WithHTTPOptions ¶
WithHTTPOptions returns an Option that adds the given HTTP options.
func WithInternalGRPCOptions ¶
WithInternalGRPCOptions returns an Option that adds the given GRPC options for the internal server.
func WithInternalHTTPOptions ¶
WithInternalHTTPOptions returns an Option that adds the given HTTP options for the internal server.
type Server ¶
type Server struct { GRPC *grpc.Server HTTP *http.Server InternalGRPC *grpc.Server InternalHTTP *http.Server // contains filtered or unexported fields }
Server wraps gRPC and HTTP servers.
func (*Server) RegisterTCPServer ¶
func (s *Server) RegisterTCPServer(name, address string, server interface { Serve(lis net.Listener) error GracefulStop() error }) error
RegisterTCPServer registers the named TCP server on address.
func (*Server) RegisterUDPServer ¶
func (s *Server) RegisterUDPServer(name, address string, server interface { Serve(conn net.PacketConn) error GracefulStop() error }) error
RegisterUDPServer registers the named UDP server on address.
Directories ¶
Path | Synopsis |
---|---|
Package cookie provides middleware for working with device, session and user session cookies.
|
Package cookie provides middleware for working with device, session and user session cookies. |
Package grpc provides the backbone for a gRPC server with some opinionated defaults.
|
Package grpc provides the backbone for a gRPC server with some opinionated defaults. |
Package http provides the backbone for an HTTP server with some opinionated defaults.
|
Package http provides the backbone for an HTTP server with some opinionated defaults. |
internal
|
|
channelz
Package channelz can be used to expose the channelz service on the gRPC server.
|
Package channelz can be used to expose the channelz service on the gRPC server. |
Package packet provides the backbone for a UDP packet server with some opinionated defaults.
|
Package packet provides the backbone for a UDP packet server with some opinionated defaults. |
Package recovery can be used to add panic recovery middleware to the server.
|
Package recovery can be used to add panic recovery middleware to the server. |
Package reflection can be used to support gRPC server reflection on the server.
|
Package reflection can be used to support gRPC server reflection on the server. |
Package stream provides the backbone for a TCP stream server with some opinionated defaults.
|
Package stream provides the backbone for a TCP stream server with some opinionated defaults. |