Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithPeerInfo ¶
func PeerInfoFromContext ¶
PeerInfoFromContext returns information about the client's network connection. Use this with the context passed to RPC method handler functions.
The zero value is returned if no connection info is present in ctx.
Types ¶
type Server ¶
type Server struct { Tracing Tracing // contains filtered or unexported fields }
Server is an RPC server.
func (*Server) ServeCodec ¶
func (s *Server) ServeCodec(pctx context.Context, remote codec.ReaderWriter)
ServeCodec reads incoming requests from codec, calls the appropriate callback and writes the response back using the given codec. It will block until the codec is closed or the server is stopped. In either case the codec is closed.
type Tracing ¶
type Tracing struct {
ErrorLogger func(remote codec.ReaderWriter, err error)
}
Click to show internal directories.
Click to hide internal directories.