Documentation ¶
Index ¶
- Variables
- func FlagBool(key, desc string, fallback bool) *bool
- func FlagEnvBool(key, desc string, fallback bool) *bool
- func FlagEnvDuration(key, desc string, fallback time.Duration) *time.Duration
- func FlagEnvInt(key, desc string, fallback int) *int
- func FlagEnvString(key, desc, fallback string) *string
- func FlagString(key, desc, fallback string) *string
- type ArrayFlags
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ListenAddr of the HTTP service ListenAddr = FlagEnvString("addr", "HTTP service address", ":8080") // PublicURL used for PSHB subscriptions PublicURL = FlagEnvString("public-url", "Public URL used for PSHB subscriptions", "") // DB location DB = FlagEnvString("db", "Database location", "boltdb://data.db") // LogLevel (debug/info/warn/error) LogLevel = FlagEnvString("log-level", "Logging level", "info") // LogPretty writes log using text format LogPretty = FlagEnvBool("log-pretty", "Writes log using plain text format", false) // Delay is the delay between aggregations Delay = FlagEnvDuration("delay", "Delay between aggregations", 1*time.Minute) // Timeout is the aggregation timeout Timeout = FlagEnvDuration("timeout", "Aggregation timeout", 5*time.Second) // CacheRetention is the duration of the cache retention CacheRetention = FlagEnvDuration("cache-retention", "Cache retention duration", 72*time.Hour) // SentryDSN is the Sentru DSN URL SentryDSN = FlagEnvString("sentry-dsn", "Sentry DSN URL", "") // ImportFilename is the OPML file to import at boot time ImportFilename = FlagString("import", "Import a OPML file at boot time", "") // ClearCache is a flag to clear the cache ClearCache = FlagBool("clear-cache", "Clear cache at bootstrap", false) // Version is a flag to display the version Version = FlagBool("version", "Show version", false) // Outputs destinations Outputs = FlagEnvArray("output", "Output destination", []string{"stdout://"}) // Plugins to load Plugins = FlagEnvArray("plugin", "Plugin to load", []string{}) // Filters to load Filters = FlagEnvArray("filter", "Plugin to load", []string{}) )
Functions ¶
func FlagEnvBool ¶
FlagEnvBool returns flag or env bool value with fallback
func FlagEnvDuration ¶
FlagEnvDuration returns flag or env duration value with fallback
func FlagEnvInt ¶
FlagEnvInt returns flag or env int value with fallback
func FlagEnvString ¶
FlagEnvString returns flag or env string value with fallback
func FlagString ¶
FlagString returns flag string value with fallback
Types ¶
type ArrayFlags ¶
type ArrayFlags struct {
// contains filtered or unexported fields
}
ArrayFlags contains an array of command flags
func FlagEnvArray ¶
func FlagEnvArray(key, desc string, fallback []string) *ArrayFlags
FlagEnvArray returns flag or env array value with fallback
func (*ArrayFlags) Set ¶
func (i *ArrayFlags) Set(value string) error
Set is used to add a value to the flag array
func (*ArrayFlags) String ¶
func (i *ArrayFlags) String() string
String return the string value of a flag array
func (*ArrayFlags) Values ¶
func (i *ArrayFlags) Values() []string
Values return the values of a flag array
Click to show internal directories.
Click to hide internal directories.