Documentation ¶
Index ¶
- Variables
- func GetConfigArrayString(key string) []string
- func GetConfigBoolDefault(key string, def bool) bool
- func GetConfigIntDefault(key string, def int) int
- func GetConfigStringDefault(key string, def string) string
- func GetConfigUint16Default(key string, def uint16) uint16
- func InitializeLogger(logFile string)
- func LoadConfig(file string)
- func LogDebug(module interface{}, components ...interface{})
- func LogError(module interface{}, components ...interface{})
- func LogFatal(module interface{}, components ...interface{})
- func LogInfo(module interface{}, components ...interface{})
- func LogTrace(module interface{}, components ...interface{})
- func LogWarn(module interface{}, components ...interface{})
- func ResolveConfigFileRelPath(target string) (abs string)
- func ShutdownLogger()
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotCanonical = errors.New("URI could not be canonized")
)
Error definitions
var ShouldQuit = false
ShouldQuit indicates whether threads should quit
var StartTimestamp time.Time
StartTimestamp is the time the forwarder was started.
var Version string
Version of YaNFD.
Functions ¶
func GetConfigArrayString ¶
GetConfigArrayString returns the configuration array value at the specified key or nil if it does not exist.
func GetConfigBoolDefault ¶
GetConfigBoolDefault returns the boolean configuration value at the specified key or the specified default value if it does not exist.
func GetConfigIntDefault ¶
GetConfigIntDefault returns the integer configuration value at the specified key or the specified default value if it does not exist.
func GetConfigStringDefault ¶
GetConfigStringDefault returns the string configuration value at the specified key or the specified default value if it does not exist.
func GetConfigUint16Default ¶
GetConfigUint16Default returns the integer configuration value at the specified key or the specified default value if it does not exist.
func InitializeLogger ¶
func InitializeLogger(logFile string)
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. Note: Fatal will let the program exit
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.
func ResolveConfigFileRelPath ¶
ResolveConfigFileRelPath resolves a possibly relative path based on config file path.
Types ¶
This section is empty.