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: 0

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