handlers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputHandler

type InputHandler interface {
	Start(context.Context) func() error
	Messages() <-chan *dto.KafkaMessage
	Progress() ProgressSource
}

func NewFileInputHandler

func NewFileInputHandler(reader formatters.Reader) (InputHandler, error)

func NewKafkaInputHandler

func NewKafkaInputHandler(client sarama.Client, topic string) (InputHandler, error)

type OutputHandler

type OutputHandler interface {
	Run() error
	Progress() ProgressSource
}

func NewFileOutputHandler

func NewFileOutputHandler(input <-chan *dto.KafkaMessage, writer formatters.Writer) (OutputHandler, error)

func NewKafkaOutputHandler

func NewKafkaOutputHandler(input <-chan *dto.KafkaMessage, pacer <-chan time.Time, client sarama.Client, topic string) (OutputHandler, error)

type ProgressSource

type ProgressSource <-chan error

type ReportingHandler

type ReportingHandler interface {
	Start(ProgressSource, ...ProgressSource) func() error
}

func NewReportingHandler

func NewReportingHandler(logger *log.Logger, period time.Duration) ReportingHandler

Jump to

Keyboard shortcuts

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