Documentation
¶
Index ¶
Constants ¶
View Source
const ( // OutputFileName name used for output path. OutputFileName = "decider.json" // DefaultInfoNamespace path for the info key. DefaultInfoNamespace = defaultNamespace + "/" + "info" )
Variables ¶
View Source
var ConfigDir = "/etc/dcdr"
ConfigDir default config directory.
View Source
var ExampleConfig = []byte(`
// Username = "dcdr admin"
// Namespace = "dcdr"
// Watcher {
// OutputPath = "/etc/dcdr/decider.json"
// }
// Server {
// JsonRoot = "dcdr"
// Endpoint = "/dcdr.json"
// }
// Git {
// RepoURL = "git@github.com:vsco/decider-test-config.git"
// RepoPath = "/etc/dcdr/audit"
// }
// Stats {
// Namespace = "decider"
// Host = "127.0.0.1"
// Port = 8126
// }`)
ExampleConfig an example config written by `dcdr init`
Functions ¶
Types ¶
type Config ¶
type Config struct {
Username string
Namespace string
Watcher Watcher
Git Git
Stats Stats
Server Server
}
Config config struct for the `CLI`, `Client`, and `Server`
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a `Config` with default values.
func LoadConfig ¶
func LoadConfig() *Config
LoadConfig reads config.hcl if found and merges with `DefaultConfig`.
func (*Config) GitEnabled ¶
GitEnabled checks if a git repo has been configured.
func (*Config) PushEnabled ¶
PushEnabled checks if a git repo has a remote origin.
func (*Config) StatsEnabled ¶
StatsEnabled checks if statsd has been configured.
Click to show internal directories.
Click to hide internal directories.