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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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