Documentation ¶
Index ¶
- func MemberForName(members []*etcd.Member, name string) *etcd.Member
- type UInt64Set
- func (s UInt64Set) Delete(items ...uint64) UInt64Set
- func (s UInt64Set) Difference(s2 UInt64Set) UInt64Set
- func (s UInt64Set) Equal(s2 UInt64Set) bool
- func (s UInt64Set) Has(item uint64) bool
- func (s UInt64Set) HasAll(items ...uint64) bool
- func (s UInt64Set) HasAny(items ...uint64) bool
- func (s UInt64Set) Insert(items ...uint64) UInt64Set
- func (s UInt64Set) Intersection(s2 UInt64Set) UInt64Set
- func (s UInt64Set) IsSuperset(s2 UInt64Set) bool
- func (s UInt64Set) Len() int
- func (s UInt64Set) List() []uint64
- func (s UInt64Set) PopAny() (uint64, bool)
- func (s UInt64Set) Union(s2 UInt64Set) UInt64Set
- func (s UInt64Set) UnsortedList() []uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UInt64Set ¶
type UInt64Set map[uint64]empty
util.UInt64Set is a set of uint64s, implemented via map[uint64]struct{} for minimal memory consumption.
func MemberIDSet ¶
MemberIDSet returns a set of member IDs.
func NewUInt64Set ¶
NewUInt64Set creates a UInt64Set from a list of values.
func (UInt64Set) Difference ¶
Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}
func (UInt64Set) Equal ¶
Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)
func (UInt64Set) Intersection ¶
Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}
func (UInt64Set) IsSuperset ¶
IsSuperset returns true if and only if s1 is a superset of s2.
func (UInt64Set) Union ¶
Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}
func (UInt64Set) UnsortedList ¶
UnsortedList returns the slice with contents in random order.