Documentation
¶
Index ¶
- Constants
- func SetupConsumerChild[JobType any, ChildType Consumer[JobType]](parent *AbstractConsumer[JobType], child ChildType) ChildType
- type AbstractConsumer
- type Consumer
- type DelayPublisher
- type DelayPublisherOption
- func WithDelayExchangeArgs(args amqp.Table) DelayPublisherOption
- func WithDelayExchangeDurable(v bool) DelayPublisherOption
- func WithDelayExchangeName(name string) DelayPublisherOption
- func WithDelayQueueArgs(args amqp.Table) DelayPublisherOption
- func WithDelayQueueDurable(v bool) DelayPublisherOption
- func WithQueueExpireGrace(d time.Duration) DelayPublisherOption
- type ExchangeKind
- type NewOption
- func WithConsumeArgs[JobType any](consumeArgs amqp.Table) NewOption[JobType]
- func WithConsumeAutoAck[JobType any](consumeAutoAck bool) NewOption[JobType]
- func WithConsumeExclusive[JobType any](consumeExclusive bool) NewOption[JobType]
- func WithConsumeNoLocal[JobType any](consumeNoLocal bool) NewOption[JobType]
- func WithConsumeNoWait[JobType any](consumeNoWait bool) NewOption[JobType]
- func WithConsumerTag[JobType any](consumerTag string) NewOption[JobType]
- func WithExchangeArgs[JobType any](exchangeArgs amqp.Table) NewOption[JobType]
- func WithExchangeAutoDelete[JobType any](exchangeAutoDelete bool) NewOption[JobType]
- func WithExchangeDurable[JobType any](exchangeDurable bool) NewOption[JobType]
- func WithExchangeInternal[JobType any](exchangeInternal bool) NewOption[JobType]
- func WithExchangeKind[JobType any](exchangeKind ExchangeKind) NewOption[JobType]
- func WithExchangeName[JobType any](exchangeName string) NewOption[JobType]
- func WithExchangeNoWait[JobType any](exchangeNoWait bool) NewOption[JobType]
- func WithPrefetchCount[JobType any](prefetchCount int) NewOption[JobType]
- func WithPrefetchSize[JobType any](prefetchSize int) NewOption[JobType]
- func WithQosGlobal[JobType any](qosGlobal bool) NewOption[JobType]
- func WithQueueArgs[JobType any](queueArgs amqp.Table) NewOption[JobType]
- func WithQueueAutoDelete[JobType any](queueAutoDelete bool) NewOption[JobType]
- func WithQueueBindArgs[JobType any](queueBindArgs amqp.Table) NewOption[JobType]
- func WithQueueBindKey[JobType any](queueBindKey string) NewOption[JobType]
- func WithQueueBindNoWait[JobType any](queueBindNoWait bool) NewOption[JobType]
- func WithQueueDurable[JobType any](queueDurable bool) NewOption[JobType]
- func WithQueueExclusive[JobType any](queueExclusive bool) NewOption[JobType]
- func WithQueueNoWait[JobType any](queueNoWait bool) NewOption[JobType]
- type Pusher
- type PusherOption
- func WithPusherExchangeArgs(exchangeArgs amqp.Table) PusherOption
- func WithPusherExchangeAutoDelete(exchangeAutoDelete bool) PusherOption
- func WithPusherExchangeDurable(exchangeDurable bool) PusherOption
- func WithPusherExchangeInternal(exchangeInternal bool) PusherOption
- func WithPusherExchangeKind(exchangeKind ExchangeKind) PusherOption
- func WithPusherExchangeName(exchangeName string) PusherOption
- func WithPusherExchangeNoWait(exchangeNoWait bool) PusherOption
- func WithPusherQueueArgs(queueArgs amqp.Table) PusherOption
- func WithPusherQueueAutoDelete(queueAutoDelete bool) PusherOption
- func WithPusherQueueBindArgs(queueBindArgs amqp.Table) PusherOption
- func WithPusherQueueBindKey(queueBindKey string) PusherOption
- func WithPusherQueueBindNoWait(queueBindNoWait bool) PusherOption
- func WithPusherQueueDurable(queueDurable bool) PusherOption
- func WithPusherQueueExclusive(queueExclusive bool) PusherOption
- func WithPusherQueueNoWait(queueNoWait bool) PusherOption
Constants ¶
View Source
const (
JsonContentType = "application/json"
)
Variables ¶
This section is empty.
Functions ¶
func SetupConsumerChild ¶
func SetupConsumerChild[JobType any, ChildType Consumer[JobType]]( parent *AbstractConsumer[JobType], child ChildType, ) ChildType
Types ¶
type AbstractConsumer ¶
type AbstractConsumer[JobType any] struct { // contains filtered or unexported fields }
func NewAbstractConsumer ¶
func NewAbstractConsumer[JobType any]( dsn string, options ...NewOption[JobType], ) AbstractConsumer[JobType]
func (*AbstractConsumer[JobType]) Init ¶
func (c *AbstractConsumer[JobType]) Init() error
func (*AbstractConsumer[JobType]) SetHandleFunc ¶
func (c *AbstractConsumer[JobType]) SetHandleFunc(handleFunc func(JobType) error)
func (*AbstractConsumer[JobType]) Stop ¶ added in v0.0.3
func (c *AbstractConsumer[JobType]) Stop()
type DelayPublisher ¶ added in v0.0.4
type DelayPublisher struct {
// contains filtered or unexported fields
}
func NewDelayPublisher ¶ added in v0.0.4
func NewDelayPublisher(dsn string, opts ...DelayPublisherOption) *DelayPublisher
type DelayPublisherOption ¶ added in v0.0.4
type DelayPublisherOption func(*DelayPublisher)
func WithDelayExchangeArgs ¶ added in v0.0.4
func WithDelayExchangeArgs(args amqp.Table) DelayPublisherOption
func WithDelayExchangeDurable ¶ added in v0.0.4
func WithDelayExchangeDurable(v bool) DelayPublisherOption
func WithDelayExchangeName ¶ added in v0.0.4
func WithDelayExchangeName(name string) DelayPublisherOption
func WithDelayQueueArgs ¶ added in v0.0.4
func WithDelayQueueArgs(args amqp.Table) DelayPublisherOption
func WithDelayQueueDurable ¶ added in v0.0.4
func WithDelayQueueDurable(v bool) DelayPublisherOption
func WithQueueExpireGrace ¶ added in v0.0.4
func WithQueueExpireGrace(d time.Duration) DelayPublisherOption
type ExchangeKind ¶
type ExchangeKind string
const ( ExchangeDirect ExchangeKind = "direct" ExchangeFanout ExchangeKind = "fanout" ExchangeTopic ExchangeKind = "topic" ExchangeHeaders ExchangeKind = "headers" )
type NewOption ¶
type NewOption[JobType any] func(*AbstractConsumer[JobType])
func WithConsumeAutoAck ¶
func WithConsumeExclusive ¶
func WithConsumeNoLocal ¶
func WithConsumeNoWait ¶
func WithConsumerTag ¶
func WithExchangeArgs ¶
func WithExchangeAutoDelete ¶
func WithExchangeDurable ¶
func WithExchangeInternal ¶
func WithExchangeKind ¶
func WithExchangeKind[JobType any](exchangeKind ExchangeKind) NewOption[JobType]
func WithExchangeName ¶
func WithExchangeNoWait ¶
func WithPrefetchCount ¶
func WithPrefetchSize ¶
func WithQosGlobal ¶
func WithQueueAutoDelete ¶
func WithQueueBindArgs ¶
func WithQueueBindKey ¶
func WithQueueBindNoWait ¶
func WithQueueDurable ¶
func WithQueueExclusive ¶
func WithQueueNoWait ¶
type Pusher ¶
type Pusher struct {
// contains filtered or unexported fields
}
func NewPusher ¶
func NewPusher(dsn string, options ...PusherOption) Pusher
type PusherOption ¶
type PusherOption func(*Pusher)
func WithPusherExchangeArgs ¶
func WithPusherExchangeArgs(exchangeArgs amqp.Table) PusherOption
func WithPusherExchangeAutoDelete ¶
func WithPusherExchangeAutoDelete(exchangeAutoDelete bool) PusherOption
func WithPusherExchangeDurable ¶
func WithPusherExchangeDurable(exchangeDurable bool) PusherOption
func WithPusherExchangeInternal ¶
func WithPusherExchangeInternal(exchangeInternal bool) PusherOption
func WithPusherExchangeKind ¶
func WithPusherExchangeKind(exchangeKind ExchangeKind) PusherOption
func WithPusherExchangeName ¶
func WithPusherExchangeName(exchangeName string) PusherOption
func WithPusherExchangeNoWait ¶
func WithPusherExchangeNoWait(exchangeNoWait bool) PusherOption
func WithPusherQueueArgs ¶
func WithPusherQueueArgs(queueArgs amqp.Table) PusherOption
func WithPusherQueueAutoDelete ¶
func WithPusherQueueAutoDelete(queueAutoDelete bool) PusherOption
func WithPusherQueueBindArgs ¶
func WithPusherQueueBindArgs(queueBindArgs amqp.Table) PusherOption
func WithPusherQueueBindKey ¶
func WithPusherQueueBindKey(queueBindKey string) PusherOption
func WithPusherQueueBindNoWait ¶
func WithPusherQueueBindNoWait(queueBindNoWait bool) PusherOption
func WithPusherQueueDurable ¶
func WithPusherQueueDurable(queueDurable bool) PusherOption
func WithPusherQueueExclusive ¶
func WithPusherQueueExclusive(queueExclusive bool) PusherOption
func WithPusherQueueNoWait ¶
func WithPusherQueueNoWait(queueNoWait bool) PusherOption
Click to show internal directories.
Click to hide internal directories.