config

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Copyright (c) 2013 Kelsey Hightower. All rights reserved. Use of this source code is governed by the Apache License, Version 2.0 that can be found in the LICENSE file.

Copyright (c) 2013 Kelsey Hightower. All rights reserved. Use of this source code is governed by the Apache License, Version 2.0 that can be found in the LICENSE file.

Copyright (c) 2013 Kelsey Hightower. All rights reserved. Use of this source code is governed by the Apache License, Version 2.0 that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backend added in v0.4.0

func Backend() string

func ClientCaKeys added in v0.3.0

func ClientCaKeys() string

ClientCaKeys returns the client CA certificates

func ClientCert

func ClientCert() string

ClientCert returns the client cert path.

func ClientKey

func ClientKey() string

ClientKey returns the client key path.

func ConfDir

func ConfDir() string

ConfDir returns the path to the confd config dir.

func ConfigDir

func ConfigDir() string

ConfigDir returns the path to the confd config dir.

func Consul added in v0.4.0

func Consul() bool

Consul returns if we should use Consul

func ConsulAddr added in v0.4.0

func ConsulAddr() string

ConsulAddr returns the address of the consul node

func Debug

func Debug() bool

Debug reports whether debug mode is enabled.

func EtcdNodes

func EtcdNodes() []string

EtcdNodes returns a list of etcd node url strings. For example: ["http://203.0.113.30:4001"]

func Interval

func Interval() int

Interval returns the number of seconds to wait between configuration runs.

func LoadConfig

func LoadConfig(path string) error

LoadConfig initializes the confd configuration by first setting defaults, then overriding setting from the confd config file, and finally overriding settings from flags set on the command line. It returns an error if any.

func Noop

func Noop() bool

Noop reports whether noop mode is enabled.

func Prefix

func Prefix() string

Prefix returns the etcd key prefix to use when querying etcd.

func Quiet

func Quiet() bool

Quiet reports whether quiet mode is enabled.

func SRVDomain

func SRVDomain() string

SRVDomain returns the domain name used in etcd SRV record lookups.

func SetConfDir

func SetConfDir(path string)

SetConfDir sets the confd conf dir.

func SetNoop

func SetNoop(enabled bool)

SetNoop sets noop.

func SetPrefix

func SetPrefix(prefix string)

SetPrefix sets the key prefix.

func TemplateDir

func TemplateDir() string

TemplateDir returns the template directory path.

func Verbose

func Verbose() bool

Verbose reports whether verbose mode is enabled.

Types

type Config

type Config struct {
	Confd confd
}

Config represents the confd configuration settings.

type Nodes

type Nodes []string

Nodes is a custom flag Var representing a list of etcd nodes.

func (*Nodes) Set

func (n *Nodes) Set(node string) error

Set appends the node to the etcd node list.

func (*Nodes) String

func (n *Nodes) String() string

String returns the string representation of a node var.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL