Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TCPServer ¶
type TCPServer interface { // Run runs the TCPServer. // For a given instance of TCPServer, Run is expected // to be called only once. Run(ctx context.Context) error // GrpcListener returns the gRPC listener that // can be listened on by a gRPC server. GrpcListener() net.Listener // HTTP1Listener returns a plain HTTP listener. HTTP1Listener() net.Listener // IsTLSEnabled returns whether TLS has been enabled. IsTLSEnabled() bool // Close closed the TCPServer. // The listeners returned by GrpcListener and HTTP1Listener // will be closed, which will force the consumers of these // listeners to stop. This provides a reliable mechanism to // cancel all related components. Close() error }
TCPServer provides a muxed socket that can serve both plain HTTP and gRPC at the same time.
func NewTCPServer ¶
func NewTCPServer(address string, credentials *security.Credential) (TCPServer, error)
NewTCPServer creates a new TCPServer
Click to show internal directories.
Click to hide internal directories.