ipresolver

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultProviders = []string{
	"https://api.ipify.org",
	"https://ifconfig.me/ip",
	"https://icanhazip.com",
}

Functions

This section is empty.

Types

type Option

type Option func(*Resolver)

func WithCacheTTL

func WithCacheTTL(ttl time.Duration) Option

func WithHTTPTimeout

func WithHTTPTimeout(timeout time.Duration) Option

func WithProviders

func WithProviders(providers []string) Option

type Resolver

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

func NewResolver

func NewResolver(opts ...Option) *Resolver

func (*Resolver) GetExternalIP

func (r *Resolver) GetExternalIP(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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