manager

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 6 Imported by: 1

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.

Jump to

Keyboard shortcuts

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