exchange

package
v0.0.0-...-7a62f64 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	Name       string
	Type       ExchangeType
	Durable    bool
	AutoDelete bool
	Internal   bool
	NoWait     bool
	Args       amqp.Table
}

func NewDefinition

func NewDefinition(name string, exchangeType ExchangeType, opts ...ExchangeOpt) *Definition

func (Definition) CreateExchange

func (e Definition) CreateExchange(ctx context.Context, channel *amqp.Channel) error

type ExchangeOpt

type ExchangeOpt func(*Definition)

func WithArgs

func WithArgs(args amqp.Table) ExchangeOpt

func WithAutoDelete

func WithAutoDelete(autoDelete bool) ExchangeOpt

func WithDurable

func WithDurable(durable bool) ExchangeOpt

func WithInternal

func WithInternal(internal bool) ExchangeOpt

func WithNoWait

func WithNoWait(noWait bool) ExchangeOpt

type ExchangeType

type ExchangeType int
const (
	ExchangeTypeDirect ExchangeType = iota
	ExchangeTypeFanout
	ExchangeTypeTopic
	ExchangeTypeHeaders
)

func ExchangeTypeFromString

func ExchangeTypeFromString(s string) (ExchangeType, error)

func (ExchangeType) String

func (e ExchangeType) String() string

Jump to

Keyboard shortcuts

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