*: initial update to kube 1.8
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
2453222695
commit
d6e819133d
1237 changed files with 84117 additions and 564982 deletions
32
vendor/k8s.io/apimachinery/pkg/fields/selector.go
generated
vendored
32
vendor/k8s.io/apimachinery/pkg/fields/selector.go
generated
vendored
|
@ -50,6 +50,9 @@ type Selector interface {
|
|||
|
||||
// String returns a human readable string that represents this selector.
|
||||
String() string
|
||||
|
||||
// Make a deep copy of the selector.
|
||||
DeepCopySelector() Selector
|
||||
}
|
||||
|
||||
// Everything returns a selector that matches all fields.
|
||||
|
@ -99,6 +102,15 @@ func (t *hasTerm) String() string {
|
|||
return fmt.Sprintf("%v=%v", t.field, EscapeValue(t.value))
|
||||
}
|
||||
|
||||
func (t *hasTerm) DeepCopySelector() Selector {
|
||||
if t == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(hasTerm)
|
||||
*out = *t
|
||||
return out
|
||||
}
|
||||
|
||||
type notHasTerm struct {
|
||||
field, value string
|
||||
}
|
||||
|
@ -138,6 +150,15 @@ func (t *notHasTerm) String() string {
|
|||
return fmt.Sprintf("%v!=%v", t.field, EscapeValue(t.value))
|
||||
}
|
||||
|
||||
func (t *notHasTerm) DeepCopySelector() Selector {
|
||||
if t == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(notHasTerm)
|
||||
*out = *t
|
||||
return out
|
||||
}
|
||||
|
||||
type andTerm []Selector
|
||||
|
||||
func (t andTerm) Matches(ls Fields) bool {
|
||||
|
@ -207,6 +228,17 @@ func (t andTerm) String() string {
|
|||
return strings.Join(terms, ",")
|
||||
}
|
||||
|
||||
func (t andTerm) DeepCopySelector() Selector {
|
||||
if t == nil {
|
||||
return nil
|
||||
}
|
||||
out := make([]Selector, len(t))
|
||||
for i := range t {
|
||||
out[i] = t[i].DeepCopySelector()
|
||||
}
|
||||
return andTerm(out)
|
||||
}
|
||||
|
||||
// SelectorFromSet returns a Selector which will match exactly the given Set. A
|
||||
// nil Set is considered equivalent to Everything().
|
||||
func SelectorFromSet(ls Set) Selector {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue