publicip

package
v0.0.0-...-6c087f3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoFetchTypeSpecified = errors.New("at least one fetcher type must be specified")

Functions

This section is empty.

Types

type DNSSettings

type DNSSettings struct {
	Enabled bool
	Options []dns.Option
}

type Fetcher

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

func NewFetcher

func NewFetcher(dnsSettings DNSSettings, httpSettings HTTPSettings) (f *Fetcher, err error)

func (*Fetcher) IP

func (f *Fetcher) IP(ctx context.Context) (ip netip.Addr, err error)

func (*Fetcher) IP4

func (f *Fetcher) IP4(ctx context.Context) (ipv4 netip.Addr, err error)

func (*Fetcher) IP6

func (f *Fetcher) IP6(ctx context.Context) (ipv6 netip.Addr, err error)

type HTTPSettings

type HTTPSettings struct {
	Enabled bool
	Client  *http.Client
	Options []iphttp.Option
}

Directories

Path Synopsis
dns
mock_dns
Package mock_dns is a generated GoMock package.
Package mock_dns is a generated GoMock package.

Jump to

Keyboard shortcuts

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