agent

package
v0.0.0-...-dbfa1ae Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

Command is the command to run the agent

func (*Command) Help

func (c *Command) Help() string

Help implements the cli.Command interface

func (*Command) Run

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

Run implements the cli.Command interface

func (*Command) Synopsis

func (c *Command) Synopsis() string

Synopsis implements the cli.Command interface

type Config

type Config struct {
	// NodeName is the unique name of the client.
	NodeName string `hcl:"name"`

	// DataDir is the path for the data directory.
	DataDir string `hcl:"data_dir"`

	// ServiceName is the name of the service.
	ServiceName string `hcl:"service"`

	// LogLevel is used to set the log level.
	LogLevel string `hcl:"log_level"`

	// Consul is the configuration for the consul agent.
	Consul *config.ConsulConfig `hcl:"consul"`

	// DevMode enables the development mode. It can only be enabled with command flags.
	DevMode bool `hcl:"-"`

	// Debug enables debug mode
	Debug bool `hcl:"debug"`

	// Backend is the configuration of the backend
	Backend map[string]map[string]interface{} `hcl:"backend"`

	// BindAddr is the address we bind to.
	BindAddr string `hcl:"bind_addr"`

	// AdvertiseAddr is the address we advertise to other nodes.
	AdvertiseAddr string `hcl:"advertise_addr"`

	// BootstrapExpect is the expected number of nodes
	// to bootstrap the cluster.
	BootstrapExpect int `hcl:"bootstrap_expect"`

	// Ports configures the set of ports
	Ports *Ports `hcl:"ports"`

	// Telemetry is the configuration for the telemetry
	Telemetry *cluster.Telemetry `hcl:"telemetry"`

	// Envoy is the configuration for envoy proxy
	Envoy *cluster.EnvoyConfig `hcl:"envoy"`
}

Config is the agent configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

func (*Config) Merge

func (c *Config) Merge(c1 ...*Config) error

Merge merges two configurations

type Ports

type Ports struct {
	// Serf is the port used for the serf library.
	Serf int `hcl:"serf"`

	// RPC is the port used by raft and the inter node communication.
	RPC int `hcl:"rpc"`

	// HTTP is the port for the http api
	HTTP int `hcl:"http"`
}

Ports is the set of ports to bind.

Jump to

Keyboard shortcuts

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