package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
FatalIfUnexpected calls Log.Fatal(err) unless err is nil, or an error that comes from the net package indicating that the listener was closed or from the Stopper indicating quiescence.
IsClosedConnection returns true if err is a non-temporary net.Error or is cmux.ErrListenerClosed, grpc.ErrServerStopped, io.EOF, or net.ErrClosed.
ListenAndServeGRPC creates a listener and serves the specified grpc Server on it, closing the listener when signaled by the stopper.
MakeHTTPServer constructs a http.Server that tracks active connections, closing them when signaled by stopper.
MakeTCPServer constructs a connection server that tracks active connections, closing them when signaled by stopper.
NewInitialHeartBeatFailedError creates a new InitialHeartbeatFailedError.
NewLoopbackListener constructs a new LoopbackListener.
SRV returns a slice of addresses from SRV record lookup.
TestingOverrideSRVLookupFn enables a test to temporarily override the SRV lookup function.
# Variables
ErrLocalListenerClosed is returned when the listener is shutting down.
# Structs
HTTPServer is a thin wrapper around http.Server.
InitialHeartbeatFailedError indicates that while attempting a GRPC connection to a node, we aren't successful and have never seen a heartbeat over that connection before.
LoopbackListener implements a local listener that delivers net.Conns via its Connect() method based on the other side calls to its Accept() method.
TCPServer is wrapper around a map of active connections.