Help us shape the future of Go! Take the 2026 Go Developer Survey

agent

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2017 License: MIT Imports: 17 Imported by: 1

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

type Command

type Command struct {
	command.Meta
}

func (*Command) Help

func (c *Command) Help() string

Help provides the help information for the agent command.

func (*Command) Run

func (c *Command) Run(args []string) int

Run triggers a run of the replicator agent by setting up and parsing the configuration and then initiating a new runner.

func (*Command) Synopsis

func (c *Command) Synopsis() string

Synopsis is provides a brief summary of the agent command.

Jump to

Keyboard shortcuts

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