base

package
v1.0.4-rc0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBindAddr    = "127.0.0.1"
	DefaultRPCPort     = 1314
	DefaultHTTPPort    = "1313"
	LocalConsulAddress = "localhost:8500"
	LocalNomadAddress  = "http://localhost:4646"
)

Define default local addresses for Consul and Nomad.

Variables

View Source
var (
	// DefaultRPCAddr is the default bind address and port for the Replicator RPC
	// listener.
	DefaultRPCAddr = &net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: 1314}
)

Functions

func DefaultConfig

func DefaultConfig() *structs.Config

DefaultConfig returns a default configuration struct with sane defaults.

func DevConfig

func DevConfig() *structs.Config

DevConfig returns a configuration struct with sane defaults for development and testing purposes.

func InitializeClients

func InitializeClients(config *structs.Config) (err error)

InitializeClients completes the setup process for the Nomad and Consul clients. Must be called after configuration merging is complete.

func LoadConfig

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

LoadConfig loads the configuration at the given path whether the specified path is an individual file or a directory of numerous configuration files.

func LoadConfigDir

func LoadConfigDir(dir string) (*structs.Config, error)

LoadConfigDir loads all the configurations in the given directory in lexicographic order.

func ParseConfig

func ParseConfig(r io.Reader) (*structs.Config, error)

ParseConfig parses the config from the given io.Reader.

func ParseConfigFile

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

ParseConfigFile parses the given path as a config file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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