etcd

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateParameteres

func GenerateParameteres(output string, params *Parameters) []string

Types

type Client

type Client client.Client

type Etcd

type Etcd struct {
	// contains filtered or unexported fields
}

func New

func New(endpoints ...string) (*Etcd, error)

func (*Etcd) AddMember

func (e *Etcd) AddMember(c context.Context, peerUrl string) (*Member, error)

AddMember adds new member to the cluster

func (*Etcd) Available added in v0.3.0

func (e *Etcd) Available(c context.Context) bool

Available checks wheather the etcd instance is responsive.

func (*Etcd) GarbageCollector

func (e *Etcd) GarbageCollector(c context.Context, members []string)

GarbageCollector removes etcd members which are not in the members list

*
* Members list contains private addresses of the instances.

func (*Etcd) GetLeader

func (e *Etcd) GetLeader(c context.Context) (*Member, error)

GetLeader fetches etcd cluster leader information

func (*Etcd) ListMembers

func (e *Etcd) ListMembers(c context.Context) ([]*Member, error)

ListMembers lists all etcd cluster members

func (*Etcd) NewMembersAPI

func (e *Etcd) NewMembersAPI() MembersAPI

type Member

type Member client.Member

type MembersAPI

type MembersAPI client.MembersAPI

type Parameters

type Parameters struct {
	Name            string
	PrivateIP       string
	PublicIP        string
	ClientPort      int
	Clients         []string
	Peers           []string
	ExistingCluster bool
	Token           [16]byte
	Join            func([]string, string) string
}

func NewParameters added in v0.2.0

func NewParameters() *Parameters

func (*Parameters) ClusterState

func (p *Parameters) ClusterState() string

Jump to

Keyboard shortcuts

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