2020-03-18 17:24:33 +08:00
|
|
|
/*
|
|
|
|
|
* v1_container_status.h
|
|
|
|
|
*
|
|
|
|
|
* ContainerStatus contains details for the current status of this container.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _v1_container_status_H_
|
|
|
|
|
#define _v1_container_status_H_
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "../external/cJSON.h"
|
|
|
|
|
#include "../include/list.h"
|
|
|
|
|
#include "../include/keyValuePair.h"
|
2020-06-20 09:41:15 +08:00
|
|
|
#include "../include/binary.h"
|
|
|
|
|
|
|
|
|
|
typedef struct v1_container_status_t v1_container_status_t;
|
|
|
|
|
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_container_state.h"
|
2024-10-12 03:18:38 +00:00
|
|
|
#include "v1_container_user.h"
|
2023-06-05 02:09:22 +00:00
|
|
|
#include "v1_resource_requirements.h"
|
2024-10-12 03:18:38 +00:00
|
|
|
#include "v1_resource_status.h"
|
2024-05-18 13:20:54 +00:00
|
|
|
#include "v1_volume_mount_status.h"
|
2020-03-18 17:24:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct v1_container_status_t {
|
2023-06-05 02:09:22 +00:00
|
|
|
list_t* allocated_resources; //map
|
2024-10-12 03:18:38 +00:00
|
|
|
list_t *allocated_resources_status; //nonprimitive container
|
2020-03-18 17:24:33 +08:00
|
|
|
char *container_id; // string
|
|
|
|
|
char *image; // string
|
|
|
|
|
char *image_id; // string
|
|
|
|
|
struct v1_container_state_t *last_state; //model
|
|
|
|
|
char *name; // string
|
|
|
|
|
int ready; //boolean
|
2023-06-05 02:09:22 +00:00
|
|
|
struct v1_resource_requirements_t *resources; //model
|
2020-03-18 17:24:33 +08:00
|
|
|
int restart_count; //numeric
|
|
|
|
|
int started; //boolean
|
|
|
|
|
struct v1_container_state_t *state; //model
|
2025-06-08 08:13:38 +00:00
|
|
|
char *stop_signal; // string
|
2024-10-12 03:18:38 +00:00
|
|
|
struct v1_container_user_t *user; //model
|
2024-05-18 13:20:54 +00:00
|
|
|
list_t *volume_mounts; //nonprimitive container
|
2020-03-18 17:24:33 +08:00
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
int _library_owned; // Is the library responsible for freeing this object?
|
2020-03-18 17:24:33 +08:00
|
|
|
} v1_container_status_t;
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
__attribute__((deprecated)) v1_container_status_t *v1_container_status_create(
|
2023-06-05 02:09:22 +00:00
|
|
|
list_t* allocated_resources,
|
2024-10-12 03:18:38 +00:00
|
|
|
list_t *allocated_resources_status,
|
2020-03-18 17:24:33 +08:00
|
|
|
char *container_id,
|
|
|
|
|
char *image,
|
|
|
|
|
char *image_id,
|
|
|
|
|
v1_container_state_t *last_state,
|
|
|
|
|
char *name,
|
|
|
|
|
int ready,
|
2023-06-05 02:09:22 +00:00
|
|
|
v1_resource_requirements_t *resources,
|
2020-03-18 17:24:33 +08:00
|
|
|
int restart_count,
|
|
|
|
|
int started,
|
2024-05-18 13:20:54 +00:00
|
|
|
v1_container_state_t *state,
|
2025-06-08 08:13:38 +00:00
|
|
|
char *stop_signal,
|
2024-10-12 03:18:38 +00:00
|
|
|
v1_container_user_t *user,
|
2024-05-18 13:20:54 +00:00
|
|
|
list_t *volume_mounts
|
2020-03-18 17:24:33 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void v1_container_status_free(v1_container_status_t *v1_container_status);
|
|
|
|
|
|
|
|
|
|
v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_statusJSON);
|
|
|
|
|
|
|
|
|
|
cJSON *v1_container_status_convertToJSON(v1_container_status_t *v1_container_status);
|
|
|
|
|
|
|
|
|
|
#endif /* _v1_container_status_H_ */
|
|
|
|
|
|