dnsmanager

package
v0.2.154 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSManager

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

DNSManager is used to manage DNS events and save IP resolutions. It exposes an API to resolve IP address to domain name.

func CreateDNSManager

func CreateDNSManager() *DNSManager

func (*DNSManager) ReportDNSEvent

func (dm *DNSManager) ReportDNSEvent(dnsEvent tracerdnstype.Event)

func (*DNSManager) ResolveIPAddress

func (dm *DNSManager) ResolveIPAddress(ipAddr string) (string, bool)

type DNSManagerClient

type DNSManagerClient interface {
	ReportDNSEvent(networkEvent tracerdnstype.Event)
}

type DNSManagerMock

type DNSManagerMock struct {
}

func CreateDNSManagerMock

func CreateDNSManagerMock() *DNSManagerMock

func (*DNSManagerMock) ReportDNSEvent

func (n *DNSManagerMock) ReportDNSEvent(_ tracerdnstype.Event)

func (*DNSManagerMock) ResolveIPAddress

func (n *DNSManagerMock) ResolveIPAddress(_ string) (string, bool)

type DNSResolver

type DNSResolver interface {
	ResolveIPAddress(ipAddr string) (string, bool)
}

Jump to

Keyboard shortcuts

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