-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnamespace.go
More file actions
34 lines (31 loc) · 1.15 KB
/
namespace.go
File metadata and controls
34 lines (31 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package k8s
import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
)
// NamespaceLister is a (k8s.io/kubernetes/pkg/client/unversioned).NamespaceInterface compatible
// interface which only has the List function. It's used in places that only need List to make
// them easier to test and more easily swappable with other implementations
// (should the need arise).
//
// Example usage:
//
// var nsl NamespaceLister
// nsl = kubeClient.Namespaces()
type NamespaceLister interface {
List(labels.Selector, fields.Selector) (*api.NamespaceList, error)
}
// NamespaceWatcher is a (k8s.io/kubernetes/pkg/client/unversioned).NamespaceInterface compatible
// interface which only has the Watch function. It's used in places that only need perform watches,
// to make those codebases easier to test and more easily swappable with other implementations
// (should the need arise).
//
// Example usage:
//
// var nsl NamespaceWatcher
// nsl = kubeClient.Namespaces()
type NamespaceWatcher interface {
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
}