mock

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockConnection

func NewMockConnection() messaging.Connection

func NewMockConsumer

func NewMockConsumer() messaging.Consumer

func NewMockProducer

func NewMockProducer() messaging.Producer

Types

type Connection

type Connection struct {
	mock.Mock
}

func (*Connection) Close

func (c *Connection) Close()

func (*Connection) Consumer

func (c *Connection) Consumer(autoAck bool, exchange, queue string) (messaging.Consumer, error)

func (*Connection) IsConnected

func (c *Connection) IsConnected() bool

func (*Connection) NotifyConnectionClose

func (c *Connection) NotifyConnectionClose() <-chan error

func (*Connection) NotifyReestablish

func (c *Connection) NotifyReestablish() <-chan bool

func (*Connection) Producer

func (c *Connection) Producer(exchange string) (messaging.Producer, error)

func (*Connection) WaitUntilConnectionCloses

func (c *Connection) WaitUntilConnectionCloses()

func (*Connection) WaitUntilConnectionReestablished

func (c *Connection) WaitUntilConnectionReestablished()

type Consumer

type Consumer struct {
	mock.Mock
}

func (*Consumer) BindActions

func (c *Consumer) BindActions(actions ...string) error

func (*Consumer) Close

func (c *Consumer) Close()

func (*Consumer) Consume

func (c *Consumer) Consume()

func (*Consumer) Subscribe

func (c *Consumer) Subscribe(action string, handler messaging.EventHandler, options *messaging.SubscribeOptions) error

func (*Consumer) UnbindActions

func (c *Consumer) UnbindActions(actions ...string) error

func (*Consumer) Unsubscribe

func (c *Consumer) Unsubscribe(action string) error

type Producer

type Producer struct {
	mock.Mock
}

func (*Producer) Close

func (p *Producer) Close()

func (*Producer) NotifyClose

func (p *Producer) NotifyClose() <-chan bool

func (*Producer) Publish

func (p *Producer) Publish(action string, data []byte)

Jump to

Keyboard shortcuts

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