workloads

package
v0.0.0-...-4786a4a Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PrometheusAddress = "http://prometheus.kube-system.svc.cluster.local/api/v1/query_range"

Variables

This section is empty.

Functions

This section is empty.

Types

type CRD

type CRD struct {
	service.Interface
}

func NewCRD

func NewCRD(svcInterface service.Interface) *CRD

func (*CRD) Apply

func (g *CRD) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*CRD) Delete

func (g *CRD) Delete(namespace, name string) error

func (*CRD) Get

func (g *CRD) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*CRD) List

func (g *CRD) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

func (*CRD) ListGVR

func (g *CRD) ListGVR(namespace string, gvr schema.GroupVersionResource, selector string) (*service.UnstructuredListExtend, error)

type ConfigMap

type ConfigMap struct {
	service.Interface
}

func NewConfigMap

func NewConfigMap(svcInterface service.Interface) *ConfigMap

func (*ConfigMap) Apply

func (g *ConfigMap) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*ConfigMap) Delete

func (g *ConfigMap) Delete(namespace, name string) error

func (*ConfigMap) Get

func (g *ConfigMap) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*ConfigMap) List

func (g *ConfigMap) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type CronJob

type CronJob struct {
	service.Interface
}

func NewCronJob

func NewCronJob(svcInterface service.Interface) *CronJob

func (*CronJob) Apply

func (g *CronJob) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*CronJob) Delete

func (g *CronJob) Delete(namespace, name string) error

func (*CronJob) Get

func (g *CronJob) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*CronJob) List

func (g *CronJob) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type DaemonSet

type DaemonSet struct {
	service.Interface
}

func NewDaemonSet

func NewDaemonSet(svcInterface service.Interface) *DaemonSet

func (*DaemonSet) Apply

func (g *DaemonSet) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*DaemonSet) Delete

func (g *DaemonSet) Delete(namespace, name string) error

func (*DaemonSet) Get

func (g *DaemonSet) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*DaemonSet) List

func (g *DaemonSet) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type Deployment

type Deployment struct {
	service.Interface
}

func NewDeployment

func NewDeployment(svcInterface service.Interface) *Deployment

func (*Deployment) Apply

func (g *Deployment) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Deployment) Delete

func (g *Deployment) Delete(namespace, name string) error

func (*Deployment) Get

func (g *Deployment) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Deployment) GetScale

func (g *Deployment) GetScale(namespace, name string) (*service.UnstructuredExtend, error)

func (*Deployment) List

func (g *Deployment) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

func (*Deployment) Scale

func (g *Deployment) Scale(namespace, name string, data []byte) (*service.UnstructuredExtend, error)

type Event

type Event struct {
	service.Interface
}

func NewEvent

func NewEvent(svcInterface service.Interface) *Event

func (*Event) Apply

func (g *Event) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Event) Delete

func (g *Event) Delete(namespace, name string) error

func (*Event) Get

func (g *Event) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Event) List

func (g *Event) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

func (*Event) ListLimit

func (g *Event) ListLimit(namespace string, flag string, pos int64, size int64, selector string) (*service.UnstructuredListExtend, error)

type HPA

type HPA struct {
	service.Interface
}

func NewHPA

func NewHPA(svcInterface service.Interface) *HPA

func (*HPA) Apply

func (g *HPA) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*HPA) Delete

func (g *HPA) Delete(namespace, name string) error

func (*HPA) Get

func (g *HPA) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*HPA) List

func (g *HPA) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type Job

type Job struct {
	service.Interface
}

func NewJob

func NewJob(svcInterface service.Interface) *Job

func (*Job) Apply

func (g *Job) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Job) Delete

func (g *Job) Delete(namespace, name string) error

func (*Job) Get

func (g *Job) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Job) List

func (g *Job) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type Metrics

type Metrics struct {
	service.Interface

	InCluster bool
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(svcInterface service.Interface) *Metrics

func (Metrics) Apply

func (m Metrics) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (Metrics) Get

func (m Metrics) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (Metrics) List

func (m Metrics) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

func (*Metrics) NodeMetricsList

func (m *Metrics) NodeMetricsList() (map[string]interface{}, error)

func (*Metrics) PodMetrics

func (m *Metrics) PodMetrics(namespace, name string) (map[string]interface{}, error)

func (*Metrics) PodMetricsList

func (m *Metrics) PodMetricsList(namespace string) (map[string]interface{}, error)

func (*Metrics) ProxyToPrometheus

func (m *Metrics) ProxyToPrometheus(params map[string]string, body []byte) (map[string]interface{}, error)

type Namespace

type Namespace struct {
	service.Interface
}

func NewNamespace

func NewNamespace(svcInterface service.Interface) *Namespace

func (*Namespace) Apply

func (g *Namespace) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Namespace) Delete

func (g *Namespace) Delete(namespace, name string) error

