amqp

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DurationNotDefined = time.Duration(-1)
)

Variables

View Source
var DefaultConfig = AmqpOptions{
	Prefetch: 1,

	AutoDeleteQueues:    DurationNotDefined,
	EventTimeToLive:     DurationNotDefined,
	HeartbeatTimeToLive: DurationNotDefined,
}

Functions

func CreateAmqpTransporter

func CreateAmqpTransporter(options AmqpOptions) transit.Transport

Types

type AmqpOptions

type AmqpOptions struct {
	Url             []string
	QueueOptions    map[string]interface{}
	ExchangeOptions map[string]interface{}
	MessageOptions  map[string]interface{}
	ConsumeOptions  amqp.Table

	Logger     *log.Entry
	Serializer serializer.Serializer

	DisableReconnect    bool
	AutoDeleteQueues    time.Duration
	EventTimeToLive     time.Duration
	HeartbeatTimeToLive time.Duration
	Prefetch            int
}

type AmqpTransporter

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

func (*AmqpTransporter) Connect

func (t *AmqpTransporter) Connect() chan error

func (*AmqpTransporter) Disconnect

func (t *AmqpTransporter) Disconnect() chan error

func (*AmqpTransporter) Publish

func (t *AmqpTransporter) Publish(command, nodeID string, message nucleo.Payload)

func (*AmqpTransporter) SetNodeID

func (t *AmqpTransporter) SetNodeID(nodeID string)

func (*AmqpTransporter) SetPrefix

func (t *AmqpTransporter) SetPrefix(prefix string)

func (*AmqpTransporter) SetSerializer

func (t *AmqpTransporter) SetSerializer(serializer serializer.Serializer)

func (*AmqpTransporter) Subscribe

func (t *AmqpTransporter) Subscribe(command, nodeID string, handler transit.TransportHandler)

Jump to

Keyboard shortcuts

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