amqp

package
v0.0.0-...-3997d68 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQP

type AMQP struct {
	Name    string
	Config  *AMQPConfig
	Client  *amqp.Connection
	Channel *amqp.Channel
	Errors  chan error
}

func NewAMQP

func NewAMQP(name string, config *AMQPConfig) *AMQP

func (*AMQP) Ack

func (a *AMQP) Ack(message *brk.Message) error

func (*AMQP) Connect

func (a *AMQP) Connect(errChan chan error) bool

func (*AMQP) GetChannel

func (a *AMQP) GetChannel() *amqp.Channel

func (*AMQP) GetName

func (a *AMQP) GetName() string

func (*AMQP) Publish

func (a *AMQP) Publish(
	target string, message *brk.Message, options map[string]interface{},
) (string, error)

func (*AMQP) Subscribe

func (a *AMQP) Subscribe(ctx context.Context, source string, chErr chan error) <-chan brk.Message

type AMQPConfig

type AMQPConfig struct {
	Host  string
	Port  string
	User  string
	Pass  string
	Vhost string
	TLS   bool
}

func (*AMQPConfig) GetConnectionString

func (ac *AMQPConfig) GetConnectionString() string

Jump to

Keyboard shortcuts

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