Documentation
¶
Overview ¶
Package config loads the configurations from a yaml file. Configurations come in the following form:
app: log_level: info writers: elasticsearch: url: http://localhost:9200 index: logs file: path: /var/log/logpipe/logs.log
The app part will be collapsed as the Setting properties.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrFileNotExist is returned when the file can not be read. ErrFileNotExist = errors.New("file does not exist") // ErrNoWriters is returned when there is no writes found on the settings. ErrNoWriters = errors.New("no writers found") )
Functions ¶
This section is empty.
Types ¶
type Setting ¶
type Setting struct { // LogLevel is the level in which the logpipe application writes it's own // logs. LogLevel string // Writers has a map of "writer" name to its configuration. // Each writer decides its own configuration. // It goes as: [name:[type:file, location:foo, name:bar]],.. Writers map[string]map[string]string }
Setting holds the required configuration settings for bootstrapping the application.
Click to show internal directories.
Click to hide internal directories.