Version: v0.11.8 Latest Latest

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 10 Imported by: 0



Package selection provides the infrastructure for labelling and selecting objects.



This section is empty.


This section is empty.


func EnsureLabelKeyValid

func EnsureLabelKeyValid(key string) error

EnsureLabelKeyValid verifies that a key conforms to label key requirements. These requirements are currently the same as those for Kubernetes label keys.

func EnsureLabelValueValid

func EnsureLabelValueValid(value string) error

EnsureLabelValueValid verifies that a value conforms to label value requirements. These requirements are currently the same as those for Kubernetes label values.

func EnsureNameValid

func EnsureNameValid(name string) error

EnsureNameValid ensures that a name is valid for use as a session or tunnel name. Empty names are treated as valid.

func ExtractAndSortLabelKeys

func ExtractAndSortLabelKeys(labels map[string]string) []string

ExtractAndSortLabelKeys extracts a list of keys from the label set and sorts them.


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) Descriptor() ([]byte, []int)

func (*Selection) EnsureValid

func (s *Selection) EnsureValid() error

EnsureValid verifies that a Selection is valid.

func (*Selection) GetAll

func (m *Selection) GetAll() bool

func (*Selection) GetLabelSelector

func (m *Selection) GetLabelSelector() string

func (*Selection) GetSpecifications

func (m *Selection) GetSpecifications() []string

func (*Selection) ProtoMessage

func (*Selection) ProtoMessage()

func (*Selection) Reset

func (m *Selection) Reset()

func (*Selection) String

func (m *Selection) String() string

func (*Selection) XXX_DiscardUnknown

func (m *Selection) XXX_DiscardUnknown()

func (*Selection) XXX_Marshal

func (m *Selection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Selection) XXX_Merge

func (m *Selection) XXX_Merge(src proto.Message)

func (*Selection) XXX_Size

func (m *Selection) XXX_Size() int

func (*Selection) XXX_Unmarshal

func (m *Selection) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL