Versions in this module Expand all Collapse all v0 v0.0.1 Oct 24, 2016 Changes in this version + const DEFAULT_EXCHANGE + func RequestQueueName(name string) string + func ResponseQueueName(name string) string + type Client struct + Channel *amqp.Channel + Connection *amqp.Connection + ResponseQueue *amqp.Queue + UUID uuid.UUID + func NewBareClient(uuid uuid.UUID) *Client + func NewClient(url string) (*Client, error) + func (c *Client) Call(method string, params []interface{}, queue string) (interface{}, error) + func (c *Client) CallWithRequest(request *Request, queue string) (interface{}, error) + func (c *Client) DecodeResponse(response *Response) (interface{}, error) + func (c *Client) Publish(payload *Request, queue string) error + func (c *Client) PublishAndWait(payload *Request, queue string) (*Response, error) + func (c *Client) SetupResponseQueue() error + type CustomError struct + func (err *CustomError) Code() int + func (err *CustomError) Data() interface{} + func (err *CustomError) Error() string + func (err *CustomError) Message() string + type Error interface + Code func() int + Data func() interface{} + Message func() string + func WrapError(err error) Error + type ErrorResponse struct + Code int + Data interface{} + Message string + func (e *ErrorResponse) Error() string + type Handler interface + Handle func(*Request) (interface{}, error) + type HandlerFunc func(*Request) (interface{}, error) + func (fn HandlerFunc) Handle(req *Request) (interface{}, error) + type MethodNotFoundError struct + func (err *MethodNotFoundError) Code() int + func (err *MethodNotFoundError) Error() string + func (err *MethodNotFoundError) Message() string + type ParseError struct + func (err *ParseError) Code() int + func (err *ParseError) Data() interface{} + func (err *ParseError) Error() string + func (err *ParseError) Message() string + type Request struct + Id string + JsonRpc string + Method string + Params []interface{} + type Response struct + Error *ErrorResponse + Id string + JsonRpc string + Result interface{} + type Server struct + Connection *amqp.Connection + func NewServer() *Server + func (server *Server) Connect(url string) error + func (server *Server) Drain(queue string, handler Handler) + func (server *Server) DrainFunc(queue string, handler func(*Request) (interface{}, error)) + func (server *Server) Start() error + func (server *Server) Stop() error + type WrappedError struct + func (err *WrappedError) Code() int + func (err *WrappedError) Data() interface{} + func (err *WrappedError) Message() string