Documentation
¶
Overview ¶
Package config is an interface for dynamic configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Default Config Manager.
DefaultConfig, _ = NewConfig()
)
Functions ¶
Types ¶
type Config ¶
type Config interface {
// provide the reader.Values interface
reader.Values
// Init the config
Init(opts ...Option) error
// Options in the config
Options() Options
// Stop the config loader/watcher
Close() error
// Load config sources
Load(source ...source.Source) error
// Force a source changeset sync
Sync() error
// Watch a value for changes
Watch(path ...string) (Watcher, error)
}
Config is an interface abstraction for dynamic configuration.
type Option ¶
type Option func(o *Options)
func WithLoader ¶
WithLoader sets the loader for manager config.
func WithSource ¶
WithSource appends a source to list of sources.
func WithWatcherDisabled ¶ added in v4.7.0
func WithWatcherDisabled() Option
Directories
¶
| Path | Synopsis |
|---|---|
|
cli
module
|
|
|
cmd
module
|
|
|
codec/proto
module
|
|
|
registry/memory
module
|
|
|
codec
module
|
|
|
json
module
|
|
|
config
module
|
|
|
Package encoder handles source encoding formats
|
Package encoder handles source encoding formats |
|
broker
module
|
|
|
broker/memory
module
|
|
|
client
module
|
|
|
client/mock
module
|
|
|
client/rpc
module
|
|
|
cmd
module
|
|
|
cmd/server/debug/proto
module
|
|
|
codec
module
|
|
|
codec/bytes
module
|
|
|
codec/grpc
module
|
|
|
codec/json
module
|
|
|
codec/jsonrpc
module
|
|
|
codec/proto
module
|
|
|
codec/protorpc
module
|
|
|
errors
module
|
|
|
json/broker/http
module
|
|
|
json/broker/memory
module
|
|
|
json/client/mock
module
|
|
|
json/client/rpc
module
|
|
|
json/cmd
module
|
|
|
json/cmd/broker/memory
module
|
|
|
json/codec
module
|
|
|
json/codec/bytes
module
|
|
|
json/codec/grpc
module
|
|
|
json/codec/json
module
|
|
|
json/codec/jsonrpc
module
|
|
|
json/codec/proto
module
|
|
|
json/codec/protorpc
module
|
|
|
json/errors
module
|
|
|
json/metadata
module
|
|
|
json/registry/consul
module
|
|
|
json/registry/gossip
module
|
|
|
json/registry/gossip/proto
module
|
|
|
json/registry/mdns
module
|
|
|
json/registry/memory
module
|
|
|
json/selector
module
|
|
|
json/selector/dns
module
|
|
|
json/selector/registry
module
|
|
|
json/selector/static
module
|
|
|
json/server
module
|
|
|
json/server/debug
module
|
|
|
json/server/debug/proto
module
|
|
|
json/server/mock
module
|
|
|
json/server/rpc
module
|
|
|
metadata
module
|
|
|
registry
module
|
|
|
registry/consul
module
|
|
|
registry/gossip
module
|
|
|
registry/gossip/proto
module
|
|
|
registry/mdns
module
|
|
|
registry/memory
module
|
|
|
selector
module
|
|
|
selector/dns
module
|
|
|
selector/registry
module
|
|
|
selector/static
module
|
|
|
toml
module
|
|
|
toml/transport
module
|
|
|
toml/transport/http
module
|
|
|
toml/transport/memory
module
|
|
|
transport
module
|
|
|
transport/http
module
|
|
|
transport/memory
module
|
|
|
yaml
module
|
|
|
yaml/registry/memory
module
|
|
|
yaml/server/mock
module
|
|
|
env
module
|
|
|
file
module
|
|
|
greader
module
|
|
|
json
module
|
|
|
json/codec/grpc
module
|
|
|
json/codec/json
module
|
|
|
json/server/mock
module
|
|
|
json/transport/memory
module
|
|
|
Package loader manages loading from multiple sources
|
Package loader manages loading from multiple sources |
|
cmd
module
|
|
|
cmd/selector/dns
module
|
|
|
memory/client/rpc
module
|
|
|
memory/cmd
module
|
|
|
memory/cmd/codec/protorpc
module
|
|
|
memory/cmd/server/rpc
module
|
|
|
memory/codec/json
module
|
|
|
memory/config
module
|
|
|
Package reader parses change sets and provides config values
|
Package reader parses change sets and provides config values |
|
broker
module
|
|
|
broker/http
module
|
|
|
broker/memory
module
|
|
|
cmd
module
|
|
|
cmd/client/mock
module
|
|
|
encoder
module
|
|
|
encoder/json
module
|
|
|
env
module
|
|
|
json/cmd
module
|
|
|
json/server/rpc
module
|
|
|
toml
module
|
|
|
yaml
module
|
|
|
yaml/selector/dns
module
|
|
|
Package secrets is an interface for encrypting and decrypting secrets
|
Package secrets is an interface for encrypting and decrypting secrets |
|
box
Package box is an asymmetric implementation of config/secrets using nacl/box
|
Package box is an asymmetric implementation of config/secrets using nacl/box |
|
secretbox
Package secretbox is a config/secrets implementation that uses nacl/secretbox to do symmetric encryption / verification
|
Package secretbox is a config/secrets implementation that uses nacl/secretbox to do symmetric encryption / verification |
|
cmd
module
|
|
|
souce
module
|
|
|
consul
module
|
|
|
registry/consul
module
|
|
|
Package source is the interface for sources
|
Package source is the interface for sources |
|
file
Package file is a file source.
|
Package file is a file source. |
|
memory
Package memory is a memory source
|
Package memory is a memory source |
|
cli/broker/memory
module
|
|
|
cmd
module
|
|
|
cmd/codec
module
|
|
|
cmd/codec/bytes
module
|
|
|
cmd/codec/grpc
module
|
|
|
cmd/codec/json
module
|
|
|
cmd/codec/jsonrpc
module
|
|
|
cmd/codec/proto
module
|
|
|
cmd/codec/protorpc
module
|
|
|
codec
module
|
|
|
codec/bytes
module
|
|
|
codec/grpc
module
|
|
|
codec/json
module
|
|
|
codec/jsonrpc
module
|
|
|
codec/proto
module
|
|
|
codec/protorpc
module
|
|
|
configmap
module
|
|
|
configmap/client/rpc
module
|
|
|
consul
module
|
|
|
encoder
module
|
|
|
encoder/yaml
module
|
|
|
envvar
module
|
|
|
etcd
module
|
|
|
file/broker
module
|
|
|
file/broker/http
module
|
|
|
file/broker/memory
module
|
|
|
file/client
module
|
|
|
file/client/mock
module
|
|
|
file/client/rpc
module
|
|
|
file/cmd
module
|
|
|
file/cmd/codec/jsonrpc
module
|
|
|
file/codec
module
|
|
|
file/codec/grpc
module
|
|
|
file/codec/json
module
|
|
|
file/codec/jsonrpc
module
|
|
|
file/codec/proto
module
|
|
|
file/codec/protorpc
module
|
|
|
file/config
module
|
|
|
file/metadata
module
|
|
|
file/registry
module
|
|
|
file/registry/consul
module
|
|
|
file/registry/gossip
module
|
|
|
file/registry/gossip/proto
module
|
|
|
file/registry/mdns
module
|
|
|
file/selector
module
|
|
|
file/selector/dns
module
|
|
|
file/selector/registry
module
|
|
|
file/selector/static
module
|
|
|
file/server
module
|
|
|
file/server/rpc
module
|
|
|
file/transport
module
|
|
|
flag/registry/mdns
module
|
|
|
flag/server
module
|
|
|
flag/server/rpc
module
|
|
|
grpc
module
|
|
|
memory/broker
module
|
|
|
memory/broker/http
module
|
|
|
memory/broker/memory
module
|
|
|
nacos
module
|
|
|
nacos/client/mock
module
|
|
|
nacos/selector/static
module
|
|
|
reader
module
|
|
|
service
module
|
|
|
service/codec/protorpc
module
|
|
|
service/proto
module
|
|
|
toml
module
|
|
|
url
module
|
|
|
yaml
module
|
|
|
yaml/server/rpc
module
|
|
|
util
module
|
|
|
log
module
|
|
|
watcher
module
|
|
|
yaml
module
|
|
|
codec/jsonrpc
module
|
|
|
server/debug
module
|
|
|
server/debug/proto
module
|
Click to show internal directories.
Click to hide internal directories.