provider

package
v2.9.0-dev Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package provider resolves configuration values from multiple sources in priority order and reports telemetry for each value found.

Index

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) GetBool

func (p *Provider) GetBool(key string, def bool) bool

func (*Provider) GetDuration

func (p *Provider) GetDuration(key string, def time.Duration) time.Duration

func (*Provider) GetFloat

func (p *Provider) GetFloat(key string, def float64) float64

func (*Provider) GetFloatWithValidator

func (p *Provider) GetFloatWithValidator(key string, def float64, validate func(float64) bool) float64

func (*Provider) GetInt

func (p *Provider) GetInt(key string, def int) int

func (*Provider) GetIntWithValidator

func (p *Provider) GetIntWithValidator(key string, def int, validate func(int) bool) int

func (*Provider) GetMap

func (p *Provider) GetMap(key string, def map[string]string) map[string]string

func (*Provider) GetString

func (p *Provider) GetString(key string, def string) string

func (*Provider) GetStringWithValidator

func (p *Provider) GetStringWithValidator(key string, def string, validate func(string) bool) string

Jump to

Keyboard shortcuts

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