Files
c/kubernetes/model/v1_job_spec.h

73 lines
2.0 KiB
C
Raw Permalink Normal View History

/*
* v1_job_spec.h
*
* JobSpec describes how the job execution will look like.
*/
#ifndef _v1_job_spec_H_
#define _v1_job_spec_H_
#include <string.h>
#include "../external/cJSON.h"
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
typedef struct v1_job_spec_t v1_job_spec_t;
#include "v1_label_selector.h"
#include "v1_pod_failure_policy.h"
#include "v1_pod_template_spec.h"
#include "v1_success_policy.h"
typedef struct v1_job_spec_t {
long active_deadline_seconds; //numeric
int backoff_limit; //numeric
int backoff_limit_per_index; //numeric
2021-09-14 21:52:06 +08:00
char *completion_mode; // string
int completions; //numeric
char *managed_by; // string
int manual_selector; //boolean
int max_failed_indexes; //numeric
int parallelism; //numeric
struct v1_pod_failure_policy_t *pod_failure_policy; //model
char *pod_replacement_policy; // string
struct v1_label_selector_t *selector; //model
struct v1_success_policy_t *success_policy; //model
2021-09-14 21:52:06 +08:00
int suspend; //boolean
struct v1_pod_template_spec_t *_template; //model
int ttl_seconds_after_finished; //numeric
int _library_owned; // Is the library responsible for freeing this object?
} v1_job_spec_t;
__attribute__((deprecated)) v1_job_spec_t *v1_job_spec_create(
long active_deadline_seconds,
int backoff_limit,
int backoff_limit_per_index,
2021-09-14 21:52:06 +08:00
char *completion_mode,
int completions,
char *managed_by,
int manual_selector,
int max_failed_indexes,
int parallelism,
v1_pod_failure_policy_t *pod_failure_policy,
char *pod_replacement_policy,
v1_label_selector_t *selector,
v1_success_policy_t *success_policy,
2021-09-14 21:52:06 +08:00
int suspend,
v1_pod_template_spec_t *_template,
int ttl_seconds_after_finished
);
void v1_job_spec_free(v1_job_spec_t *v1_job_spec);
v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON);
cJSON *v1_job_spec_convertToJSON(v1_job_spec_t *v1_job_spec);
#endif /* _v1_job_spec_H_ */