Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Namespace ¶
type Namespace interface {
//create namespace
Create(ctx context.Context, namespace string) error
//delete namespace
Delete(ctx context.Context, name string) error
//list namespaces
List(ctx context.Context, selector labels.Selector) ([]*coreV1.Namespace, error)
//get namespaces
Get(ctx context.Context, name string) (*coreV1.Namespace, error)
//watch event handler
WatchEvent(ctx context.Context, handler NamespaceHandlerFuncs)
}
namespace interface
func NewNamespace ¶
func NewNamespace(clientset *kubernetes.Clientset, factory informers.SharedInformerFactory) Namespace
new namespace
type NamespaceHandlerFuncs ¶
type NamespaceHandlerFuncs struct {
AddFunc func(obj *coreV1.Namespace)
UpdateFunc func(oldObj, newObj *coreV1.Namespace)
DeleteFunc func(obj *coreV1.Namespace)
}
NamespaceHandlerFuncs
func (NamespaceHandlerFuncs) OnAdd ¶
func (j NamespaceHandlerFuncs) OnAdd(obj interface{})
OnAdd calls AddFunc if it's not nil.
func (NamespaceHandlerFuncs) OnDelete ¶
func (j NamespaceHandlerFuncs) OnDelete(obj interface{})
OnDelete calls DeleteFunc if it's not nil.
func (NamespaceHandlerFuncs) OnUpdate ¶
func (j NamespaceHandlerFuncs) OnUpdate(oldObj, newObj interface{})
OnUpdate calls UpdateFunc if it's not nil.
Click to show internal directories.
Click to hide internal directories.