consul

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf *Config) (types.ConfigSource, error)

New creates a new consul ConfigSource

Types

type Config

type Config struct {
	// A Consul server URL
	Endpoint string `yaml:"endpoint"`
	// An optional username to use when connecting
	Username string `yaml:"username"`
	// An optional password to use when connecting
	Password string `yaml:"password" neverLog:"true"`
	// An authentication token, if needed
	Token string `yaml:"token" neverLog:"true"`
	// The Consul datacenter to use
	Datacenter string `yaml:"datacenter"`
}

Config for the consul client

func (*Config) New

func (c *Config) New() (types.ConfigSource, error)

New creates a new Consul remote config source from the target config

func (*Config) Validate

func (c *Config) Validate() error

Validate the config

Jump to

Keyboard shortcuts

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