Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const DefaultDebugPath + const DefaultRPCPath + var DefaultServer = NewServer() + var ErrShutdown = errors.New("connection is shut down") + func Accept(lis net.Listener) + func HandleHTTP() + func Register(rcvr any) error + func RegisterName(name string, rcvr any) error + func ServeCodec(codec ServerCodec) + func ServeConn(conn io.ReadWriteCloser) + func ServeRequest(codec ServerCodec) error + type Call struct + Args any + Done chan *Call + Error error + Reply any + ServiceMethod string + type Client struct + func Dial(network, address string) (*Client, error) + func DialHTTP(network, address string) (*Client, error) + func DialHTTPPath(network, address, path string) (*Client, error) + func NewClient(conn io.ReadWriteCloser) *Client + func NewClientWithCodec(codec ClientCodec) *Client + func (client *Client) Call(serviceMethod string, args any, reply any) error + func (client *Client) Close() error + func (client *Client) Go(serviceMethod string, args any, reply any, done chan *Call) *Call + type ClientCodec interface + Close func() error + ReadResponseBody func(any) error + ReadResponseHeader func(*Response) error + WriteRequest func(*Request, any) error + type Request struct + Seq uint64 + ServiceMethod string + type Response struct + Error string + Seq uint64 + ServiceMethod string + type Server struct + func NewServer() *Server + func (server *Server) Accept(lis net.Listener) + func (server *Server) HandleHTTP(rpcPath, debugPath string) + func (server *Server) Register(rcvr any) error + func (server *Server) RegisterName(name string, rcvr any) error + func (server *Server) ServeCodec(codec ServerCodec) + func (server *Server) ServeConn(conn io.ReadWriteCloser) + func (server *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (server *Server) ServeRequest(codec ServerCodec) error + type ServerCodec interface + Close func() error + ReadRequestBody func(any) error + ReadRequestHeader func(*Request) error + WriteResponse func(*Response, any) error + type ServerError string + func (e ServerError) Error() string