Documentation ¶
Index ¶
- Variables
- func Run(cfg *config.Config)
- type ConnectionInfo
- type MessageBus
- type MessagingClient
- func (m *MessagingClient) Close()
- func (m *MessagingClient) ConnectToBroker()
- func (m *MessagingClient) HandleAMQPCommandEvents(d amqp.Delivery)
- func (m *MessagingClient) Publish(body []byte, exchangeName string, exchangeType string, queueName string, ...) error
- func (m *MessagingClient) PublishEvent(body []byte) error
- func (m *MessagingClient) PublishOnQueue(body []byte, queueName string) error
- func (m *MessagingClient) ReplyError(error_msg string, jsonrpc_id interface{})
- func (m *MessagingClient) ReplyOK(jsonrpc_id interface{}, cmd_id string)
- func (m *MessagingClient) StartAMQPListener()
- func (m *MessagingClient) Subscribe(exchangeName string, exchangeType string, routingKey string, queueName string, ...) error
- func (m *MessagingClient) SubscribeToQueue(queueName string, consumerName string, handlerFunc func(amqp.Delivery)) error
- type ReceivedCommand
- type WSCmdEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var Cfg *config.Config
Functions ¶
Types ¶
type ConnectionInfo ¶
type MessageBus ¶
type MessagingClient ¶
type MessagingClient struct { Events MessageBus Commands MessageBus Connector ConnectionInfo // contains filtered or unexported fields }
MessagingClient - Real implementation, encapsulates a pointer to an amqp.Connection
var Service *MessagingClient
func (*MessagingClient) ConnectToBroker ¶
func (m *MessagingClient) ConnectToBroker()
ConnectToBroker - Connects to the given RabbitMQ URL string
func (*MessagingClient) HandleAMQPCommandEvents ¶
func (m *MessagingClient) HandleAMQPCommandEvents(d amqp.Delivery)
HandleAMQPCommandEvents - Retrieve Pusblished AMQP Event here
func (*MessagingClient) Publish ¶
func (m *MessagingClient) Publish(body []byte, exchangeName string, exchangeType string, queueName string, routingKey string) error
Publish - Pusblish the given Body into the given exchange details
func (*MessagingClient) PublishEvent ¶
func (m *MessagingClient) PublishEvent(body []byte) error
func (*MessagingClient) PublishOnQueue ¶
func (m *MessagingClient) PublishOnQueue(body []byte, queueName string) error
PublishOnQueue - Sends the Body to a Queue Directly !
func (*MessagingClient) ReplyError ¶
func (m *MessagingClient) ReplyError(error_msg string, jsonrpc_id interface{})
func (*MessagingClient) ReplyOK ¶
func (m *MessagingClient) ReplyOK(jsonrpc_id interface{}, cmd_id string)
func (*MessagingClient) StartAMQPListener ¶
func (m *MessagingClient) StartAMQPListener()
func (*MessagingClient) Subscribe ¶
func (m *MessagingClient) Subscribe(exchangeName string, exchangeType string, routingKey string, queueName string, handlerFunc func(amqp.Delivery)) error
Subscribe - Subscribe for events happening in a particular exchnage
func (*MessagingClient) SubscribeToQueue ¶
func (m *MessagingClient) SubscribeToQueue(queueName string, consumerName string, handlerFunc func(amqp.Delivery)) error
SubscribeToQueue - Subscribe messages coming to a particular queue directly !
type ReceivedCommand ¶
type WSCmdEvent ¶
type WSCmdEvent struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.