config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 5 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const KEY_NACOS = "NACOS_ADDRESS"

Variables

View Source
var New = config.New
View Source
var WithDecoder = config.WithDecoder
View Source
var WithSource = config.WithSource

Functions

func Create added in v0.0.36

func Create(dsn *url.URL, v interface{}, format string) (config.Config, error)

Create instantiates a discovery based on `discoveryDSN`.

func Load

func Load(conf string, v interface{}, format string) config.Config

func LoadEnv added in v0.0.36

func LoadEnv(v interface{}, format string) config.Config

func LoadFlag added in v0.0.36

func LoadFlag(v interface{}, format string) config.Config

func Register added in v0.0.36

func Register(name string, factory Factory)

Register registers one discovery.

Types

type Config added in v0.0.39

type Config = config.Config

type Factory added in v0.0.36

type Factory func(dsn *url.URL, v interface{}, format string) (config.Config, error)

type KeyValue added in v0.0.39

type KeyValue = config.KeyValue

type Registry added in v0.0.36

type Registry interface {
	Register(name string, factory Factory)
	Create(dsn *url.URL, v interface{}, format string) (config.Config, error)
}

Registry is the interface for callers to get registered middleware.

func NewRegistry added in v0.0.36

func NewRegistry() Registry

NewRegistry returns a new middleware registry.

type Source added in v0.0.39

type Source = config.Source

type Value

type Value = config.Value

type Watcher added in v0.0.39

type Watcher = config.Watcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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