Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidDataSource defines an error that the scheme has been registered. ErrInvalidDataSource = errors.New("invalid data source, please make sure the scheme has been registered") // ErrInvalidUnmarshaller defines an error that unmarshaller is not exists. ErrInvalidUnmarshaller = errors.New("invalid unmarshaller, please make sure the config type is right") // ErrDefaultConfigNotExist defines an error than config not exists. ErrDefaultConfigNotExist = errors.New("default config not exist") )
Functions ¶
func NewDataSource ¶
func NewDataSource(configAddr string, watch bool) (econf.DataSource, econf.Unmarshaller, econf.ConfigType, error)
NewDataSource constructs a new configuration provider by supplied config address.
func Register ¶
func Register(scheme string, creator econf.DataSource)
Register registers a dataSource creator function to the registry.
Types ¶
type DataSourceCreatorFunc ¶
type DataSourceCreatorFunc func() econf.DataSource
DataSourceCreatorFunc represents a dataSource creator function.
Click to show internal directories.
Click to hide internal directories.