Documentation
¶
Overview ¶
Package selection provides the infrastructure for labelling and selecting objects.
Index ¶
- func EnsureLabelKeyValid(key string) error
- func EnsureLabelValueValid(value string) error
- func EnsureNameValid(name string) error
- func ExtractAndSortLabelKeys(labels map[string]string) []string
- type LabelSelector
- type Selection
- func (*Selection) Descriptor() ([]byte, []int)
- func (s *Selection) EnsureValid() error
- func (m *Selection) GetAll() bool
- func (m *Selection) GetLabelSelector() string
- func (m *Selection) GetSpecifications() []string
- func (*Selection) ProtoMessage()
- func (m *Selection) Reset()
- func (m *Selection) String() string
- func (m *Selection) XXX_DiscardUnknown()
- func (m *Selection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Selection) XXX_Merge(src proto.Message)
- func (m *Selection) XXX_Size() int
- func (m *Selection) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureLabelKeyValid ¶
EnsureLabelKeyValid verifies that a key conforms to label key requirements. These requirements are currently the same as those for Kubernetes label keys.
func EnsureLabelValueValid ¶
EnsureLabelValueValid verifies that a value conforms to label value requirements. These requirements are currently the same as those for Kubernetes label values.
func EnsureNameValid ¶
EnsureNameValid ensures that a name is valid for use as a session name. Empty names are treated as valid.
func ExtractAndSortLabelKeys ¶
ExtractAndSortLabelKeys extracts a list of keys from the label set and sorts them.
Types ¶
type LabelSelector ¶
type LabelSelector interface { // Matches checks whether or not a set of labels is matched by the selector. Matches(labels map[string]string) bool }
LabelSelector is a type that performs matching against a set of labels.
func ParseLabelSelector ¶
func ParseLabelSelector(selector string) (LabelSelector, error)
ParseLabelSelector performs label selector parsing. The syntax is currently the same as that for Kubernetes.
type Selection ¶
type Selection struct { // All, if true, indicates that all sessions should be selected. All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` // Specifications is a list of session specifications. Each element may be // either a session identifier or name (or a prefix thereof). If non-empty, // it indicates that these specifications should be used to select sessions. Specifications []string `protobuf:"bytes,2,rep,name=specifications,proto3" json:"specifications,omitempty"` // LabelSelector is a label selector specification. If present (non-empty), // it indicates that this selector should be used to select sessions. LabelSelector string `protobuf:"bytes,3,opt,name=labelSelector,proto3" json:"labelSelector,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Selection encodes a selection mechanism that can be used to select a collection of sessions. It should have exactly one member set.
func (*Selection) Descriptor ¶
func (*Selection) EnsureValid ¶
EnsureValid verifies that a Selection is valid.
func (*Selection) GetLabelSelector ¶
func (*Selection) GetSpecifications ¶
func (*Selection) ProtoMessage ¶
func (*Selection) ProtoMessage()
func (*Selection) XXX_DiscardUnknown ¶
func (m *Selection) XXX_DiscardUnknown()