Documentation ¶
Index ¶
- func OpenConnection(addr string) (*amqp.Connection, error)
- type Channel
- type Consumer
- func (c *Consumer) Consume(ctx context.Context, queueName string, handler Handler) error
- func (c *Consumer) Handle(delivery <-chan amqp.Delivery, handler Handler, done chan error)
- func (c *Consumer) ReConnect()
- func (c *Consumer) Run() error
- func (c *Consumer) Start() error
- func (c *Consumer) Stop() error
- type Handler
- type Producer
- type Queue
- type Server
- type SubscribeOptionMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenConnection ¶
func OpenConnection(addr string) (*amqp.Connection, error)
OpenConnection connect to rabbitmq
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel data channel
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer define consumer for rabbitmq
func NewConsumer ¶
NewConsumer instance a consumer
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
Producer define struct for rabbitmq
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) RegisterSubscriber ¶
type SubscribeOptionMap ¶
Click to show internal directories.
Click to hide internal directories.