v4

package
v0.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v4 contains API Schema definitions for the celery v4 API group +kubebuilder:object:generate=true +groupName=celery.celeryproject.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "celery.celeryproject.org", Version: "v4"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type BrokerType

type BrokerType string

BrokerType defines the type of broker

const (
	// RedisBroker is to use a dynamic redis instead within cluster
	RedisBroker BrokerType = "redis"
	// ExternalBroker is to use an external broker with given string
	ExternalBroker BrokerType = "external"
)

type Celery

type Celery struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CelerySpec   `json:"spec,omitempty"`
	Status CeleryStatus `json:"status,omitempty"`
}

Celery is the Schema for the celeries API

func (*Celery) DeepCopy

func (in *Celery) DeepCopy() *Celery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Celery.

func (*Celery) DeepCopyInto

func (in *Celery) DeepCopyInto(out *Celery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Celery) DeepCopyObject

func (in *Celery) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Celery) GenerateBroker

func (cr *Celery) GenerateBroker() *CeleryBroker

Generate Broker defines the way to create one broker based on config

func (*Celery) GenerateSchedulers

func (cr *Celery) GenerateSchedulers() []*CeleryScheduler

GenerateSchedulers defines the way to create schedulers based on config

func (*Celery) GenerateWorkers

func (cr *Celery) GenerateWorkers() []*CeleryWorker

GenerateWorkers defines the way to create workers based on config

type CeleryBroker

type CeleryBroker struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CeleryBrokerSpec   `json:"spec,omitempty"`
	Status CeleryBrokerStatus `json:"status,omitempty"`
}

CeleryBroker is the Schema for the celerybrokers API

func (*CeleryBroker) DeepCopy

func (in *CeleryBroker) DeepCopy() *CeleryBroker

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryBroker.

func (*CeleryBroker) DeepCopyInto

func (in *CeleryBroker) DeepCopyInto(out *CeleryBroker)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CeleryBroker) DeepCopyObject

func (in *CeleryBroker) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*CeleryBroker) Generate

func (cbr *CeleryBroker) Generate() (*corev1.Pod, *corev1.Service, string)

Generate will create the pod spec of the broker.

type CeleryBrokerList

type CeleryBrokerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CeleryBroker `json:"items"`
}

CeleryBrokerList contains a list of CeleryBroker

func (*CeleryBrokerList) DeepCopy

func (in *CeleryBrokerList) DeepCopy() *CeleryBrokerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryBrokerList.

func (*CeleryBrokerList) DeepCopyInto

func (in *CeleryBrokerList) DeepCopyInto(out *CeleryBrokerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CeleryBrokerList) DeepCopyObject

func (in *CeleryBrokerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CeleryBrokerSpec

type CeleryBrokerSpec struct {

	// Foo is an example field of CeleryBroker. Edit CeleryBroker_types.go to remove/update
	Type BrokerType `json:"type,omitempty"`
	// BrokerAddress defines the broker address for external broker type
	// If it is not `external` type, this item will be ignored
	BrokerAddress string `json:"brokerAddress,omitempty"`
}

CeleryBrokerSpec defines the desired state of CeleryBroker

func (*CeleryBrokerSpec) DeepCopy

func (in *CeleryBrokerSpec) DeepCopy() *CeleryBrokerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryBrokerSpec.

func (*CeleryBrokerSpec) DeepCopyInto

func (in *CeleryBrokerSpec) DeepCopyInto(out *CeleryBrokerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CeleryBrokerStatus

type CeleryBrokerStatus struct {
	BrokerAddress string `json:"brokerAddress,omitempty"`
}

CeleryBrokerStatus defines the observed state of CeleryBroker

func (*CeleryBrokerStatus) DeepCopy

func (in *CeleryBrokerStatus) DeepCopy() *CeleryBrokerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryBrokerStatus.

func (*CeleryBrokerStatus) DeepCopyInto

func (in *CeleryBrokerStatus) DeepCopyInto(out *CeleryBrokerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CeleryList

type CeleryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Celery `json:"items"`
}

CeleryList contains a list of Celery

func (*CeleryList) DeepCopy

func (in *CeleryList) DeepCopy() *CeleryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryList.

func (*CeleryList) DeepCopyInto

func (in *CeleryList) DeepCopyInto(out *CeleryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CeleryList) DeepCopyObject

func (in *CeleryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CeleryScheduler

type CeleryScheduler struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CelerySchedulerSpec   `json:"spec,omitempty"`
	Status CelerySchedulerStatus `json:"status,omitempty"`
}

CeleryScheduler is the Schema for the celeryschedulers API

func (*CeleryScheduler) DeepCopy

func (in *CeleryScheduler) DeepCopy() *CeleryScheduler

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryScheduler.

func (*CeleryScheduler) DeepCopyInto

func (in *CeleryScheduler) DeepCopyInto(out *CeleryScheduler)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CeleryScheduler) DeepCopyObject

func (in *CeleryScheduler) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*CeleryScheduler) Generate

func (csr *CeleryScheduler) Generate(count ...int) []*corev1.Pod

Generate will create the pod spec of the broker.

type CelerySchedulerList

type CelerySchedulerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CeleryScheduler `json:"items"`
}

CelerySchedulerList contains a list of CeleryScheduler

func (*CelerySchedulerList) DeepCopy

