util

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BooleanValueOr

func BooleanValueOr(ptr *bool, varName, defaultVal string) bool

BooleanValueOr returns a de-referenced boolean pointer, an environment variable, or a fallback

func GetEnv

func GetEnv(varName, defaultVal string) string

GetEnv looks up an environment with a fallback default

func IPMonitored added in v0.8.0

func IPMonitored(publicIP string, allowed, blocked []string) bool

IPMonitored considers configured allowed and blocked ip addresses and inspects a clients public ip address to determine if it should be used for speed and connectivity testing

func LevelMap added in v0.16.0

func LevelMap(ptr *string, varName, defaultVal string) log.Level

LevelMap returns a concrete log level from a string pointer, an environment variable, or a fallback

func ValueOr

func ValueOr(ptr *string, varName, defaultVal string) string

ValueOr returns a de-referenced string pointer, an environment variable, or a fallback

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