subscriber

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange struct {
	Name          string
	Type          ExchangeType
	IsDurable     bool
	IsAutoDeleted bool
	IsInternal    bool
	NoWait        bool
	Args          map[string]interface{}
	RoutingKey    string
}

type ExchangeType

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

func (ExchangeType) String

func (t ExchangeType) String() string

func (ExchangeType) Value

func (t ExchangeType) Value() ExchangeType

type Option

type Option func(s Subscriber)

func WithDurableFanoutExchange

func WithDurableFanoutExchange(name string) Option

func WithDurablePriorityQueue

func WithDurablePriorityQueue(name string, maxPriority uint8) Option

func WithDurableQueue

func WithDurableQueue(name string) Option

func WithDurableTopicExchange

func WithDurableTopicExchange(name, routingKey string) Option

func WithName

func WithName(name string) Option

func WithPrefetchQos

func WithPrefetchQos(count, size int, isGlobal bool) Option

type PrefetchQos

type PrefetchQos struct {
	Count    int
	Size     int
	IsGlobal bool
}

type Queue

type Queue struct {
	Name          string
	Durable       bool
	AutoDelete    bool
	Exclusive     bool
	NoWait        bool
	MaxPriority   uint8
	QueueBindArgs map[string]interface{}
}

func (*Queue) GetArgs

func (o *Queue) GetArgs() amqp.Table

type Subscriber

type Subscriber interface {
	pubsub.Subscriber
	AddExchange(exchange *Exchange)
	SetQueue(queue *Queue)
	SetName(name string)
	SetPrefetchQos(qos *PrefetchQos)
}

func New

func New(uri string, options ...Option) Subscriber

Jump to

Keyboard shortcuts

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