htjson

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 13

Documentation

Overview

Package htjson (honeytail-json, renamed to not conflict with the json module) parses logs that are one json blob per line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONLineParser

type JSONLineParser struct {
}

func (*JSONLineParser) ParseLine

func (j *JSONLineParser) ParseLine(line string) (map[string]interface{}, error)

ParseLine will unmarshal the thing it read in to detect errors in the JSON (by failing to parse) and give us an object that can be mutated by the various filters honeytail might apply.

type Options

type Options struct {
	TimeFieldName   string `long:"timefield" description:"Name of the field that contains a timestamp" yaml:"timefield,omitempty"`
	TimeFieldFormat string `` /* 138-byte string literal not displayed */

	NumParsers int `hidden:"true" description:"number of htjson parsers to spin up" yaml:"-"`
}

type Parser

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

func (*Parser) Init

func (p *Parser) Init(options interface{}) error

func (*Parser) ProcessLines

func (p *Parser) ProcessLines(lines <-chan string, send chan<- event.Event, prefixRegex *parsers.ExtRegexp)

Jump to

Keyboard shortcuts

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