common

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ObserverAddress = pflag.String("observer-address", "localhost:1600", "gRPC address of the observer")
)

Functions

This section is empty.

Types

type FieldLearner

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

func (*FieldLearner) Seen

func (l *FieldLearner) Seen(field string)

func (*FieldLearner) SetStaticFields

func (l *FieldLearner) SetStaticFields(fields []string)

type Observable

type Observable struct {
	Regexps map[string]*regexp.Regexp
	// contains filtered or unexported fields
}

type Service

type Service struct {
	StartObserving func()
	StopObserving  func()
	// contains filtered or unexported fields
}

func NewService

func NewService(c *grpc.ClientConn, scannerType string) *Service

func (*Service) ConnectLoop

func (s *Service) ConnectLoop()

func (*Service) CreateFieldLearner

func (s *Service) CreateFieldLearner(separator byte) *FieldLearner

func (*Service) MatchObservables

func (s *Service) MatchObservables(f func(o Observable) bool)

func (*Service) SetFilterableFields

func (s *Service) SetFilterableFields(fields []string)

func (*Service) WaitForInitialConnection

func (s *Service) WaitForInitialConnection()

WaitForInitialConnection waits the filters to be received from the Observer. This ensures that existing Observables don't miss any logs even if the scanner otherwise keeps track of its log position.

Jump to

Keyboard shortcuts

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