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" // Storage = "consul" // Etcd { // Endpoints = ["http://127.0.0.1:2379"] // } // Consul { // Address = "127.0.0.1:8500" // } // Watcher { // OutputPath = "/etc/dcdr/decider.json" // } // Server { // JsonRoot = "dcdr" // Endpoint = "/dcdr.json" // } // Git { // RepoURL = "[email protected]: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 Storage string Consul Consul Etcd Etcd Redis Redis 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.
type Consul ¶ added in v0.2.3
type Consul struct {
Address string
}
Consul config struct for the consul store. Most of consul configuration is handled by environment variables
type Etcd ¶ added in v0.2.3
type Etcd struct {
Endpoints []string
}
Etcd config struct for the etcd store.
type Redis ¶ added in v0.2.4
type Redis struct {
Address string
}
Redis config struct for the redis store.
Click to show internal directories.
Click to hide internal directories.