discovery

package
v0.0.0-...-4245874 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IfConfigJsonParser

func IfConfigJsonParser(response *http.Response) (netip.Addr, error)

For json response parsing (ifconfig.co/json version)

func IfConfigMeJsonParser

func IfConfigMeJsonParser(response *http.Response) (netip.Addr, error)

For json response parsing (ifconfig.me/all.json version)

func IfConfigStringParser

func IfConfigStringParser(res *http.Response) (netip.Addr, error)

For simple string response parsin

Types

type HTTPSource

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

func NewHTTPSource

func NewHTTPSource(url string, parser models.ContentParser) *HTTPSource

func (*HTTPSource) GetIP

func (hs *HTTPSource) GetIP() (netip.Addr, error)

func (*HTTPSource) GetIPWithContext

func (hs *HTTPSource) GetIPWithContext(ctx context.Context, tcpVersion models.TCPVersion) (netip.Addr, error)

Jump to

Keyboard shortcuts

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