dns

package
v0.0.72 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSCollector

type DNSCollector interface {
	Start(ctx context.Context) error
	Lookups() []DNSLookup
	PeekLookups() []DNSLookup
	Records() map[string]string // Keep for compatibility if needed, but we'll focus on Lookups
}

type DNSLookup

type DNSLookup struct {
	ClientIP    string    `json:"client_ip"`
	Domain      string    `json:"domain"`
	ResolvedIPs []string  `json:"resolved_ips"`
	Timestamp   time.Time `json:"timestamp"`
}

type IP2DNS

type IP2DNS struct {
	Tracer tracer
	// contains filtered or unexported fields
}

func NewIP2DNS

func NewIP2DNS(tracer tracer, log logr.Logger) *IP2DNS

func (*IP2DNS) Lookups

func (d *IP2DNS) Lookups() []DNSLookup

Lookups returns the accumulated lookups and clears the buffer (Delta)

func (*IP2DNS) PeekLookups

func (d *IP2DNS) PeekLookups() []DNSLookup

PeekLookups returns the accumulated lookups WITHOUT clearing the buffer

func (*IP2DNS) Records

func (d *IP2DNS) Records() map[string]string

func (*IP2DNS) Start

func (d *IP2DNS) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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