queue

package
v2.0.0-...-7478b89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindParams

type BindParams struct {
	Name     string
	Key      string
	Exchange string
	NoWait   bool
	Args     map[string]interface{}
}

func NewQueueBindParams

func NewQueueBindParams(name, key, exchange string) BindParams

type Params

type Params struct {
	Name       string
	QosCount   int
	AutoAck    bool
	Kind       string
	Durable    bool
	Internal   bool
	AutoDelete bool
	Exclusive  bool
	NoWait     bool
	Args       map[string]interface{}
}

func NewQueueParams

func NewQueueParams(name string) Params

type Queue

type Queue struct {
	OnPublishedEvent    fnPublish
	OnNotPublishedEvent fnPublish
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue(params Params, connection *amqp.Connection) (*Queue, error)

func (*Queue) Cancel

func (q *Queue) Cancel() error

func (*Queue) Close

func (q *Queue) Close()

func (*Queue) ErrorConsume

func (q *Queue) ErrorConsume() <-chan error

func (*Queue) Publish

func (q *Queue) Publish(message interface{}) error

func (*Queue) StartConsume

func (q *Queue) StartConsume(consumeHandler fnConsume) error

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewQueueRepository

func NewQueueRepository(conf config.QueueConfig) (*Repository, error)

func (*Repository) ExchangeDeclare

func (q *Repository) ExchangeDeclare(params Params) error

func (*Repository) QueueBind

func (q *Repository) QueueBind(params BindParams) error

func (*Repository) QueueDeclare

func (q *Repository) QueueDeclare(params Params, withErrorQueue bool) (*Queue, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL