namespace

package
v0.0.0-...-dfdee5b Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL