channelmanager

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelManager

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

ChannelManager -

func NewChannelManager

func NewChannelManager(connManager *connectionmanager.ConnectionManager, log logger.Logger, reconnectInterval time.Duration) (*ChannelManager, error)

NewChannelManager creates a new connection manager

func (*ChannelManager) Close

func (chanManager *ChannelManager) Close() error

Close safely closes the current channel and connection

func (*ChannelManager) ConfirmSafe

func (chanManager *ChannelManager) ConfirmSafe(
	noWait bool,
) error

ConfirmSafe safely wraps the (*amqp.Channel).Confirm method

func (*ChannelManager) ConsumeSafe

func (chanManager *ChannelManager) ConsumeSafe(
	queue,
	consumer string,
	autoAck,
	exclusive,
	noLocal,
	noWait bool,
	args amqp.Table,
) (<-chan amqp.Delivery, error)

ConsumeSafe safely wraps the (*amqp.Channel).Consume method

func (*ChannelManager) ExchangeDeclarePassiveSafe

func (chanManager *ChannelManager) ExchangeDeclarePassiveSafe(
	name string, kind string, durable bool, autoDelete bool, internal bool, noWait bool, args amqp.Table,
) error

ExchangeDeclarePassiveSafe safely wraps the (*amqp.Channel).ExchangeDeclarePassive method

func (*ChannelManager) ExchangeDeclareSafe

func (chanManager *ChannelManager) ExchangeDeclareSafe(
	name string, kind string, durable bool, autoDelete bool, internal bool, noWait bool, args amqp.Table,
) error

ExchangeDeclareSafe safely wraps the (*amqp.Channel).ExchangeDeclare method

func (*ChannelManager) GetReconnectionCount

func (chanManager *ChannelManager) GetReconnectionCount() uint

GetReconnectionCount -

func (*ChannelManager) NotifyFlowSafe

func (chanManager *ChannelManager) NotifyFlowSafe(
	c chan bool,
) chan bool

NotifyFlowSafe safely wraps the (*amqp.Channel).NotifyFlow method

func (*ChannelManager) NotifyPublishSafe

func (chanManager *ChannelManager) NotifyPublishSafe(
	confirm chan amqp.Confirmation,
) chan amqp.Confirmation

NotifyPublishSafe safely wraps the (*amqp.Channel).NotifyPublish method

func (*ChannelManager) NotifyReconnect

func (chanManager *ChannelManager) NotifyReconnect() (<-chan error, chan<- struct{})

NotifyReconnect adds a new subscriber that will receive error messages whenever the connection manager has successfully reconnect to the server

func (*ChannelManager) NotifyReturnSafe

func (chanManager *ChannelManager) NotifyReturnSafe(
	c chan amqp.Return,
) chan amqp.Return

NotifyReturnSafe safely wraps the (*amqp.Channel).NotifyReturn method

func (*ChannelManager) PublishSafe

func (chanManager *ChannelManager) PublishSafe(
	exchange string, key string, mandatory bool, immediate bool, msg amqp.Publishing,
) error

PublishSafe safely wraps the (*amqp.Channel).Publish method.

func (*ChannelManager) PublishWithContextSafe

func (chanManager *ChannelManager) PublishWithContextSafe(
	ctx context.Context, exchange string, key string, mandatory bool, immediate bool, msg amqp.Publishing,
) error

PublishWithContextSafe safely wraps the (*amqp.Channel).PublishWithContext method.

func (*ChannelManager) PublishWithDeferredConfirmWithContextSafe

func (chanManager *ChannelManager) PublishWithDeferredConfirmWithContextSafe(
	ctx context.Context, exchange string, key string, mandatory bool, immediate bool, msg amqp.Publishing,
) (*amqp.DeferredConfirmation, error)

func (*ChannelManager) QosSafe

func (chanManager *ChannelManager) QosSafe(
	prefetchCount int, prefetchSize int, global bool,
) error

QosSafe safely wraps the (*amqp.Channel).Qos method

func (*ChannelManager) QueueBindSafe

func (chanManager *ChannelManager) QueueBindSafe(
	name string, key string, exchange string, noWait bool, args amqp.Table,
) error

QueueBindSafe safely wraps the (*amqp.Channel).QueueBind method

func (*ChannelManager) QueueDeclarePassiveSafe

func (chanManager *ChannelManager) QueueDeclarePassiveSafe(
	name string,
	durable bool,
	autoDelete bool,
	exclusive bool,
	noWait bool,
	args amqp.Table,
) (amqp.Queue, error)

QueueDeclarePassiveSafe safely wraps the (*amqp.Channel).QueueDeclarePassive method

func (*ChannelManager) QueueDeclareSafe

func (chanManager *ChannelManager) QueueDeclareSafe(
	name string, durable bool, autoDelete bool, exclusive bool, noWait bool, args amqp.Table,
) (amqp.Queue, error)

QueueDeclareSafe safely wraps the (*amqp.Channel).QueueDeclare method

Jump to

Keyboard shortcuts

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