wabbit: github.com/NeowayLabs/wabbit Index | Files | Directories

package wabbit

import "github.com/NeowayLabs/wabbit"

Package wabbit provides an interface for AMQP client specification and a mock implementation of that interface.


Package Files


type Channel Uses

type Channel interface {
    Ack(tag uint64, multiple bool) error
    Nack(tag uint64, multiple bool, requeue bool) error
    Reject(tag uint64, requeue bool) error

    Confirm(noWait bool) error
    NotifyPublish(confirm chan Confirmation) chan Confirmation

    Cancel(consumer string, noWait bool) error
    ExchangeDeclare(name, kind string, opt Option) error
    ExchangeDeclarePassive(name, kind string, opt Option) error
    QueueDeclare(name string, args Option) (Queue, error)
    QueueDeclarePassive(name string, args Option) (Queue, error)
    QueueDelete(name string, args Option) (int, error)
    QueueBind(name, key, exchange string, opt Option) error
    QueueUnbind(name, route, exchange string, args Option) error
    Consume(queue, consumer string, opt Option) (<-chan Delivery, error)
    Qos(prefetchCount, prefetchSize int, global bool) error
    Close() error
    NotifyClose(chan Error) chan Error

Channel is an AMQP channel interface

type Confirmation Uses

type Confirmation interface {
    Ack() bool
    DeliveryTag() uint64

Confirmation is an interface to confrimation messages

type Conn Uses

type Conn interface {
    Channel() (Channel, error)
    AutoRedial(errChan chan Error, done chan bool)
    Close() error
    NotifyClose(chan Error) chan Error

Conn is the amqp connection interface

type Delivery Uses

type Delivery interface {
    Ack(multiple bool) error
    Nack(multiple, request bool) error
    Reject(requeue bool) error

    Body() []byte
    Headers() Option
    DeliveryTag() uint64
    ConsumerTag() string
    MessageId() string

Delivery is an interface to delivered messages

type Error Uses

type Error interface {
    Code() int
    Reason() string
    Server() bool
    Recover() bool

Error is an interface for AMQP errors

type Option Uses

type Option map[string]interface{}

Option is a map of AMQP configurations

type Publisher Uses

type Publisher interface {
    Publish(exc, route string, msg []byte, opt Option) error

Publisher is an interface to something able to publish messages

type Queue Uses

type Queue interface {
    Name() string
    Messages() int
    Consumers() int

Queue is a AMQP queue interface



Package wabbit is imported by 13 packages. Updated 2019-01-11. Refresh now. Tools for package owners.