mq

package
v0.0.0-...-3bbbf02 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(tp string, f Factory)

Types

type Consumer

type Consumer interface {
	Consume() (pool.Task, error)
}

type Factory

type Factory interface {
	New(name string) (Queue, error)
	NewProducer(name string) (Producer, error)
	NewConsumer(name string) (Consumer, error)
}

func NewFactory

func NewFactory(tp string) Factory

type FactoryFunc

type FactoryFunc func(name string) (Queue, error)

func (FactoryFunc) New

func (f FactoryFunc) New(name string) (Queue, error)

func (FactoryFunc) NewConsumer

func (f FactoryFunc) NewConsumer(name string) (Consumer, error)

func (FactoryFunc) NewProducer

func (f FactoryFunc) NewProducer(name string) (Producer, error)

type Producer

type Producer interface {
	Produce(task pool.Task) error
}

type Queue

type Queue interface {
	Producer
	Consumer
	io.Closer
}

Jump to

Keyboard shortcuts

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