pod

package
v0.0.0-...-88f2d9e Latest Latest
Warning

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

Go to latest
Published: Feb 14, 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 Pod

type Pod interface {

	//create pod
	Create(ctx context.Context, namespace string, pod *coreV1.Pod) error

	//delete pod
	Delete(ctx context.Context, namespace string, name string) error

	//list pods
	List(ctx context.Context, namespace string, selector labels.Selector) ([]*coreV1.Pod, error)

	//get pods
	Get(ctx context.Context, namespace string, name string) (*coreV1.Pod, error)

	//watch event handler
	WatchEvent(ctx context.Context, handler PodHandlerFuncs)
}

pod interface

func NewPod

func NewPod(clientset *kubernetes.Clientset, factory informers.SharedInformerFactory) Pod

new pod

type PodHandlerFuncs

type PodHandlerFuncs struct {
	AddFunc    func(obj *coreV1.Pod)
	UpdateFunc func(oldObj, newObj *coreV1.Pod)
	DeleteFunc func(obj *coreV1.Pod)
}

PodHandlerFuncs

func (PodHandlerFuncs) OnAdd

func (j PodHandlerFuncs) OnAdd(obj interface{})

OnAdd calls AddFunc if it's not nil.

func (PodHandlerFuncs) OnDelete

func (j PodHandlerFuncs) OnDelete(obj interface{})

OnDelete calls DeleteFunc if it's not nil.

func (PodHandlerFuncs) OnUpdate

func (j PodHandlerFuncs) 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