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.
Click to show internal directories.
Click to hide internal directories.