func (in *CelerySchedulerList) DeepCopy() *CelerySchedulerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CelerySchedulerList.

func (*CelerySchedulerList) DeepCopyInto

func (in *CelerySchedulerList) DeepCopyInto(out *CelerySchedulerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CelerySchedulerList) DeepCopyObject

func (in *CelerySchedulerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CelerySchedulerSpec

type CelerySchedulerSpec struct {
	Image string `json:"image,omitempty"`
	// SchedulerClass defines the target scheduler class to use
	SchedulerClass string `json:"schedulerClass,omitempty"`
	// AppName defines the target app instance to use
	AppName string `json:"appName,omitempty"`
	// DesiredNumber defines the number of worker if autoscaling is disabled
	Replicas int `json:"replicas,omitempty"`
	// Resources defines the resources specification for these workers
	Resources     corev1.ResourceRequirements `json:"resources,omitempty"`
	BrokerAddress string                      `json:"brokerAddress,omitempty"`
}

CelerySchedulerSpec defines the desired state of CeleryScheduler

func (*CelerySchedulerSpec) DeepCopy

func (in *CelerySchedulerSpec) DeepCopy() *CelerySchedulerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CelerySchedulerSpec.

func (*CelerySchedulerSpec) DeepCopyInto

func (in *CelerySchedulerSpec) DeepCopyInto(out *CelerySchedulerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CelerySchedulerStatus

type CelerySchedulerStatus struct {
}

CelerySchedulerStatus defines the observed state of CeleryScheduler

func (*CelerySchedulerStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CelerySchedulerStatus.

func (*CelerySchedulerStatus) DeepCopyInto

func (in *CelerySchedulerStatus) DeepCopyInto(out *CelerySchedulerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CelerySpec

type CelerySpec struct {
	Broker     CeleryBrokerSpec      `json:"broker,omitempty"`
	Workers    []CeleryWorkerSpec    `json:"workers,omitempty"`
	Schedulers []CelerySchedulerSpec `json:"schedulers,omitempty"`
	Image      string                `json:"image,omitempty"`
}

CelerySpec defines the desired state of Celery

func (*CelerySpec) DeepCopy

func (in *CelerySpec) DeepCopy() *CelerySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CelerySpec.

func (*CelerySpec) DeepCopyInto

func (in *CelerySpec) DeepCopyInto(out *CelerySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CeleryStatus

type CeleryStatus struct {
	BrokerAddress string `json:"brokerAddress,omitempty"`
}

CeleryStatus defines the observed state of Celery

func (*CeleryStatus) DeepCopy

func (in *CeleryStatus) DeepCopy() *CeleryStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryStatus.

func (*CeleryStatus) DeepCopyInto

func (in *CeleryStatus) DeepCopyInto(out *CeleryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CeleryWorker

type CeleryWorker struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CeleryWorkerSpec   `json:"spec,omitempty"`
	Status CeleryWorkerStatus `json:"status,omitempty"`
}

CeleryWorker is the Schema for the celeryworkers API

func (*CeleryWorker) DeepCopy

func (in *CeleryWorker) DeepCopy() *CeleryWorker

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryWorker.

func (*CeleryWorker) DeepCopyInto

func (in *CeleryWorker) DeepCopyInto(out *CeleryWorker)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CeleryWorker) DeepCopyObject

func (in *CeleryWorker) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*CeleryWorker) Generate

func (cwr *CeleryWorker) Generate(count ...int) []*corev1.Pod

Generate will create the pod spec of the worker.

type CeleryWorkerList

type CeleryWorkerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CeleryWorker `json:"items"`
}

CeleryWorkerList contains a list of CeleryWorker

func (*CeleryWorkerList) DeepCopy

func (in *CeleryWorkerList) DeepCopy() *CeleryWorkerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryWorkerList.

func (*CeleryWorkerList) DeepCopyInto

func (in *CeleryWorkerList) DeepCopyInto(out *CeleryWorkerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CeleryWorkerList) DeepCopyObject

func (in *CeleryWorkerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CeleryWorkerSpec

type CeleryWorkerSpec struct {
	// DesiredNumber defines the number of worker if autoscaling is disabled
	Replicas int `json:"replicas,omitempty"`
	// Target Queues defines the target queues these workers will handle
	TargetQueues []string `json:"targetQueues,omitempty"`
	// Resources defines the resources specification for these workers
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// AppName defines the target app instance to use
	AppName       string `json:"appName,omitempty"`
	BrokerAddress string `json:"brokerAddress,omitempty"`
	Image         string `json:"image,omitempty"`
}

CeleryWorkerSpec defines the desired state of CeleryWorker

func (*CeleryWorkerSpec) DeepCopy

func (in *CeleryWorkerSpec) DeepCopy() *CeleryWorkerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryWorkerSpec.

func (*CeleryWorkerSpec) DeepCopyInto

func (in *CeleryWorkerSpec) DeepCopyInto(out *CeleryWorkerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CeleryWorkerStatus

type CeleryWorkerStatus struct {
}

CeleryWorkerStatus defines the observed state of CeleryWorker

func (*CeleryWorkerStatus) DeepCopy

func (in *CeleryWorkerStatus) DeepCopy() *CeleryWorkerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CeleryWorkerStatus.

func (*CeleryWorkerStatus) DeepCopyInto

func (in *CeleryWorkerStatus) DeepCopyInto(out *CeleryWorkerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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