ptr

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupFunc

type LookupFunc func(ip string) ([]string, error)

LookupFunc is a function type for DNS PTR lookups. This allows mocking in tests.

type PtrManager

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

PtrManager handles PTR lookups with simple caching

func NewPtrManager

func NewPtrManager() *PtrManager

NewPtrManager creates a new PtrManager with default settings

func (*PtrManager) GetPTR

func (pm *PtrManager) GetPTR(ip string) (string, bool)

GetPTR retrieves the cached PTR result for the given IP address Returns the PTR and a boolean indicating if it was found

func (*PtrManager) RequestPTR

func (pm *PtrManager) RequestPTR(ip string)

RequestPTR initiates a PTR lookup for the given IP address if not cached

Jump to

Keyboard shortcuts

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