Documentation ¶
Index ¶
- type Set
- func (s *Set) Add(x uint64)
- func (s *Set) AppendTo(dst []uint64) []uint64
- func (s *Set) Clone() *Set
- func (s *Set) Del(x uint64)
- func (s *Set) Equal(a *Set) bool
- func (s *Set) Has(x uint64) bool
- func (s *Set) Intersect(a *Set)
- func (s *Set) Len() int
- func (s *Set) Subtract(a *Set)
- func (s *Set) Union(a *Set)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set is a fast set for uint64.
It should work faster than map[uint64]struct{} for semi-sparse uint64 values such as MetricIDs generated by lib/storage.
It is unsafe calling Set methods from concurrent goroutines.
func (*Set) AppendTo ¶
AppendTo appends all the items from the set to dst and returns the result.
The returned items are sorted.
AppendTo can mutate s.
Click to show internal directories.
Click to hide internal directories.