Documentation ¶
Index ¶
- type Builder
- type CPUSet
- func (s CPUSet) Clone() CPUSet
- func (s CPUSet) Contains(cpu int) bool
- func (s CPUSet) Difference(s2 CPUSet) CPUSet
- func (s CPUSet) Equals(s2 CPUSet) bool
- func (s CPUSet) Filter(predicate func(int) bool) CPUSet
- func (s CPUSet) FilterNot(predicate func(int) bool) CPUSet
- func (s CPUSet) Intersection(s2 CPUSet) CPUSet
- func (s CPUSet) IsEmpty() bool
- func (s CPUSet) IsSubsetOf(s2 CPUSet) bool
- func (s CPUSet) Size() int
- func (s CPUSet) String() string
- func (s CPUSet) ToSlice() []int
- func (s CPUSet) ToSliceNoSort() []int
- func (s CPUSet) Union(s2 CPUSet) CPUSet
- func (s CPUSet) UnionAll(s2 []CPUSet) CPUSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a mutable builder for CPUSet. Functions that mutate instances of this type are not thread-safe.
type CPUSet ¶
type CPUSet struct {
// contains filtered or unexported fields
}
CPUSet is a thread-safe, immutable set-like data structure for CPU IDs.
func MustParse ¶
MustParse CPUSet constructs a new CPU set from a Linux CPU list formatted string. Unlike Parse, it does not return an error but rather panics if the input cannot be used to construct a CPU set.
func Parse ¶
Parse CPUSet constructs a new CPU set from a Linux CPU list formatted string.
See: http://man7.org/linux/man-pages/man7/cpuset.7.html#FORMATS
func (CPUSet) Difference ¶
Difference returns a new CPU set that contains all of the elements that are present in this set and not the supplied set, without mutating either source set.
func (CPUSet) Equals ¶
Equals returns true if the supplied set contains exactly the same elements as this set (s IsSubsetOf s2 and s2 IsSubsetOf s).
func (CPUSet) Filter ¶
Filter returns a new CPU set that contains all of the elements from this set that match the supplied predicate, without mutating the source set.
func (CPUSet) FilterNot ¶
FilterNot returns a new CPU set that contains all of the elements from this set that do not match the supplied predicate, without mutating the source set.
func (CPUSet) Intersection ¶
Intersection returns a new CPU set that contains all of the elements that are present in both this set and the supplied set, without mutating either source set.
func (CPUSet) IsSubsetOf ¶
IsSubsetOf returns true if the supplied set contains all the elements
func (CPUSet) String ¶
String returns a new string representation of the elements in this CPU set in canonical linux CPU list format.
See: http://man7.org/linux/man-pages/man7/cpuset.7.html#FORMATS
func (CPUSet) ToSlice ¶
ToSlice returns a slice of integers that contains all elements from this set.
func (CPUSet) ToSliceNoSort ¶
ToSliceNoSort returns a slice of integers that contains all elements from this set.