internal

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 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 EventSink

type EventSink interface {
	FlushEvents(ctx context.Context, cache [][]byte) error
}

EventSink a sink for events

type LineData

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

LineData caches the unmarshalled json so we only need to unmarshal once

func NewLineData

func NewLineData(data []byte) *LineData

NewLineData returns a new LineData

type LineParseHelper

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

LineParseHelper helper for parsing line data

func NewLineParseHelper

func NewLineParseHelper(optDefs map[string]string) *LineParseHelper

NewLineParseHelper returns a LineParseHelper

func (*LineParseHelper) GetVal

func (c *LineParseHelper) GetVal(valName string, data *LineData) (string, error)

GetVal returns a val

type Publisher

type Publisher struct {
	MaxQueueSize  int
	Sink          EventSink
	FlushInterval time.Duration
	// contains filtered or unexported fields
}

Publisher publishes events

func (*Publisher) Run

func (p *Publisher) Run(ctx context.Context, scanner *bufio.Scanner) error

Run runs Publisher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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