rabbitmq

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendName = "rabbitmq"
)

Variables

View Source
var (
	ErrEmptyRoutingKey   = errors.New("routing key cannot be empty")
	ErrEmptyExchangeName = errors.New("exchange name cannot be empty")
	ErrEmptyQueueName    = errors.New("queue name cannot be empty")
	ErrEmptyBindingKey   = errors.New("binding key cannot be empty")
)

Functions

This section is empty.

Types

type RabbitMQ

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

RabbitMQ holds all attributes required for performing a read/write operations in RabbitMQ. This struct should be instantiated via the rabbitmq.Read(..) or rabbitmq.Write(..) functions.

func New added in v0.5.0

func New(opts *opts.ConnectionOptions) (*RabbitMQ, error)

func (*RabbitMQ) Close added in v1.0.0

func (r *RabbitMQ) Close(_ context.Context) error

func (*RabbitMQ) DisplayError added in v1.0.0

func (r *RabbitMQ) DisplayError(msg *records.ErrorRecord) error

DisplayError will parse an Error record and print (pretty) output to STDOUT

func (*RabbitMQ) DisplayMessage added in v1.0.0

func (r *RabbitMQ) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error

DisplayMessage will parse a Read record and print (pretty) output to STDOUT

func (*RabbitMQ) Name added in v1.0.0

func (r *RabbitMQ) Name() string

func (*RabbitMQ) Read

func (r *RabbitMQ) Read(ctx context.Context, readOpts *opts.ReadOptions, resultsChan chan *records.ReadRecord, errorChan chan *records.ErrorRecord) error

func (*RabbitMQ) Relay added in v1.0.0

func (r *RabbitMQ) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, errorCh chan<- *records.ErrorRecord) error

func (*RabbitMQ) Test added in v1.0.0

func (r *RabbitMQ) Test(_ context.Context) error

func (*RabbitMQ) Tunnel added in v1.4.0

func (r *RabbitMQ) Tunnel(ctx context.Context, opts *opts.TunnelOptions, tunnelSvc tunnel.ITunnel, errorCh chan<- *records.ErrorRecord) error

func (*RabbitMQ) Write

func (r *RabbitMQ) Write(ctx context.Context, writeOpts *opts.WriteOptions, errorCh chan<- *records.ErrorRecord, messages ...*records.WriteRecord) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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