Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = fmt.Errorf("timeout expired")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for doing msgpack-encoded JSON-RPC over AMQP.
func NewClient ¶
Creates a new client, connecting to the AMQP URL specified. A nil amqp.Config may be specified for default connection parameters.
func (*Client) Call ¶
func (c *Client) Call(exchange, routingKey, method string, args map[string]interface{}, timeout time.Duration) (map[string]interface{}, error)
Initiates an RPC call using the exchange, routing key, method and arguments specified. If the timeout is nonzero, and a response is not received within the timeout, ErrTimeout is returned (any reply received after that is discarded). If a JSON-RPC error occurs, the error returned will be of type *RPCError. On success, returns the result map.
Click to show internal directories.
Click to hide internal directories.