bootstrap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2016 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const Path = "/etc/consul/consul.json"

Variables

This section is empty.

Functions

func GenerateCaCert

func GenerateCaCert(cd *CertData) (string, error)

func Init

func Init(root *cobra.Command)

func ReadConsulConfig

func ReadConsulConfig() map[string]interface{}

Types

type CertData

type CertData struct {
	Country  string
	State    string
	Locality string
	Org      string
	Unit     string
	Common   string
}

type Config

type Config struct {
	Servers string

	Clients string

	Domain string
	Cert   *CertData
	// contains filtered or unexported fields
}

func (*Config) Bootstrap

func (c *Config) Bootstrap(args []string) error

func (*Config) BootstrapNode

func (c *Config) BootstrapNode(ip string, isServer bool) error

func (*Config) GenerateSecInfo

func (c *Config) GenerateSecInfo() (*SecInfo, error)

func (*Config) GetSecurityInfo

func (c *Config) GetSecurityInfo() (err error)

GetSecurityInfo() Return the Consul security information needed to add a node to an existing Consul cluster. Return a boolean flag to indicate whether the current node is already bootstrapped

func (*Config) SendConsulData

func (c *Config) SendConsulData(ip string, bs *structs.Bootstrap) (err error)

type SecInfo

type SecInfo struct {
	RootToken string
	GossipKey string
	Cert      string
}

Jump to

Keyboard shortcuts

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