Documentation ¶
Index ¶
- Constants
- func CheckHealth(url string, tc *tls.Config) (bool, error)
- func CreateMemberName(clusterName string, member int) string
- func GetCounterFromMemberName(name string) (int, error)
- func ListMembers(clientURLs []string, tc *tls.Config) (*clientv3.MemberListResponse, error)
- func MemberNameFromPeerURL(pu string) (string, error)
- func NewTLSConfig(certData, keyData, caData []byte) (*tls.Config, error)
- func RemoveMember(clientURLs []string, tc *tls.Config, id uint64) error
- type Member
- type MemberSet
- func (ms MemberSet) Add(m *Member)
- func (ms MemberSet) ClientURLs() []string
- func (ms MemberSet) Diff(other MemberSet) MemberSet
- func (ms MemberSet) IsEqual(other MemberSet) bool
- func (ms MemberSet) PeerURLPairs() []string
- func (ms MemberSet) PickOne() *Member
- func (ms MemberSet) Remove(name string)
- func (ms MemberSet) Size() int
- func (ms MemberSet) String() string
Constants ¶
View Source
const ( CliCertFile = "etcd-client.crt" CliKeyFile = "etcd-client.key" CliCAFile = "etcd-client-ca.crt" )
Variables ¶
This section is empty.
Functions ¶
func CreateMemberName ¶ added in v0.2.0
func GetCounterFromMemberName ¶ added in v0.2.0
func ListMembers ¶ added in v0.2.0
func MemberNameFromPeerURL ¶ added in v0.2.0
func NewTLSConfig ¶ added in v0.2.6
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) ListenClientURL ¶ added in v0.2.6
func (*Member) ListenPeerURL ¶ added in v0.2.5
type MemberSet ¶
func NewMemberSet ¶
func (MemberSet) ClientURLs ¶
func (MemberSet) IsEqual ¶ added in v0.2.0
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 ¶
Click to show internal directories.
Click to hide internal directories.