Documentation ¶
Index ¶
- func GetLocalIP() string
- type Config
- type Kubernetes
- func (k8s *Kubernetes) Add(qorJob worker.QorJobInterface) error
- func (k8s *Kubernetes) GetCurrentPod() *corev1.Pod
- func (k8s *Kubernetes) GetJobSpec(qorJob worker.QorJobInterface) (*v1.Job, error)
- func (k8s *Kubernetes) Kill(qorJob worker.QorJobInterface) error
- func (k8s *Kubernetes) Remove(qorJob worker.QorJobInterface) error
- func (k8s *Kubernetes) Run(qorJob worker.QorJobInterface) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Namespace string JobTemplateMaker func(worker.QorJobInterface) string ClusterConfig *rest.Config }
Config kubernetes config
type Kubernetes ¶
type Kubernetes struct { Clientset *kubernetes.Clientset Config *Config }
Kubernetes implemented a worker Queue based on kubernetes jobs
func (*Kubernetes) Add ¶
func (k8s *Kubernetes) Add(qorJob worker.QorJobInterface) error
Add a job to k8s queue
func (*Kubernetes) GetCurrentPod ¶
func (k8s *Kubernetes) GetCurrentPod() *corev1.Pod
GetCurrentPod get current pod
func (*Kubernetes) GetJobSpec ¶
func (k8s *Kubernetes) GetJobSpec(qorJob worker.QorJobInterface) (*v1.Job, error)
GetJobSpec get job spec
func (*Kubernetes) Kill ¶
func (k8s *Kubernetes) Kill(qorJob worker.QorJobInterface) error
Kill a job from k8s queue
func (*Kubernetes) Remove ¶
func (k8s *Kubernetes) Remove(qorJob worker.QorJobInterface) error
Remove a job from k8s queue
func (*Kubernetes) Run ¶
func (k8s *Kubernetes) Run(qorJob worker.QorJobInterface) error
Run a job from k8s queue
Click to show internal directories.
Click to hide internal directories.