Documentation ¶
Index ¶
- Constants
- func DRMAA2State(jc batchv1.JobInterface, jobid string) drmaa2interface.JobState
- func JobToJobInfo(jc batchv1.JobInterface, jobid string) (drmaa2interface.JobInfo, error)
- func NewClientSet() (*kubernetes.Clientset, error)
- type KubernetesTracker
- func (kt *KubernetesTracker) AddArrayJob(jt drmaa2interface.JobTemplate, begin int, end int, step int, maxParallel int) (string, error)
- func (kt *KubernetesTracker) AddJob(jt drmaa2interface.JobTemplate) (string, error)
- func (kt *KubernetesTracker) DeleteJob(jobid string) error
- func (kt *KubernetesTracker) JobControl(jobid, state string) error
- func (kt *KubernetesTracker) JobInfo(jobid string) (drmaa2interface.JobInfo, error)
- func (kt *KubernetesTracker) JobState(jobid string) drmaa2interface.JobState
- func (kt *KubernetesTracker) ListArrayJobs(id string) ([]string, error)
- func (kt *KubernetesTracker) ListJobCategories() ([]string, error)
- func (kt *KubernetesTracker) ListJobs() ([]string, error)
- func (kt *KubernetesTracker) Wait(jobid string, timeout time.Duration, states ...drmaa2interface.JobState) error
Constants ¶
View Source
const K8S_JT_EXTENSION_LABELS = "labels"
View Source
const K8S_JT_EXTENSION_NAMESPACE = "namespace"
Variables ¶
This section is empty.
Functions ¶
func DRMAA2State ¶
func DRMAA2State(jc batchv1.JobInterface, jobid string) drmaa2interface.JobState
func JobToJobInfo ¶
func JobToJobInfo(jc batchv1.JobInterface, jobid string) (drmaa2interface.JobInfo, error)
func NewClientSet ¶
func NewClientSet() (*kubernetes.Clientset, error)
NewClientSet create a new clientset by parsing the .kube/config file in the home directory.
Types ¶
type KubernetesTracker ¶
type KubernetesTracker struct {
// contains filtered or unexported fields
}
func New ¶
func New(jobsession string, cs *kubernetes.Clientset) (*KubernetesTracker, error)
New creates a new KubernetesTracker either by using a given kubernetes Clientset or by allocating a new one (if the parameter is zero).
func (*KubernetesTracker) AddArrayJob ¶
func (kt *KubernetesTracker) AddArrayJob(jt drmaa2interface.JobTemplate, begin int, end int, step int, maxParallel int) (string, error)
func (*KubernetesTracker) AddJob ¶
func (kt *KubernetesTracker) AddJob(jt drmaa2interface.JobTemplate) (string, error)
AddJob converts the given DRMAA2 job template into a batchv1.Job and creates the job within Kubernetes.
func (*KubernetesTracker) DeleteJob ¶
func (kt *KubernetesTracker) DeleteJob(jobid string) error
DeleteJob removes a job from kubernetes.
func (*KubernetesTracker) JobControl ¶
func (kt *KubernetesTracker) JobControl(jobid, state string) error
JobControl changes the state of the given job by execution the given action (suspend, resume, hold, release, terminate).
func (*KubernetesTracker) JobInfo ¶
func (kt *KubernetesTracker) JobInfo(jobid string) (drmaa2interface.JobInfo, error)
func (*KubernetesTracker) JobState ¶
func (kt *KubernetesTracker) JobState(jobid string) drmaa2interface.JobState
func (*KubernetesTracker) ListArrayJobs ¶
func (kt *KubernetesTracker) ListArrayJobs(id string) ([]string, error)
func (*KubernetesTracker) ListJobCategories ¶
func (kt *KubernetesTracker) ListJobCategories() ([]string, error)
func (*KubernetesTracker) ListJobs ¶
func (kt *KubernetesTracker) ListJobs() ([]string, error)
func (*KubernetesTracker) Wait ¶
func (kt *KubernetesTracker) Wait(jobid string, timeout time.Duration, states ...drmaa2interface.JobState) error
Wait returns when the job is in one of the given states or when a timeout occurs (errors then).
Click to show internal directories.
Click to hide internal directories.