connection

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Logger zerolog.Logger
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(url string, configuration connection.Config, componentName string, logger zerolog.Logger) (Consumer, error)

func (Consumer) Close

func (c Consumer) Close() error

func (*Consumer) Consume

func (cns *Consumer) Consume(queueName string, th2Pin string, th2Type string, handler func(delivery amqp.Delivery) error) error

func (*Consumer) ConsumeWithManualAck

func (cns *Consumer) ConsumeWithManualAck(queueName string, th2Pin string, th2Type string, handler func(msgDelivery amqp.Delivery, timer *prometheus.Timer) error) error

type Manager

type Manager struct {
	Publisher *Publisher
	Consumer  *Consumer

	Logger zerolog.Logger
	// contains filtered or unexported fields
}

func NewConnectionManager

func NewConnectionManager(connConfiguration connection.Config, componentName string, logger zerolog.Logger) (Manager, error)

func (*Manager) Close

func (manager *Manager) Close() error

func (*Manager) ListenForBlockingNotifications added in v0.2.0

func (manager *Manager) ListenForBlockingNotifications()

type Publisher

type Publisher struct {
	Logger zerolog.Logger
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher(url string, configuration connCfg.Config, componentName string, logger zerolog.Logger) (Publisher, error)

func (Publisher) Close

func (c Publisher) Close() error

func (*Publisher) Publish

func (pb *Publisher) Publish(body []byte, routingKey string, exchange string, th2Pin string, th2Type string) error

Jump to

Keyboard shortcuts

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