Documentation
¶
Overview ¶
Package provider resolves configuration values from multiple sources in priority order and reports telemetry for each value found.
Index ¶
- type Provider
- func (p *Provider) GetBool(key string, def bool) bool
- func (p *Provider) GetDuration(key string, def time.Duration) time.Duration
- func (p *Provider) GetFloat(key string, def float64) float64
- func (p *Provider) GetFloatWithValidator(key string, def float64, validate func(float64) bool) float64
- func (p *Provider) GetInt(key string, def int) int
- func (p *Provider) GetIntWithValidator(key string, def int, validate func(int) bool) int
- func (p *Provider) GetMap(key string, def map[string]string) map[string]string
- func (p *Provider) GetString(key string, def string) string
- func (p *Provider) GetStringWithValidator(key string, def string, validate func(string) bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider resolves configuration values from an ordered list of sources. Sources are listed in descending priority order: the first source wins.
func New ¶
func New() *Provider
New returns a Provider configured with the following source list, in descending order of priority.
func (*Provider) GetDuration ¶
func (*Provider) GetFloatWithValidator ¶
func (*Provider) GetIntWithValidator ¶
Click to show internal directories.
Click to hide internal directories.