Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("broker", fx.Provide(NewService), fx.Provide(NewController), )
Functions ¶
func NewController ¶
func NewController(p ControllerParams) pb.BrokerServer
Types ¶
type ControllerParams ¶
type ControllerParams struct { fx.In Service Service Logger *zap.SugaredLogger }
type MessageQueue ¶
type MessageQueue struct { Queue // contains filtered or unexported fields }
func NewQueue ¶
func NewQueue(name string) *MessageQueue
func (*MessageQueue) Ack ¶
func (q *MessageQueue) Ack(deliveryTag int64)
func (*MessageQueue) Nack ¶
func (q *MessageQueue) Nack(deliveryTag int64, requeue bool)
func (*MessageQueue) Publish ¶
func (q *MessageQueue) Publish(delivery *Delivery)
type Service ¶
type Service interface { Consume(queue string, consumer string, autoAck bool) (<-chan Delivery, error) ExchangeDeclare(name string) error Publish(exchange, key string, msg []byte) error Get(queue string, autoAck bool) (msg Delivery, ok bool, err error) QueueBind(name, key, exchange string) error QueueDeclare(name string) (Queue, error) }
func NewService ¶
func NewService() Service
Click to show internal directories.
Click to hide internal directories.