io

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Consumer must be initialized with NewConsumer or calling Msg() will panic.

func NewConsumer

func NewConsumer(pth string) (*Consumer, error)

func (*Consumer) Msg

func (c *Consumer) Msg() (msg []byte, done bool, err error)

func (*Consumer) Stop

func (c *Consumer) Stop() error

type Producer

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

func NewNullProducer

func NewNullProducer() *Producer

func NewProducer

func NewProducer() *Producer

func NewStdErrProducer

func NewStdErrProducer() *Producer

func NewStdoutProducer

func NewStdoutProducer() *Producer

func (*Producer) Send

func (p *Producer) Send(topic string, msg []byte) error

Send takes a topic and the message to send. The topic is a file name and is required unless initialized with NewStdoutProducer.

If initialized with NewStdoutProducer then the msg will always be written to "/dev/stdout".

func (*Producer) Stop

func (p *Producer) Stop() error

Jump to

Keyboard shortcuts

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