amqptest

package
v0.0.0-...-d7ad24d Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(amqpuri string) (wabbit.Conn, error)

Dial mock the connection dialing to rabbitmq and returns the established connection or error if something goes wrong

Types

type Conn

type Conn struct {
	ConnID string
	// contains filtered or unexported fields
}

Conn is the fake AMQP connection

func (*Conn) AutoRedial

func (conn *Conn) AutoRedial(outChan chan wabbit.Error, done chan bool)

AutoRedial mock the reconnection faking a delay of 1 second

func (*Conn) Channel

func (conn *Conn) Channel() (wabbit.Channel, error)

Channel creates a new fake channel

func (*Conn) Close

func (conn *Conn) Close() error

Close the fake connection

func (*Conn) NotifyClose

func (conn *Conn) NotifyClose(c chan wabbit.Error) chan wabbit.Error

NotifyClose publishs notifications about server or client errors in the given channel

type Publisher

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

func NewPublisher

func NewPublisher(conn wabbit.Conn, channel wabbit.Channel) (*Publisher, error)

func (*Publisher) Publish

func (pb *Publisher) Publish(exc string, route string, message []byte, opt wabbit.Option) error

type Queue

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

func NewQueue

func NewQueue(name string) *Queue

func (*Queue) Consumers

func (q *Queue) Consumers() int

func (*Queue) Messages

func (q *Queue) Messages() int

func (*Queue) Name

func (q *Queue) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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