dissect

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 9 Imported by: ? 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

View Source
const (
	Integer dataType = iota
	Long
	Float
	Double
	String
	Boolean
	IP
)

List of dataTypes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dissector

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

Dissector is a tokenizer based on the Dissect syntax as defined at: https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html

func New

func New(tokenizer string) (*Dissector, error)

New creates a new Dissector from a tokenized string.

func (*Dissector) Dissect

func (d *Dissector) Dissect(s string) (Map, error)

Dissect takes the raw string and will use the defined tokenizer to return a map with the extracted keys and their values.

Dissect uses a 3 steps process: - Find the key positions - Extract and resolve the keys (append / indirect) - Ignore namedSkipField

func (*Dissector) DissectConvert

func (d *Dissector) DissectConvert(s string) (MapConverted, error)

func (*Dissector) Raw

func (d *Dissector) Raw() string

Raw returns the raw tokenizer used to generate the actual parser.

type Map

type Map = map[string]string

Map represents the keys and their values extracted with the defined tokenizer.

type MapConverted

type MapConverted = map[string]interface{}

Jump to

Keyboard shortcuts

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