producer

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: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PipeFromReader

func PipeFromReader(r io.Reader, p Producer) error

func PipeFromReaderWith

func PipeFromReaderWith(r io.Reader, fn PrepareForProducerFn, p Generic) error

Types

type Generic

type Generic interface {
	Produce(m interface{}) error
	Close() error
}

type Marshal

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

func NewMarshal

func NewMarshal(pr Producer, f formats.Format) *Marshal

func (*Marshal) Close

func (p *Marshal) Close() error

func (*Marshal) Produce

func (p *Marshal) Produce(v interface{}) error

type PrepareForProducerFn

type PrepareForProducerFn = func(buf []byte) (interface{}, error)

type Producer

type Producer interface {
	Produce(m message.Message) error
	Close() error
}

Jump to

Keyboard shortcuts

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