logstash

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNKNOWN lexer.TokenType = iota

	PREFIX
	NUMERIC
	BOOLEAN
	STRING
	PATTERN
	TIME
	VARIABLE
	FUNCTION
	SEPARATOR

	COMPARATOR
	LOGICALOP
	MODIFIER

	CLAUSE
	CLAUSE_CLOSE

	TERNARY
)
View Source
const (
	TokenIllegal tokenKind = iota + 1
	TokenEOF
	TokenAssignment
	TokenLCurlyBrace
	TokenLBracket
	TokenRCurlyBrace
	TokenRBracket
	TokenString
	TokenNumber
	TokenIf
	TokenElse
	TokenElseIf
	TokenComment
	TokenComma
	TokenBool
)

Variables

View Source
var COMPARATOR_SYMBOLS = []string{
	"==",
	"!=",
	">",
	">=",
	"<",
	"<=",
	"=~",
	"!~",
	"in",
}
View Source
var FUNCTION_NAMES = []string{
	"len", "bool",
}
View Source
var LOGICAL_SYMBOLS = []string{
	"and", "or", "&&", "||",
}
View Source
var MODIFIER_SYMBOLS = []string{
	"+",
	"-",
	"*",
	"/",
	"%",
	"**",
	"&",
	"|",
	"^",
	">>",
	"<<",
}
View Source
var PREFIX_SYMBOLS = []string{
	"-", "!", "not", "~",
}
View Source
var REGEX_SYMBOLS = []string{
	"=~",
	"!~",
}
View Source
var SEPARATOR_SYMBOLS = []string{
	",",
}

Functions

This section is empty.

Types

type Codec

type Codec struct {
	Name     string
	Settings map[int]*Setting
}

type Configuration

type Configuration struct {
	Sections map[string]*Section
}

type ParseError

type ParseError struct {
	Line   int
	Column int
	Reason string
}

func (ParseError) Error

func (p ParseError) Error() string

type Parser

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

func NewParser

func NewParser(r io.Reader) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (*Configuration, error)

type Plugin

type Plugin struct {
	Name     string
	Label    string
	Codecs   map[int]*Codec
	Settings map[int]*Setting
	When     map[int]*When // IF and ElseIF with order
}

type Section

type Section struct {
	Name    string
	Plugins map[int]*Plugin
}

type Setting

type Setting struct {
	K string
	V interface{}
}

type When

type When struct {
	Expression string          // condition
	Plugins    map[int]*Plugin // actions
}

Jump to

Keyboard shortcuts

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