Documentation ¶
Index ¶
- type Consumer
- type ExchangeOption
- type MessageHandle
- type Option
- func WithDsn(s string) Option
- func WithExchangeDeclare(es ...ExchangeOption) Option
- func WithName(s string) Option
- func WithOnError(f func(error)) Option
- func WithOnSubMessage(queue string, f MessageHandle) Option
- func WithQos(prefetchCount, prefetchSize int, global bool) Option
- func WithQueueDeclare(qs ...QueueOption) Option
- type Producer
- type QueueBind
- type QueueOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
type ExchangeOption ¶
type ExchangeOption struct { // 交换机名称 Name string // 交换机类型 如 fanout direct topic Kind string // Durable 持久化 Durable bool // AutoDelete设置为 true 表示自动删除 慎用 不是自动删除交换机。 AutoDelete bool }
ExchangeOption 交换机信息 sub & pub 都可以用
type MessageHandle ¶
MessageHandle ding
type Option ¶
type Option func(*option)
func WithExchangeDeclare ¶
func WithExchangeDeclare(es ...ExchangeOption) Option
func WithOnError ¶
func WithOnSubMessage ¶
func WithOnSubMessage(queue string, f MessageHandle) Option
WithOnSubMessage only sub
func WithQueueDeclare ¶
func WithQueueDeclare(qs ...QueueOption) Option
Click to show internal directories.
Click to hide internal directories.