beats: github.com/elastic/beats/libbeat/common/match Index | Files

package match

import "github.com/elastic/beats/libbeat/common/match"

Index

Package Files

cmp.go compile.go matcher.go matchers.go optimize.go

type ExactMatcher Uses

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

func CompileExact Uses

func CompileExact(pattern string) (ExactMatcher, error)

func MustCompileExact Uses

func MustCompileExact(pattern string) ExactMatcher

func (*ExactMatcher) MatchAllStrings Uses

func (m *ExactMatcher) MatchAllStrings(strs interface{}) bool

MatchAllStrings succeeds if all strings in the given array are an exact match.

func (*ExactMatcher) MatchAnyString Uses

func (m *ExactMatcher) MatchAnyString(strs interface{}) bool

MatchAnyString succeeds if any string in the given array is an exact match.

func (*ExactMatcher) Unpack Uses

func (m *ExactMatcher) Unpack(s string) error

type Matcher Uses

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

func Compile Uses

func Compile(pattern string) (Matcher, error)

Compile regular expression to string matcher. String matcher by default uses regular expressions as provided by regexp library, but tries to optimize some common cases, replacing expensive patterns with cheaper custom implementations or removing terms not necessary for string matching.

func CompileString Uses

func CompileString(in string) (Matcher, error)

CompileString matches a substring only, the input is not interpreted as regular expression

func MustCompile Uses

func MustCompile(pattern string) Matcher

func (*Matcher) MatchAllStrings Uses

func (m *Matcher) MatchAllStrings(strs interface{}) bool

MatchAllStrings succeeds if all strings in the given array contain a match.

func (*Matcher) MatchAnyString Uses

func (m *Matcher) MatchAnyString(strs interface{}) bool

MatchAnyString succeeds if any string in the given array contains a match.

func (*Matcher) Unpack Uses

func (m *Matcher) Unpack(s string) error

Package match imports 7 packages (graph) and is imported by 74 packages. Updated 2019-08-22. Refresh now. Tools for package owners.