Documentation ¶
Overview ¶
Package rpc provides a mockable wrapper for net/rpc.
Index ¶
- type Impl
- func (*Impl) Accept(lis net.Listener)
- func (*Impl) Dial(network string, address string) (*rpc.Client, error)
- func (*Impl) DialHTTP(network string, address string) (*rpc.Client, error)
- func (*Impl) DialHTTPPath(network string, address string, path string) (*rpc.Client, error)
- func (*Impl) HandleHTTP()
- func (*Impl) NewClient(conn io.ReadWriteCloser) *rpc.Client
- func (*Impl) NewClientWithCodec(codec rpc.ClientCodec) *rpc.Client
- func (*Impl) NewServer() *rpc.Server
- func (*Impl) Register(rcvr any) error
- func (*Impl) RegisterName(name string, rcvr any) error
- func (*Impl) ServeCodec(codec rpc.ServerCodec)
- func (*Impl) ServeConn(conn io.ReadWriteCloser)
- func (*Impl) ServeRequest(codec rpc.ServerCodec) error
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) DialHTTPPath ¶
func (*Impl) HandleHTTP ¶
func (*Impl) HandleHTTP()
func (*Impl) NewClientWithCodec ¶
func (*Impl) NewClientWithCodec(codec rpc.ClientCodec) *rpc.Client
func (*Impl) ServeCodec ¶
func (*Impl) ServeCodec(codec rpc.ServerCodec)
func (*Impl) ServeConn ¶
func (*Impl) ServeConn(conn io.ReadWriteCloser)
func (*Impl) ServeRequest ¶
func (*Impl) ServeRequest(codec rpc.ServerCodec) error
type Interface ¶
type Interface interface { Accept(lis net.Listener) Dial(network string, address string) (*rpc.Client, error) DialHTTP(network string, address string) (*rpc.Client, error) DialHTTPPath(network string, address string, path string) (*rpc.Client, error) HandleHTTP() NewClient(conn io.ReadWriteCloser) *rpc.Client NewClientWithCodec(codec rpc.ClientCodec) *rpc.Client NewServer() *rpc.Server Register(rcvr any) error RegisterName(name string, rcvr any) error ServeCodec(codec rpc.ServerCodec) ServeConn(conn io.ReadWriteCloser) ServeRequest(codec rpc.ServerCodec) error }
Click to show internal directories.
Click to hide internal directories.