messenger

package
v1.0.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AppDeployQueue = "application.deploy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployApplication

type DeployApplication struct {
	// ID application ID
	ID uint
	// Attempt number of attempts to deploy this application
	Attempt uint
	// Commit the deployed commit
	Commit *string
	// Version the deployed version
	Version *string
}

type Messenger

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

func NewMessenger

func NewMessenger(dsn string) (*Messenger, error)

func (*Messenger) Close

func (m *Messenger) Close() error

func (*Messenger) CountMessages

func (m *Messenger) CountMessages(queue string) (int, error)

CountMessages get the total messages in a queue

func (*Messenger) GetMessages

func (m *Messenger) GetMessages(queue string) (<-chan amqp.Delivery, *amqp.Channel, error)

GetMessages return messages from broker and a channel

func (*Messenger) Publish

func (m *Messenger) Publish(queue string, body []byte) error

func (*Messenger) PurgeQueue

func (m *Messenger) PurgeQueue(queue string) error

PurgeQueue purge non delivered messages in a queue

Jump to

Keyboard shortcuts

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