core

package
v0.0.0-...-d9b08a0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotCanonical = errors.New("URI could not be canonized")
)

Error definitions

View Source
var ShouldQuit = false

ShouldQuit indicates whether threads should quit

View Source
var StartTimestamp time.Time

StartTimestamp is the time the forwarder was started.

View Source
var Version string

Version of YaNFD.

Functions

func GetConfigArrayString

func GetConfigArrayString(key string) []string

GetConfigArrayString returns the configuration array value at the specified key or nil if it does not exist.

func GetConfigBoolDefault

func GetConfigBoolDefault(key string, def bool) bool

GetConfigBoolDefault returns the boolean configuration value at the specified key or the specified default value if it does not exist.

func GetConfigIntDefault

func GetConfigIntDefault(key string, def int) int

GetConfigIntDefault returns the integer configuration value at the specified key or the specified default value if it does not exist.

func GetConfigStringDefault

func GetConfigStringDefault(key string, def string) string

GetConfigStringDefault returns the string configuration value at the specified key or the specified default value if it does not exist.

func GetConfigUint16Default

func GetConfigUint16Default(key string, def uint16) uint16

GetConfigUint16Default returns the integer configuration value at the specified key or the specified default value if it does not exist.

func InitializeLogger

func InitializeLogger()

InitializeLogger initializes the logger.

func LoadConfig

func LoadConfig(file string)

LoadConfig loads the YaNFD configuration from the specified configuration file.

func LogDebug

func LogDebug(module interface{}, components ...interface{})

LogDebug logs a message at the DEBUG level.

func LogError

func LogError(module interface{}, components ...interface{})

LogError logs a message at the ERROR level.

func LogFatal

func LogFatal(module interface{}, components ...interface{})

LogFatal logs a message at the FATAL level.

func LogInfo

func LogInfo(module interface{}, components ...interface{})

LogInfo logs a message at the INFO level.

func LogTrace

func LogTrace(module interface{}, components ...interface{})

LogTrace logs a message at the TRACE level (really just additional DEBUG messages).

func LogWarn

func LogWarn(module interface{}, components ...interface{})

LogWarn logs a message at the WARN level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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