queue

package
v0.0.0-...-ada256f Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package queue provides queueing semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	Consume(context.Context) (<-chan amqp.Delivery, error)
}

Consumer allows consuming of published items.

type Mock

type Mock struct {
	mock.Mock
}

Mock mocks the Queue interface.

func (*Mock) Consume

func (m *Mock) Consume(ctx context.Context) (<-chan amqp.Delivery, error)

Consume mocks the corresponding method on the Queue interface.

func (*Mock) Publish

func (m *Mock) Publish(ctx context.Context, pub interface{}, priority uint8) error

Publish mocks the corresponding method on the Queue interface.

type MockFactory

type MockFactory struct {
	mock.Mock
}

MockFactory mocks the Factory interface.

func (*MockFactory) NewPublisher

func (f *MockFactory) NewPublisher(ctx context.Context) (Publisher, error)

NewPublisher mocks the corresponding method on the Factory interface.

type Publisher

type Publisher interface {
	Publish(context.Context, interface{}, uint8) error
}

Publisher allows publishing of sniffed items.

type PublisherFactory

type PublisherFactory interface {
	NewPublisher(context.Context) (Publisher, error)
}

PublisherFactory creates Publishers.

type Queue

type Queue interface {
	Publisher
	Consumer
}

Queue allows both publishing as well as consuming.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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