zookeeperutil

package
v0.0.0-...-2a28ce9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterConfig

func GetClusterConfig(hosts []string) ([]string, error)

func ReconfigureCluster

func ReconfigureCluster(hosts []string, desiredConfig []string) ([]string, error)

Types

type Member

type Member struct {
	// Name is of the format "clusterName-ID"
	Name string
	// Kubernetes namespace this member runs in.
	Namespace string
}

func (*Member) Addr

func (m *Member) Addr() string

func (*Member) ID

func (m *Member) ID() int

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

func (ms MemberSet) ClientHostList() []string

func (MemberSet) ClusterConfig

func (ms MemberSet) ClusterConfig() []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) MaxMemberID

func (ms MemberSet) MaxMemberID() int

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