Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { SendMessage(string, []byte) error ReceiveMessages(context.Context, string, chan<- []byte, chan<- error) }
Client interface operates against memory database instance
type MessageBroker ¶
type MessageBroker struct {
Client Client
}
MessageBroker uses Client in order to operate against messagebroker instance
func (MessageBroker) ReceiveMessages ¶
func (messageBroker MessageBroker) ReceiveMessages(ctx context.Context, queueName string, messages chan<- []byte, errors chan<- error)
ReceiveMessages receives messages through queueName using Client
func (MessageBroker) SendMessage ¶
func (messageBroker MessageBroker) SendMessage(queueName string, message []byte) error
SendMessage sends a message through queueName using Client
type RabbitmqClient ¶
type RabbitmqClient struct {
// contains filtered or unexported fields
}
RabbitmqClient is the real Redis client, it has Client methods
func NewRabbimqClient ¶
func NewRabbimqClient(rabbitmqConfig *rabbitmqconfig.Config) RabbitmqClient
func (RabbitmqClient) ReceiveMessages ¶
func (client RabbitmqClient) ReceiveMessages(ctx context.Context, queueName string, messages chan<- []byte, errors chan<- error)
ReceiveMessages stores messages in channel until it is closed using context
func (RabbitmqClient) SendMessage ¶
func (client RabbitmqClient) SendMessage(queueName string, message []byte) error
SendMessage sends a message through queueName
Click to show internal directories.
Click to hide internal directories.