func (*Namespace) Get

func (g *Namespace) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Namespace) List

func (g *Namespace) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type Node

type Node struct {
	service.Interface
}

func NewNode

func NewNode(svcInterface service.Interface) *Node

func (*Node) Apply

func (g *Node) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Node) Delete

func (g *Node) Delete(namespace, name string) error

func (*Node) Get

func (g *Node) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Node) List

func (g *Node) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type PV

type PV struct {
	service.Interface
}

func NewPV

func NewPV(svcInterface service.Interface) *PV

func (*PV) Apply

func (g *PV) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*PV) Delete

func (g *PV) Delete(namespace, name string) error

func (*PV) Get

func (g *PV) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*PV) List

func (g *PV) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type PVC

type PVC struct {
	service.Interface
}

func NewPVC

func NewPVC(svcInterface service.Interface) *PVC

func (*PVC) Apply

func (g *PVC) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*PVC) Delete

func (g *PVC) Delete(namespace, name string) error

func (*PVC) Get

func (g *PVC) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*PVC) List

func (g *PVC) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type Pod

type Pod struct {
	service.Interface
}

func NewPod

func NewPod(svcInterface service.Interface) *Pod

func (*Pod) Apply

func (g *Pod) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Pod) Delete

func (g *Pod) Delete(namespace, name string) error

func (*Pod) Get

func (g *Pod) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Pod) List

func (g *Pod) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

func (*Pod) Logs

func (g *Pod) Logs(
	namespace, name, container string,
	follow, previous, timestamps bool,
	sinceSeconds int64,
	sinceTime *time.Time,
	limitBytes int64,
	tailLines int64,
	out io.Writer,
) error

type ReplicaSet

type ReplicaSet struct {
	service.Interface
}

func NewReplicaSet

func NewReplicaSet(svcInterface service.Interface) *ReplicaSet

func (*ReplicaSet) Apply

func (g *ReplicaSet) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*ReplicaSet) Delete

func (g *ReplicaSet) Delete(namespace, name string) error

func (*ReplicaSet) Get

func (g *ReplicaSet) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*ReplicaSet) List

func (g *ReplicaSet) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type ResourceQuota

type ResourceQuota struct {
	service.Interface
}

func NewResourceQuota

func NewResourceQuota(svcInterface service.Interface) *ResourceQuota

func (*ResourceQuota) Apply

func (g *ResourceQuota) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*ResourceQuota) Delete

func (g *ResourceQuota) Delete(namespace, name string) error

func (*ResourceQuota) Get

func (g *ResourceQuota) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*ResourceQuota) List

func (g *ResourceQuota) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type Secret

type Secret struct {
	service.Interface
}

func NewSecret

func NewSecret(svcInterface service.Interface) *Secret

func (*Secret) Apply

func (g *Secret) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Secret) Delete

func (g *Secret) Delete(namespace, name string) error

func (*Secret) Get

func (g *Secret) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Secret) List

func (g *Secret) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type StatefulSet

type StatefulSet struct {
	service.Interface
}

func NewStatefulSet

func NewStatefulSet(svcInterface service.Interface) *StatefulSet

func (*StatefulSet) Apply

func (g *StatefulSet) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*StatefulSet) Delete

func (g *StatefulSet) Delete(namespace, name string) error

func (*StatefulSet) Get

func (g *StatefulSet) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*StatefulSet) List

func (g *StatefulSet) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type StorageClass

type StorageClass struct {
	service.Interface
}

func NewStorageClass

func NewStorageClass(svcInterface service.Interface) *StorageClass

func (*StorageClass) Apply

func (g *StorageClass) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*StorageClass) Delete

func (g *StorageClass) Delete(namespace, name string) error

func (*StorageClass) Get

func (g *StorageClass) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*StorageClass) List

func (g *StorageClass) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

type Template

type Template struct {
	service.Interface
}

func NewTemplate

func NewTemplate(svcInterface service.Interface) *Template

func (*Template) Apply

func (g *Template) Apply(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Template) CheckServiceExist

func (g *Template) CheckServiceExist(namespace, name string) bool

func (*Template) CreateDeployment

func (g *Template) CreateDeployment(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Template) CreateService

func (g *Template) CreateService(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Template) CreateStone

func (g *Template) CreateStone(namespace, name string, unstructuredExtend *service.UnstructuredExtend) (*service.UnstructuredExtend, bool, error)

func (*Template) Delete

func (g *Template) Delete(namespace, name string) error

func (*Template) Get

func (g *Template) Get(namespace, name string) (*service.UnstructuredExtend, error)

func (*Template) LabelKV

func (g *Template) LabelKV(namespace, name, k, v string) (*service.UnstructuredExtend, error)

func (*Template) List

func (g *Template) List(namespace string, selector string) (*service.UnstructuredListExtend, error)

Jump to

Keyboard shortcuts

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