amqp

package
v0.2.3-0...-5ed8acd Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package amqp holds code required for reading messages from RabbitMQ.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

Connection struct holds data for AMQP connection

func NewConnection

func NewConnection(dsn string, initQueues InitQueuesHandler) (*Connection, error)

NewConnection instantiates and establishes new AMQP connection

func (*Connection) Close

func (c *Connection) Close() error

Close closes AMQP connection

type InitQueuesHandler

type InitQueuesHandler func(conn *amqp.Connection) error

InitQueuesHandler is a handler function type for AMQP connection

func NewQueuesHandler

func NewQueuesHandler(pipes []config.Pipe, handler MessageHandler, statsClient client.Client) InitQueuesHandler

NewQueuesHandler instantiates queues initialisation handler

type MessageHandler

type MessageHandler func(body []byte, pipe config.Pipe) error

MessageHandler is a handler function type for consumed messages

Jump to

Keyboard shortcuts

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