Documentation ¶
Index ¶
- type IMessagingClient
- type MessagingClient
- func (m *MessagingClient) Close()
- func (m *MessagingClient) Publish(body []byte, exchangeName string, exchangeType string) error
- func (m *MessagingClient) PublishOnQueue(body []byte, queueName string) error
- func (m *MessagingClient) Subscribe(exchangeName string, exchangeType string, consumerName string, ...) error
- func (m *MessagingClient) SubscribeToQueue(queueName string, consumerName string, handlerFunc func(amqp.Delivery)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMessagingClient ¶
type IMessagingClient interface { ConnectToBroker(connectionString string) Publish(msg []byte, exchangeName string, exchangeType string) error PublishOnQueue(msg []byte, queueName string) error Subscribe(exchangeName string, exchangeType string, consumerName string, handlerFunc func(amqp.Delivery)) error SubscribeToQueue(queueName string, consumerName string, handlerFunc func(amqp.Delivery)) error Close() }
Defines our interface for connecting and consuming messages.
type MessagingClient ¶
type MessagingClient struct {
// contains filtered or unexported fields
}
Real implementation, encapsulates a pointer to an amqp.Connection
func NewMessagingClient ¶
func NewMessagingClient() *MessagingClient
func (*MessagingClient) Close ¶
func (m *MessagingClient) Close()
func (*MessagingClient) Publish ¶
func (m *MessagingClient) Publish(body []byte, exchangeName string, exchangeType string) error
func (*MessagingClient) PublishOnQueue ¶
func (m *MessagingClient) PublishOnQueue(body []byte, queueName string) error
func (*MessagingClient) SubscribeToQueue ¶
Click to show internal directories.
Click to hide internal directories.