env

package
v0.0.0-...-10b7995 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PublicIPv4 = mustPublicIPv4()
	PublicFQDN = mustPublicFQDN()

	SyslogBind = mustSyslogBind()
	HTTPBind   = mustHTTPBind()
	TFTPBind   = mustTFTPBind()
	BOOTPBind  = mustBOOTPBind()

	// Default to Google Public DNS
	DHCPLeaseTime = mustDHCPLeaseTime()
	DNSServers    = parseIPv4s(Default("DNS_SERVERS", "8.8.8.8,8.8.4.4"))

	TrustedProxies = parseTrustedProxies()
)
View Source
var (
	FacilityCode = mustFigureOutFacility()

	MirrorURL    = mirrorURL.String()
	MirrorHost   = mirrorURL.Host
	MirrorBaseIP = mustFindMirrorIPBase()
	MirrorPath   = mirrorURL.Path
	MirrorBase   = strings.TrimSuffix(MirrorURL, MirrorPath)

	MirrorBaseUrl = mirrorBaseUrl.String()
)

Functions

func Default

func Default(name, value string) string

func DefaultURL

func DefaultURL(name, value string) *url.URL

func Init

func Init(l log.Logger)

func Require

func Require(name string) string

func ShouldIgnoreGI

func ShouldIgnoreGI(ip string) bool

func ShouldIgnoreOUI

func ShouldIgnoreOUI(mac string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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