queue

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Key    string
	NoWait bool
	Args   amqp.Table
}

Binding used to declare binding between AMQP Queue and AMQP Exchange

type Option

type Option func(Queue) Queue

func AddBinding

func AddBinding(b Binding) Option

func Args

func Args(a amqp.Table) Option

func AutoDelete

func AutoDelete() Option

func Durable

func Durable() Option

func Exclusive

func Exclusive() Option

func Name

func Name(name string) Option

func NoWait

func NoWait() Option

type Queue

type Queue struct {
	Name       string
	Durable    bool
	AutoDelete bool
	Exclusive  bool
	NoWait     bool
	Args       amqp.Table

	Bindings []Binding
}

Queue hold definition of AMQP queue

func New

func New(opts ...Option) Queue

New returns a Queue definition with the following defaults unless changed via the Option options.

 Queue{
	 Name: "",
	 Durable: false,
	 AutoDelete: false,
	 Exclusive: false,
	 NoWait: false,
	 Args: nil,
	 Bindings: []Binding{},
 }

Jump to

Keyboard shortcuts

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