requestParser

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParsingQueueDepth    = "parsing_queue_depth"
	DroppedEventsCounter = "dropped_events_count"
	EventCounter         = "event_count"
)

Variables

This section is empty.

Functions

func Metrics

func Metrics() []xmetrics.Metric

Types

type Config

type Config struct {
	MetadataMaxSize int
	PayloadMaxSize  int
	QueueSize       int
	MaxWorkers      int
	DefaultTTL      time.Duration
	RegexRules      []rules.RuleConfig
}

type EventTypeMetrics added in v0.14.2

type EventTypeMetrics struct {
	Regex          *regexp.Regexp
	EventTypeIndex int
}

type Measures

type Measures struct {
	ParsingQueue       metrics.Gauge
	DroppedEventsCount metrics.Counter
	EventsCount        metrics.Counter
}

func NewMeasures

func NewMeasures(p provider.Provider) *Measures

NewMeasures constructs a Measures given a go-kit metrics Provider

type RecordConfig added in v0.14.3

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

type RequestParser

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

func NewRequestParser

func NewRequestParser(config Config, logger log.Logger, metricsRegistry provider.Provider, inserter inserter, blacklist blacklist.List, encrypter voynicrypto.Encrypt, timeTracker TimeTracker) (*RequestParser, error)

func (*RequestParser) Parse

func (r *RequestParser) Parse(wrpWithTime WrpWithTime) (err error)

func (*RequestParser) Start

func (r *RequestParser) Start()

func (*RequestParser) Stop

func (r *RequestParser) Stop()

type TimeTracker added in v0.14.1

type TimeTracker interface {
	TrackTime(time.Duration)
}

type WrpWithTime added in v0.14.1

type WrpWithTime struct {
	Message   wrp.Message
	Beginning time.Time
}

Jump to

Keyboard shortcuts

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