context

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterContext

type ClusterContext interface {
	AddPodEventHandler(handler cache.ResourceEventHandlerFuncs)

	GetBatchPods() ([]*v1.Pod, error)
	GetAllPods() ([]*v1.Pod, error)
	GetActiveBatchPods() ([]*v1.Pod, error)
	GetNodes() ([]*v1.Node, error)
	GetPodEvents(pod *v1.Pod) ([]*v1.Event, error)

	SubmitPod(pod *v1.Pod, owner string) (*v1.Pod, error)
	AddAnnotation(pod *v1.Pod, annotations map[string]string) error
	DeletePods(pods []*v1.Pod)

	GetClusterId() string

	Stop()
}

type KubernetesClusterContext

type KubernetesClusterContext struct {
	// contains filtered or unexported fields
}

func NewClusterContext

func NewClusterContext(
	clusterId string,
	minTimeBetweenRepeatDeletionCalls time.Duration,
	kubernetesClientProvider cluster.KubernetesClientProvider) *KubernetesClusterContext

func (*KubernetesClusterContext) AddAnnotation

func (c *KubernetesClusterContext) AddAnnotation(pod *v1.Pod, annotations map[string]string) error

func (*KubernetesClusterContext) AddPodEventHandler

func (c *KubernetesClusterContext) AddPodEventHandler(handler cache.ResourceEventHandlerFuncs)

func (*KubernetesClusterContext) DeletePods

func (c *KubernetesClusterContext) DeletePods(pods []*v1.Pod)

func (*KubernetesClusterContext) GetActiveBatchPods

func (c *KubernetesClusterContext) GetActiveBatchPods() ([]*v1.Pod, error)

func (*KubernetesClusterContext) GetAllPods

func (c *KubernetesClusterContext) GetAllPods() ([]*v1.Pod, error)

func (*KubernetesClusterContext) GetBatchPods

func (c *KubernetesClusterContext) GetBatchPods() ([]*v1.Pod, error)

func (*KubernetesClusterContext) GetClusterId

func (c *KubernetesClusterContext) GetClusterId() string

func (*KubernetesClusterContext) GetNodes

func (c *KubernetesClusterContext) GetNodes() ([]*v1.Node, error)

func (*KubernetesClusterContext) GetPodEvents added in v0.1.2

func (c *KubernetesClusterContext) GetPodEvents(pod *v1.Pod) ([]*v1.Event, error)

func (*KubernetesClusterContext) ProcessPodsToDelete

func (c *KubernetesClusterContext) ProcessPodsToDelete()

func (*KubernetesClusterContext) Stop

func (c *KubernetesClusterContext) Stop()

func (*KubernetesClusterContext) SubmitPod

func (c *KubernetesClusterContext) SubmitPod(pod *v1.Pod, owner string) (*v1.Pod, error)

Jump to

Keyboard shortcuts

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