config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 5 Imported by: 1

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{}) (config.Config, error)

Create instantiates a discovery based on `discoveryDSN`.

func Load

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

func LoadEnv added in v0.0.36

func LoadEnv(v interface{}) config.Config

func LoadFlag added in v0.0.36

func LoadFlag(v interface{}) 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{}) (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{}) (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