join

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PreparedStrategy assumes that the admin prepares new member entries.
	PreparedStrategy = Strategy("prepared")

	// PruneStrategy aggressively removes dead members.
	PruneStrategy = Strategy("prune")

	// ReplaceStrategy defensively removes a dead member only when a cluster is full.
	ReplaceStrategy = Strategy("replace")

	// AddStrategy only adds a member until the cluster is full, never removes old members.
	AddStrategy = Strategy("add")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdConfig

type EtcdConfig struct {
	InitialCluster      []string
	InitialClusterState string
	AdvertisePeerURLs   string
	Discovery           string
	Name                string
}

EtcdConfig is the result of the join algorithm, turned into etcd flags or env vars.

func Join

func Join(
	discoveryURL, name, initialAdvertisePeerURLs string,
	fresh bool,
	clientPort, clusterSize int,
	strategy Strategy,
) (*EtcdConfig, error)

Join adds a new member depending on the strategy and returns a matching etcd configuration.

type Strategy

type Strategy string

Strategy describes the member add strategy.

Jump to

Keyboard shortcuts

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