engine

package
v0.0.0-...-8270d06 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Separator         = "---"
	ApiVersion        = "v1"
	DeploymentVersion = "apps/v1beta1"

	KindDeployment            = "Deployment"
	KindNamespace             = "Namespace"
	KindService               = "Service"
	KindPersistentVolume      = "PersistentVolume"
	KindPersistentVolumeClaim = "PersistentVolumeClaim"
	KindStatefulSet           = "StatefulSet"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {
	KubeClient *kubernetes.Clientset
}

func NewClients

func NewClients() *Clients

func (*Clients) CreateDeployment

func (c *Clients) CreateDeployment(dep *appsv1.Deployment) *appsv1.Deployment

func (*Clients) CreateNameSpace

func (c *Clients) CreateNameSpace(ns *corev1.Namespace) *corev1.Namespace

func (*Clients) CreatePersistentVolume

func (c *Clients) CreatePersistentVolume(pv *corev1.PersistentVolume) *corev1.PersistentVolume

func (*Clients) CreatePersistentVolumeClaim

func (c *Clients) CreatePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim) *corev1.PersistentVolumeClaim

func (*Clients) CreatePod

func (c *Clients) CreatePod(pod *corev1.Pod) *corev1.Pod

func (*Clients) CreateService

func (c *Clients) CreateService(service *corev1.Service) *corev1.Service

func (*Clients) CreateStatefulSet

func (c *Clients) CreateStatefulSet(sfs *appsv1.StatefulSet) *appsv1.StatefulSet

func (*Clients) DeleteDeployment

func (c *Clients) DeleteDeployment(dep *appsv1.Deployment, ops *metav1.DeleteOptions) error

func (*Clients) DeleteNameSpace

func (c *Clients) DeleteNameSpace(ns *corev1.Namespace, ops *metav1.DeleteOptions) error

func (*Clients) DeletePersistentVolume

func (c *Clients) DeletePersistentVolume(pv *corev1.PersistentVolume, ops *metav1.DeleteOptions) error

func (*Clients) DeletePersistentVolumeClaim

func (c *Clients) DeletePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim, ops *metav1.DeleteOptions) error

func (*Clients) DeletePod

func (c *Clients) DeletePod(pod *corev1.Pod, ops *metav1.DeleteOptions)

func (*Clients) DeleteService

func (c *Clients) DeleteService(service *corev1.Service, ops *metav1.DeleteOptions) error

func (*Clients) DeleteStatefulSet

func (c *Clients) DeleteStatefulSet(sfs *appsv1.StatefulSet, ops *metav1.DeleteOptions) error

func (*Clients) GetDeployment

func (c *Clients) GetDeployment(dep *appsv1.Deployment, ops metav1.GetOptions) *appsv1.Deployment

func (*Clients) GetDeploymentList

func (c *Clients) GetDeploymentList(dep *appsv1.Deployment, ops metav1.ListOptions) *appsv1.DeploymentList

func (*Clients) GetNamespaceList

func (c *Clients) GetNamespaceList(ops metav1.ListOptions) *corev1.NamespaceList

func (*Clients) GetNodeList

func (c *Clients) GetNodeList(ops metav1.ListOptions) *corev1.NodeList

func (*Clients) GetPodList

func (c *Clients) GetPodList(ns string, ops metav1.ListOptions) *corev1.PodList

func (*Clients) GetServiceList

func (c *Clients) GetServiceList(ns string, ops metav1.ListOptions) *corev1.ServiceList

func (*Clients) PrintPodLogs

func (c *Clients) PrintPodLogs(pod corev1.Pod)

func (*Clients) UpdateDeployment

func (c *Clients) UpdateDeployment(dep *appsv1.Deployment) *appsv1.Deployment

type IitemQueue

type IitemQueue interface {
	Init() ItemQueue
	Enqueue(t Item)
	Dequeue() *Item
	IsEmpty() bool
	Size() int
}

type Item

type Item interface {
}

type ItemQueue

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

Item the type of the queue

func NewItemQueue

func NewItemQueue() *ItemQueue

func (*ItemQueue) Dequeue

func (s *ItemQueue) Dequeue() Item

dequeue

func (*ItemQueue) Enqueue

func (s *ItemQueue) Enqueue(t Item)

Enqueue adds an Item to the end of the queue

func (*ItemQueue) Init

func (s *ItemQueue) Init() *ItemQueue

New creates a new ItemQueue

func (*ItemQueue) IsEmpty

func (s *ItemQueue) IsEmpty() bool

func (*ItemQueue) Size

func (s *ItemQueue) Size() int

Size returns the number of Items in the queue

type K8sEngine

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

func NewK8sEngine

func NewK8sEngine(jobs *ItemQueue, client *Clients) *K8sEngine

func (*K8sEngine) DoCreateTasks

func (k *K8sEngine) DoCreateTasks()

func (*K8sEngine) DoDeleteTasks

func (k *K8sEngine) DoDeleteTasks()

type ParseProject

type ParseProject struct {
	Data [][]byte `json:"data"`
}

func (ParseProject) Bytes2K8sEntities

func (p ParseProject) Bytes2K8sEntities(jsonArray [][]byte) *ItemQueue

func (ParseProject) Yamls2Jsons

func (p ParseProject) Yamls2Jsons() [][]byte

Jump to

Keyboard shortcuts

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