Documentation
¶
Index ¶
Constants ¶
View Source
const ( ParserCreatorGroup = "flam.config.parsers.creator" ParserDriverYaml = "flam.config.parsers.driver.yaml" ParserDriverJson = "flam.config.parsers.driver.json" SourceCreatorGroup = "flam.config.sources.creator" SourceDriverEnv = "flam.config.sources.driver.env" SourceDriverFile = "flam.config.sources.driver.file" SourceDriverObservableFile = "flam.config.sources.driver.observable-file" SourceDriverDir = "flam.config.sources.driver.dir" SourceDriverRest = "flam.config.sources.driver.rest" SourceDriverObservableRest = "flam.config.sources.driver.observable-rest" PathDefaultFileParser = "flam.config.defaults.file.parser" PathDefaultFileDisk = "flam.config.defaults.file.disk" PathDefaultRestParser = "flam.config.defaults.rest.parser" PathBoot = "flam.config.boot" PathObserverFrequency = "flam.config.observer.frequency" PathParsers = "flam.config.parsers" PathSources = "flam.config.sources" )
Variables ¶
View Source
var ( Defaults = flam.Bag{} DefaultFileParser = "" DefaultFileDisk = "" DefaultRestParser = "" )
View Source
var ( ErrRestConfigNotFound = errors.New("rest config data not found") ErrRestInvalidConfig = errors.New("invalid rest config data") ErrRestTimestampNotFound = errors.New("rest config timestamp not found") ErrRestInvalidTimestamp = errors.New("invalid rest config timestamp") ErrSourceNotFound = errors.New("config source not found") ErrDuplicateSource = errors.New("duplicate config source") ErrDuplicateObserver = errors.New("duplicate config observer") )
Functions ¶
func NewProvider ¶
Types ¶
type Facade ¶
type Facade interface {
Entries() []string
Has(path string) bool
Get(path string, def ...any) any
Bool(path string, def ...bool) bool
Int(path string, def ...int) int
Int8(path string, def ...int8) int8
Int16(path string, def ...int16) int16
Int32(path string, def ...int32) int32
Int64(path string, def ...int64) int64
Uint(path string, def ...uint) uint
Uint8(path string, def ...uint8) uint8
Uint16(path string, def ...uint16) uint16
Uint32(path string, def ...uint32) uint32
Uint64(path string, def ...uint64) uint64
Float32(path string, def ...float32) float32
Float64(path string, def ...float64) float64
String(path string, def ...string) string
StringMap(path string, def ...map[string]any) map[string]any
StringMapString(path string, def ...map[string]string) map[string]string
Slice(path string, def ...[]any) []any
StringSlice(path string, def ...[]string) []string
Duration(path string, def ...time.Duration) time.Duration
Bag(path string, def ...flam.Bag) flam.Bag
Set(path string, value any) error
Populate(target any, path ...string) error
HasParser(id string) bool
ListParsers() []string
GetParser(id string) (Parser, error)
AddParser(id string, source Parser) error
HasSource(id string) bool
ListSources() []string
GetSource(id string) (Source, error)
AddSource(id string, source Source) error
SetSourcePriority(id string, priority int) error
RemoveSource(id string) error
RemoveAllSources() error
ReloadSources() error
HasObserver(id, path string) bool
AddObserver(id, path string, callback Observer) error
RemoveObserver(id string) error
}
type ObservableSource ¶
type ParserCreator ¶
type RestRequesterGenerator ¶
type RestRequesterGenerator interface {
Create() (RestRequester, error)
}
Source Files
¶
- consts.go
- convert.go
- defaults.go
- dir_source.go
- dir_source_creator.go
- env_source.go
- env_source_creator.go
- errors.go
- facade.go
- factory_config.go
- file_source.go
- file_source_creator.go
- json_parser.go
- json_parser_creator.go
- manager.go
- observable_file_source.go
- observable_file_source_creator.go
- observable_rest_source.go
- observable_rest_source_creator.go
- observer.go
- parser.go
- parser_creator.go
- parser_factory.go
- provider.go
- rest_requester.go
- rest_requester_generator.go
- rest_source.go
- rest_source_creator.go
- source.go
- source_creator.go
- source_factory.go
- yaml_parser.go
- yaml_parser_creator.go
Click to show internal directories.
Click to hide internal directories.