stream

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: BSD-2-Clause, BSD-3-Clause, PostgreSQL Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeStreamInGroups

func AnalyzeStreamInGroups(logLines []state.LogLine) (state.TransientLogState, state.LogFile, []state.LogLine, error)

AnalyzeStreamInGroups - Takes in a set of parsed log lines and analyses the lines that are ready, and returns the rest

The caller is expected to keep a repository of "tooFreshLogLines" that they can send back in again in the next call, combined with new lines received

func LogTestAnyEvent

func LogTestAnyEvent(server *state.Server, logFile state.LogFile, logTestSucceeded chan<- bool)

LogTestAnyEvent - Checks for any log message (used on log pipelines that take longer than 10 seconds, e.g. Azure Event Hub)

func LogTestCollectorIdentify

func LogTestCollectorIdentify(server *state.Server, logFile state.LogFile, logTestSucceeded chan<- bool)

LogTestCollectorIdentify - Checks for the special "pganalyze-collector-identify:" event (used on log pipelines that forward messages under than 10 seconds)

func LogTestNone

func LogTestNone(server *state.Server, logFile state.LogFile, logTestSucceeded chan<- bool)

LogTestNone - Don't confirm the log test

func ProcessLogStream

func ProcessLogStream(server *state.Server, logLines []state.LogLine, globalCollectionOpts state.CollectionOpts, prefixedLogger *util.Logger, logTestSucceeded chan<- bool, logTestFunc func(s *state.Server, lf state.LogFile, lt chan<- bool)) []state.LogLine

ProcessLogStream - Accepts one or more log lines to be analyzed and processed

Note that input log lines are expected to preserve their trailing newlines.

Note that this returns the lines that were not processed, based on the time-based buffering logic. These lines should be passed in again with the next call.

The caller is not expected to do any special time-based buffering themselves.

Types

This section is empty.

Jump to

Keyboard shortcuts

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