etcdutil

package
Version: v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: Apache-2.0 Imports: 12 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 ListMembers

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

func MemberNameFromPeerURL

func MemberNameFromPeerURL(pu string) (string, error)

func NewTLSConfig

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

func RemoveMember

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) Addr

func (m *Member) Addr() string

func (*Member) ClientURL

func (m *Member) ClientURL() string

ClientURL is the client URL for this member

func (*Member) ListenClientURL

func (m *Member) ListenClientURL() string

func (*Member) ListenPeerURL

func (m *Member) ListenPeerURL() string

func (*Member) PeerURL

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

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