connectionmanager

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionManager

type ConnectionManager struct {
	ReconnectInterval time.Duration
	// contains filtered or unexported fields
}

ConnectionManager -

func NewConnectionManager

func NewConnectionManager(url string, conf amqp.Config, log logger.Logger, reconnectInterval time.Duration) (*ConnectionManager, error)

NewConnectionManager creates a new connection manager

func (*ConnectionManager) CheckinConnection

func (connManager *ConnectionManager) CheckinConnection()

CheckinConnection -

func (*ConnectionManager) CheckoutConnection

func (connManager *ConnectionManager) CheckoutConnection() *amqp.Connection

CheckoutConnection -

func (*ConnectionManager) Close

func (connManager *ConnectionManager) Close() error

Close safely closes the current channel and connection

func (*ConnectionManager) GetReconnectionCount

func (connManager *ConnectionManager) GetReconnectionCount() uint

GetReconnectionCount -

func (*ConnectionManager) NotifyBlockedSafe

func (connManager *ConnectionManager) NotifyBlockedSafe(
	receiver chan amqp.Blocking,
) chan amqp.Blocking

NotifyBlockedSafe safely wraps the (*amqp.Connection).NotifyBlocked method

func (*ConnectionManager) NotifyReconnect

func (connManager *ConnectionManager) NotifyReconnect() (<-chan error, chan<- struct{})

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

Jump to

Keyboard shortcuts

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