Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client can make RPC requests over HTTP.
func NewClient ¶
func NewClient(url string, codecFn NewClientCodecFunc, tweak func(*http.Request)) *Client
NewClient returns a Client that directs its requests at the specified url. If a tweak function is supplied, it is called on each http.Request immediately before the request is performed.
func (*Client) Call ¶
Call invokes the named function, waits for it to complete, and returns its error status.
func (*Client) Go ¶
func (c *Client) Go(method string, args interface{}, reply interface{}, done chan *rpc.Call) *rpc.Call
Go invokes the function asynchronously. It returns the rpc.Call structure representing the invocation. The done channel will signal when the call is complete by returning the same rpc.Call object. If done is nil, Go will allocate a new channel.
type NewClientCodecFunc ¶
type NewClientCodecFunc func(io.ReadWriteCloser) rpc.ClientCodec
NewClientCodecFunc creates a new rpc.ClientCodec.
type NewServerCodecFunc ¶
type NewServerCodecFunc func(io.ReadWriteCloser) rpc.ServerCodec
NewServerCodecFunc creates a new rpc.ServerCodec.