config

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalConsulAddress = "localhost:8500"
	LocalNomadAddress  = "http://localhost:4646"
)

Define default local addresses for Consul and Nomad

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *structs.Config

DefaultConfig returns a default configuration struct with sane defaults.

func FromPath

func FromPath(path string) (*structs.Config, error)

FromPath iterates and merges all configuration files in a given directory returning the resulting merged config based on lexical ordering for all files found. If the passed object is a file this is read and merged into the default config.

func ParseConfig

func ParseConfig(path string) (*structs.Config, error)

ParseConfig reads the configuration file at the given path and returns a new Config struct with the data populated. The returned data is a merge of the user specified parameters and defaults with the user provided params always taking precident.

Types

This section is empty.

Jump to

Keyboard shortcuts

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