rabbitmq

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel added in v0.9.0

type Channel struct {
	*amqp.Channel
	// contains filtered or unexported fields
}

func (*Channel) Close added in v0.9.0

func (ch *Channel) Close() error

func (*Channel) Consume added in v0.9.0

func (ch *Channel) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)

func (*Channel) IsClosed added in v0.9.0

func (ch *Channel) IsClosed() bool

type Connection added in v0.9.0

type Connection struct {
	*amqp.Connection
	// contains filtered or unexported fields
}

func (*Connection) Channel added in v0.9.0

func (c *Connection) Channel() (*Channel, error)

Channel wrap amqp.Connection.Channel, get a auto reconnect channel

type Logger added in v0.8.0

type Logger interface {
	Errorf(template string, args ...interface{})
	Infof(template string, args ...interface{})
}

type MiddlewareConsume added in v0.9.0

type MiddlewareConsume func(ctx context.Context, msg amqp.Delivery, next func(context.Context, amqp.Delivery) error) error

type MiddlewarePublish added in v0.9.0

type MiddlewarePublish func(ctx context.Context, msg amqp.Publishing, next func(context.Context, amqp.Publishing) error) error

type Option added in v0.9.0

type Option func(opt *config)

func WithConsumerMiddleware added in v0.9.0

func WithConsumerMiddleware(middleware MiddlewareConsume) Option

func WithLogger added in v0.9.0

func WithLogger(log Logger) Option

func WithPublisherMiddleware added in v0.9.0

func WithPublisherMiddleware(middleware MiddlewarePublish) Option

func WithQueueNamePrefix added in v0.9.0

func WithQueueNamePrefix(prefix string) Option

func WithReconnectDelay added in v0.9.0

func WithReconnectDelay(delay time.Duration) Option

type Transport added in v0.8.0

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

func New

func New(amqpUrl string, exchange string, instanceId string, opts ...Option) *Transport

func (*Transport) Register added in v0.8.0

func (t *Transport) Register(ctx context.Context, group string, consumer broker.RecordHandler) (broker.RecordHandler, error)

Jump to

Keyboard shortcuts

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