Versions in this module Expand all Collapse all v0 v0.0.1 Aug 17, 2022 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 interface{}) error + func RegisterName(name string, rcvr interface{}) error + func ServeCodec(codec ServerCodec) + func ServeConn(conn io.ReadWriteCloser) + func ServeRequest(codec ServerCodec) error + type Call struct + Args interface{} + Done chan *Call + Error error + Reply interface{} + 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 interface{}, reply interface{}) error + func (client *Client) Close() error + func (client *Client) Go(serviceMethod string, args interface{}, reply interface{}, done chan *Call) *Call + type ClientCodec interface + Close func() error + ReadResponseBody func(interface{}) error + ReadResponseHeader func(*Response) error + WriteRequest func(*Request, interface{}) 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 interface{}) error + func (server *Server) RegisterName(name string, rcvr interface{}) 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(interface{}) error + ReadRequestHeader func(*Request) error + WriteResponse func(*Response, interface{}) error + type ServerError string + func (e ServerError) Error() string