Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailOnError ¶
Types ¶
type Client ¶
type Client struct { RabbitHostname string RabbitUser string RabbitPass string RabbitPort int64 ContentType string Conn *Connection }
Client use to initiate a go nameko client
func (*Client) Call ¶
func (c *Client) Call(p RPCRequestParam) (interface{}, error)
Call publish a message to nameko service and return corresponding response
type Connection ¶
type Connection struct { Name string RabbitHostname string RabbitUser string RabbitPass string RabbitPort int64 ContentType string // contains filtered or unexported fields }
func (*Connection) Call ¶
func (c *Connection) Call(p RPCRequestParam) (interface{}, error)
func (*Connection) Declare ¶
func (c *Connection) Declare()
func (*Connection) Serve ¶
func (c *Connection) Serve(name string)
type Error ¶
type Error struct {
Type, Value string
}
Error represent gonamekoclient customize error
type RPCError ¶
type RPCError struct { ExcArgs string `json:"exc_args"` ExcPath string `json:"exc_path"` ExcType string `json:"exc_type"` Value string `json:"value"` }
RPCError capture exception from nameko service
type RPCPayload ¶
RPCPayload define arguments accept by nameko service
type RPCRequestParam ¶
type RPCRequestParam struct {
Service, Function string
Payload RPCPayload
}
RPCRequestParam define nameko service and function, arguments
type RPCResponse ¶
RPCResponse Use to parse resposne from nameko service
Click to show internal directories.
Click to hide internal directories.