base

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterFunc added in v1.5.0

type FilterFunc func(map[string]interface{}) (interface{}, error)

FilterFunc used for filter

type Writer

type Writer struct {
	Process func(context.Context) error
	// contains filtered or unexported fields
}

Writer is to filter and encode row of events

func New

func New(filter, encoderFunc string, monitor monitor.Monitor) (*Writer, error)

New creates a new encoder

func (*Writer) Close

func (w *Writer) Close() error

Close invoked task

func (*Writer) Encode

func (w *Writer) Encode(input interface{}) ([]byte, error)

Encode will encode a row/block to the format the user specifies

func (*Writer) Filter added in v1.6.0

func (w *Writer) Filter(input interface{}) (interface{}, error)

Filter filters out a row/blocks

func (*Writer) Run

func (w *Writer) Run(ctx context.Context) (async.Task, error)

Run task to process work using async invoke

Jump to

Keyboard shortcuts

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