Documentation ¶
Index ¶
- func MarshalProto(message proto.Message) ([]byte, error)
- func UnmarshalProto(data []byte, message proto.Message) error
- type MockRabbitMQ
- func (m *MockRabbitMQ) Close()
- func (m *MockRabbitMQ) Consume(queueName string) (<-chan amqp091.Delivery, error)
- func (m *MockRabbitMQ) DeclareExchange(exchangeName, exchangeType string) error
- func (m *MockRabbitMQ) Publish(exchange, routingKey string, body []byte) error
- func (m *MockRabbitMQ) SetupQueue(queueName, exchangeName string, routingKeys []string) error
- type RabbitMQ
- func (x *RabbitMQ) Close()
- func (x *RabbitMQ) Consume(queueName string) (<-chan amqp091.Delivery, error)
- func (x *RabbitMQ) DeclareExchange(exchangeName, exchangeType string) error
- func (x *RabbitMQ) Publish(exchange, routingKey string, body []byte) error
- func (x *RabbitMQ) SetupQueue(queueName, exchangeName string, routingKeys []string) error
- type RabbitMQInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalProto ¶
MarshalProto serializes a Protobuf message
Types ¶
type MockRabbitMQ ¶
func (*MockRabbitMQ) Close ¶
func (m *MockRabbitMQ) Close()
func (*MockRabbitMQ) Consume ¶
func (m *MockRabbitMQ) Consume(queueName string) (<-chan amqp091.Delivery, error)
func (*MockRabbitMQ) DeclareExchange ¶
func (m *MockRabbitMQ) DeclareExchange(exchangeName, exchangeType string) error
func (*MockRabbitMQ) Publish ¶
func (m *MockRabbitMQ) Publish(exchange, routingKey string, body []byte) error
func (*MockRabbitMQ) SetupQueue ¶
func (m *MockRabbitMQ) SetupQueue(queueName, exchangeName string, routingKeys []string) error
type RabbitMQ ¶
type RabbitMQ struct { Conn *amqp091.Connection Channel *amqp091.Channel }
func NewRabbitMQ ¶
NewRabbitMQ initializes a RabbitMQ connection and channel
func (*RabbitMQ) Close ¶
func (x *RabbitMQ) Close()
Close closes the RabbitMQ connection and channel
func (*RabbitMQ) DeclareExchange ¶
DeclareExchange declares an exchange if it doesn't exist
type RabbitMQInterface ¶
Click to show internal directories.
Click to hide internal directories.