amqp

package
v0.0.0-...-87b6a28 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConnectionIdentifier string

	InstanceId string

	AmqpHost string
	AmqpUser string
	AmqpPass string
	AmqpPort int
)

Functions

func Consume

func Consume(deliveryTag string, handlerFunc HandlerFunc, count int) (*sync.WaitGroup, *sync.WaitGroup)

func ConsumeForever

func ConsumeForever(deliveryTag string, handlerFunc HandlerFunc) (*sync.WaitGroup, *sync.WaitGroup)

func ConsumeSingle

func ConsumeSingle(deliveryTag string, handlerFunc HandlerFunc) (*sync.WaitGroup, *sync.WaitGroup)

func Decode

func Decode(in []byte, typ interface{}) interface{}

func Encode

func Encode(in interface{}) []byte

func GetChannel

func GetChannel(name string) (*amqp.Channel, error)

func Publish

func Publish(routingKey string, msg amqp.Publishing) error

func PublishPb

func PublishPb(msg interface{})

func PublishPbWithChannel

func PublishPbWithChannel(c *amqp.Channel, msg interface{})

func PublishWithChannel

func PublishWithChannel(c *amqp.Channel, routingKey string, msg amqp.Publishing) error

func StartServerListener

func StartServerListener()

Types

type Delivery

type Delivery struct {
	Message amqp.Delivery
}

A dumb Delivery wrapper, so dependencies on this lib don't have to depened on the streadway lib

type HandlerFunc

type HandlerFunc func(d Delivery)

Jump to

Keyboard shortcuts

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