config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 17 Imported by: 31

Documentation

Overview

Package conf is an interface for dynamic configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWatcher

func AddWatcher(key string, f func(types.ConfigWatchEvent)) error

func Bytes

func Bytes() []byte

func DelWatcher

func DelWatcher(key string, f func(types.ConfigWatchEvent)) error

func Get

func Get(key string) types.ConfigValue

func GetBool

func GetBool(key string, def ...bool) bool

func GetDuration

func GetDuration(key string, def ...time.Duration) time.Duration

func GetFloat64

func GetFloat64(key string, def ...float64) float64

func GetInt

func GetInt(key string, def ...int) int

func GetInt64

func GetInt64(key string, def ...int64) int64

func GetMap

func GetMap(key string, def ...map[string]interface{}) map[string]interface{}

func GetString

func GetString(key string, def ...string) string

func GetStringMap

func GetStringMap(key string, def ...map[string]string) map[string]string

func GetStringSlice

func GetStringSlice(key string, def ...[]string) []string

func LoadSource

func LoadSource(sources ...types.ConfigSource) error

func NewConfig

func NewConfig(keyDelimiter string) types.Config

func Scan

func Scan(key string, val interface{}) error

func Set

func Set(key string, val interface{}) error

Types

This section is empty.

Directories

Path Synopsis
env
file
Package file is a file source.
Package file is a file source.

Jump to

Keyboard shortcuts

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