pubip

package
v0.6.3-beta01 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

pubip is self contained package to get host public IP Ip may be get from several providers (STUN and fallback to webpage currently) Also caches IP for some time to reduce requests to servers. It does not allocate separate instance for its clients so cache can be reused,

Index

Constants

View Source
const (
	Fallback ipProvider = iota
	Stun
	WebIP
)

Variables

This section is empty.

Functions

func GetPublicIp

func GetPublicIp() net.IP

func Provider

func Provider() string

func Reset

func Reset()

func SetUpdatePeriod

func SetUpdatePeriod(t time.Duration)

func UpdatePeriod

func UpdatePeriod() time.Duration

Types

This section is empty.

Directories

Path Synopsis
stunip gets public IP from public STUN servers
stunip gets public IP from public STUN servers
Gets public IP address from Syntropy web microservice
Gets public IP address from Syntropy web microservice

Jump to

Keyboard shortcuts

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