channel

package
v0.0.0-...-47d8c29 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "channel"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

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

func FromConfig

func FromConfig(c Config, l loggers.Logger) *Channel

func (*Channel) Close

func (q *Channel) Close() error

func (*Channel) Consumer

func (q *Channel) Consumer() (consumer.Consumer, error)

func (*Channel) Producer

func (q *Channel) Producer() (producer.Producer, error)

type Config

type Config struct {
	Capacity uint
}

type Consumer

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

func ConsumerFromConfig

func ConsumerFromConfig(channel chan message.Message, c Config, l loggers.Logger) (*Consumer, error)

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Consume

func (c *Consumer) Consume() (<-chan result.Result, error)

type Producer

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

func ProducerFromConfig

func ProducerFromConfig(channel chan message.Message, c Config, l loggers.Logger) (*Producer, error)

func (*Producer) Close

func (p *Producer) Close() error

func (*Producer) Produce

func (p *Producer) Produce(m message.Message) error

Jump to

Keyboard shortcuts

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