Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigFile ¶
type ConfigFile struct { Bucket string Key string Config interface{} LastUpdated int64 OnSuccess func(*ConfigFile) OnError func(*ConfigFile, error) }
ConfigFile wraps a config from an S4 object
func GetConfig ¶
func GetConfig(bucket, key string, config interface{}) (*ConfigFile, error)
GetConfig loads a config struct from an S3 object
func GetConfigFromEnv ¶
func GetConfigFromEnv(config interface{}) (*ConfigFile, error)
GetConfigFromEnv loads a config struct using bucket/object names from the environment
func (*ConfigFile) Autoreload ¶
func (c *ConfigFile) Autoreload(delay int)
Autoreload enables reloading every $interval seconds
func (*ConfigFile) Load ¶
func (c *ConfigFile) Load() error
Load downloads and parses the S3 config object
Click to show internal directories.
Click to hide internal directories.