etcdutil

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CliCertFile = "etcd-client.crt"
	CliKeyFile  = "etcd-client.key"
	CliCAFile   = "etcd-client-ca.crt"
)

Variables

This section is empty.

Functions

func CheckHealth added in v0.2.2

func CheckHealth(url string, tc *tls.Config) (bool, error)

func CreateMemberName added in v0.2.0

func CreateMemberName(clusterName string, member int) string

func GetCounterFromMemberName added in v0.2.0

func GetCounterFromMemberName(name string) (int, error)

func ListMembers added in v0.2.0

func ListMembers(clientURLs []string, tc *tls.Config) (*clientv3.MemberListResponse, error)

func MemberNameFromPeerURL added in v0.2.0

func MemberNameFromPeerURL(pu string) (string, error)

func NewTLSConfig added in v0.2.6

func NewTLSConfig(certData, keyData, caData []byte) (*tls.Config, error)

func RemoveMember added in v0.2.0

func RemoveMember(clientURLs []string, tc *tls.Config, id uint64) error

Types

type Member

type Member struct {
	Name string
	// Kubernetes namespace this member runs in.
	Namespace string
	// ID field can be 0, which is unknown ID.
	// We know the ID of a member when we get the member information from etcd,
	// but not from Kubernetes pod list.
	ID uint64

	SecurePeer   bool
	SecureClient bool
}

func (*Member) ClientAddr

func (m *Member) ClientAddr() string

func (*Member) ListenClientURL added in v0.2.6

func (m *Member) ListenClientURL() string

func (*Member) ListenPeerURL added in v0.2.5

func (m *Member) ListenPeerURL() string

func (*Member) PeerURL added in v0.2.5

func (m *Member) PeerURL() string

type MemberSet

type MemberSet map[string]*Member

func NewMemberSet

func NewMemberSet(ms ...*Member) MemberSet

func (MemberSet) Add

func (ms MemberSet) Add(m *Member)

func (MemberSet) ClientURLs

func (ms MemberSet) ClientURLs() []string

func (MemberSet) Diff

func (ms MemberSet) Diff(other MemberSet) MemberSet

the set of all members of s1 that are not members of s2

func (MemberSet) IsEqual added in v0.2.0

func (ms MemberSet) IsEqual(other MemberSet) bool

IsEqual tells whether two member sets are equal by checking - they have the same set of members and member equality are judged by Name only.

func (MemberSet) PeerURLPairs

func (ms MemberSet) PeerURLPairs() []string

func (MemberSet) PickOne

func (ms MemberSet) PickOne() *Member

func (MemberSet) Remove

func (ms MemberSet) Remove(name string)

func (MemberSet) Size

func (ms MemberSet) Size() int

func (MemberSet) String

func (ms MemberSet) String() string

Jump to

Keyboard shortcuts

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