rtconfig

package
v0.23.0-rc1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBool

func GetBool(key string) bool

GetBool returns the value associated with the key as a boolean.

func GetDuration

func GetDuration(key string) time.Duration

GetDuration returns the value associated with the key as a duration.

func GetFloat64

func GetFloat64(key string) float64

GetFloat64 returns the value associated with the key as a float64.

func GetInt

func GetInt(key string) int

GetInt returns the value associated with the key as an integer.

func GetInt32

func GetInt32(key string) int32

GetInt32 returns the value associated with the key as an integer.

func GetInt64

func GetInt64(key string) int64

GetInt64 returns the value associated with the key as an integer.

func GetIntSlice

func GetIntSlice(key string) []int

GetIntSlice returns the value associated with the key as a slice of int values.

func GetString

func GetString(key string) string

GetString returns the value associated with the key as a string.

func GetStringMap

func GetStringMap(key string) map[string]interface{}

GetStringMap returns the value associated with the key as a map of interfaces.

func GetStringMapString

func GetStringMapString(key string) map[string]string

GetStringMapString returns the value associated with the key as a map of strings.

func GetStringSlice

func GetStringSlice(key string) []string

GetStringSlice returns the value associated with the key as a slice of strings.

func GetTime

func GetTime(key string) time.Time

GetTime returns the value associated with the key as time.

func GetUint

func GetUint(key string) uint

GetUint returns the value associated with the key as an unsigned integer.

func GetUint32

func GetUint32(key string) uint32

GetUint32 returns the value associated with the key as an unsigned integer.

func GetUint64

func GetUint64(key string) uint64

GetUint64 returns the value associated with the key as an unsigned integer.

func WatchVariable

func WatchVariable(key string, cb WatcherCallback) error

WatchVariable allows to set a callback func on a specific variable change.

Types

type Value

type Value = config.Value

Value describes a config value.

func GetValue

func GetValue(key string) (Value, error)

GetValue returns a config Value associated with the key.

type WatcherCallback

type WatcherCallback = config.WatcherCallback

WatcherCallback is a callback function for a variable watcher.

Jump to

Keyboard shortcuts

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