parsing

package
v0.0.0-...-b295479 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Zone                       string
	SocketPath                 string
	RecordRTTs                 bool
	PingMinQph                 int
	PrometheusMetricsFrequency time.Duration
}

Configuration variables for the Parser struct.

type Parser

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

Parser is the component in charge of reading and parsing dnstap from a UNIX socket and processing these messages to collect aggregate statistics.

func New

func New(conf Config,
	resolverMap *stats.ResolverInfoMap,
	zoneStats *stats.ZoneStats,
	messages chan *dnstap.Message,
	pingQueue chan<- *stats.ResolverInfo) *Parser

Creates and returns a new Parser component. One Parser is created for each configured DNS zone.

func (*Parser) ComponentName

func (p *Parser) ComponentName() string

func (*Parser) IsHealthy

func (p *Parser) IsHealthy() error

Reports whether this parser component is healthy. Whether the socket location is still present.

func (*Parser) Start

func (p *Parser) Start(ctx context.Context, group *errgroup.Group)

Start the Parser component:

  1. Read the bytestream from the UNIX socket and parse into dnstap messages
  2. Process dnstap messages from the message queue

Jump to

Keyboard shortcuts

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