clibdocker
0.1.0-alpha.0
A Docker API for C
|
Docker System API. More...
Go to the source code of this file.
Macros | |
#define | free_docker_version(version) json_object_put((json_object*) version) |
Free the docker version object. | |
#define | docker_version_version_get(version) get_attr_str((json_object*)version, "Version") |
Get the docker version string from the docker version object. More... | |
#define | docker_version_os_get(version) get_attr_str((json_object*)version, "Os") |
Get the operating system of the docker server from the docker version object. More... | |
#define | docker_version_kernel_version_get(version) get_attr_str((json_object*)version, "KernelVersion") |
Get the kernel version string from the docker version object. More... | |
#define | docker_version_go_version_get(version) get_attr_str((json_object*)version, "GoVersion") |
Get the golang version string from the docker version object. More... | |
#define | docker_version_git_commit_get(version) get_attr_str((json_object*)version, "GitCommit") |
Get the git commit id from the docker version object. More... | |
#define | docker_version_arch_get(version) get_attr_str((json_object*)version, "Arch") |
Get the architecture of the docker server machine from the docker version object. More... | |
#define | docker_version_api_version_get(version) get_attr_str((json_object*)version, "ApiVersion") |
Get the api version of the docker server from the docker version object. More... | |
#define | docker_version_min_api_version_get(version) get_attr_str((json_object*)version, "MinAPIVersion") |
Get the minimum api version supported by the docker server from the docker version object. More... | |
#define | docker_version_build_time_get(version) get_attr_str((json_object*)version, "BuildTime") |
Get the build time of the docker server from the docker version object. More... | |
#define | docker_version_experimental_get(version) get_attr_boolean((json_object*)version, "Experimental") |
Get the flag indicating if the docker is running in experimental mode from the docker version object. More... | |
#define | free_docker_info(info) json_object_put((json_object*) info) |
Free the docker info object. | |
#define | docker_info_containers_get(info) get_attr_unsigned_long((json_object*)info, "Containers") |
Get the containers count from the docker info. More... | |
#define | docker_info_containers_running_get(info) get_attr_unsigned_long((json_object*)info, "ContainersRunning") |
Get the running containers count from the docker info. More... | |
#define | docker_info_containers_paused_get(info) get_attr_unsigned_long((json_object*)info, "ContainersPaused") |
Get the paused containers count from the docker info. More... | |
#define | docker_info_containers_stopped_get(info) get_attr_unsigned_long((json_object*)info, "ContainersStopped") |
Get the stopped containers count from the docker info. More... | |
#define | docker_info_images_get(info) get_attr_unsigned_long((json_object*)info, "Images") |
Get the images count from the docker info. More... | |
#define | docker_info_name_get(info) get_attr_str((json_object*)info, "Name") |
Get the docker server name from the docker info. More... | |
#define | docker_info_ncpu_get(info) get_attr_int((json_object*)info, "NCPU") |
Get the docker server CPU count from the docker info. More... | |
#define | docker_info_mem_total_get(info) get_attr_unsigned_long((json_object*)info, "MemTotal") |
Get the docker server total memory from the docker info. More... | |
#define | free_docker_event_list(event_ls) arraylist_free(event_ls) |
Free the docker event list object. More... | |
#define | docker_event_list_length(event_ls) arraylist_length(event_ls) |
Length of docker event list. More... | |
#define | docker_event_list_get_idx(event_ls, i) arraylist_get(event_ls, i) |
Get the ith event from the docker event list. More... | |
#define | free_docker_event(event) json_object_put((json_object*) event) |
Free the docker event json object. More... | |
#define | docker_event_type_get(event) get_attr_str((json_object*)event, "Type") |
Get the event type string from the docker event object. More... | |
#define | docker_event_action_get(event) get_attr_str((json_object*)event, "Action") |
Get the action from the docker event object. More... | |
#define | docker_event_time_get(event) get_attr_unsigned_long((json_object*)event, "time") |
Get the event time from the docker event object. More... | |
#define | docker_event_actor_id_get(event) get_attr_str(get_attr_json_object((json_object*)event, "Actor"), "ID") |
Get the actor id from the docker event object. More... | |
#define | docker_event_attributes_get(event) get_attr_json_object(get_attr_json_object((json_object*)event, "Actor"), "Attributes") |
Get the actor attributes from the docker event object. More... | |
#define | docker_event_attributes_foreach(event) json_object_object_foreach(docker_event_attributes_get(event), key, val) |
Iterate over the key/val pair of each attribute in the docker event attributes object. More... | |
#define | docker_df_image_id_get(img) get_attr_str((json_object*)img, "Id") |
Get the image id from the docker df image object. More... | |
#define | docker_df_image_parent_id_get(img) get_attr_str((json_object*)img, "ParentId") |
Get the parent image id from the docker df image object. More... | |
#define | docker_df_image_created_get(img) get_attr_unsigned_long((json_object*)img, "Created") |
Get the image creation datetime from the docker df image object. More... | |
#define | docker_df_image_size_get(img) get_attr_unsigned_long((json_object*)img, "Size") |
Get the image size from the docker df image object. More... | |
#define | docker_df_image_shared_size_get(img) get_attr_unsigned_long((json_object*)img, "SharedSize") |
Get the image shared size from the docker df image object. More... | |
#define | docker_df_image_virtual_size_get(img) get_attr_unsigned_long((json_object*)img, "VirtualSize") |
Get the image virtual size from the docker df image object. More... | |
#define | docker_df_image_containers_get(img) get_attr_unsigned_long((json_object*)img, "Containers") |
Get the image containers count from the docker df image object. More... | |
#define | docker_df_image_repo_tags_get(img) get_attr_json_object((json_object*)img, "RepoTags") |
Get the image repo tags list from the docker df image object. More... | |
#define | docker_df_image_repo_tags_length(img) json_object_array_length(docker_df_image_repo_tags_get(img)) |
Get the image repo tags list length from the docker df image object. More... | |
#define | docker_df_image_repo_tags_get_idx(img, i) (const char*)json_object_array_get_idx(docker_df_image_repo_tags_get(img), i) |
Get the ith repo tag from the repo tags list of the docker df image object. More... | |
#define | docker_df_image_repo_digests_get(img) get_attr_json_object((json_object*)img, "RepoDigests") |
Get the image repo digests list from the docker df image object. More... | |
#define | docker_df_image_repo_digests_length(img) json_object_array_length(docker_df_image_repo_digests_get(img)) |
Get the image repo digests list length from the docker df image object. More... | |
#define | docker_df_image_repo_digests_get_idx(img, i) (const char*)json_object_array_get_idx(docker_df_image_repo_digests_get(img), i) |
Get the ith repo digest from the repo digests list of the docker df image object. More... | |
#define | docker_df_container_id_get(ctr) get_attr_str((json_object*)ctr, "Id") |
Get the container id from the docker df container object. More... | |
#define | docker_df_container_image_get(ctr) get_attr_str((json_object*)ctr, "Image") |
Get the container image name from the docker df container object. More... | |
#define | docker_df_container_image_id_get(ctr) get_attr_str((json_object*)ctr, "ImageID") |
Get the container image id from the docker df container object. More... | |
#define | docker_df_container_command_get(ctr) get_attr_str((json_object*)ctr, "Command") |
Get the container command from the docker df container object. More... | |
#define | docker_df_container_created_get(ctr) get_attr_unsigned_long((json_object*)ctr, "Created") |
Get the created time from the docker df container object. More... | |
#define | docker_df_container_size_rootfs_get(ctr) get_attr_unsigned_long((json_object*)ctr, "SizeRootFs") |
Get the container rootfs size from the docker df container object. More... | |
#define | docker_df_container_state_get(ctr) get_attr_str((json_object*)ctr, "State") |
Get the container state from the docker df container object. More... | |
#define | docker_df_container_status_get(ctr) get_attr_str((json_object*)ctr, "Status") |
Get the container status from the docker df container object. More... | |
#define | docker_df_volume_name_get(vol) get_attr_str((json_object*)vol, "Name") |
Get the volume name from the docker df volume object. More... | |
#define | docker_df_volume_driver_get(vol) get_attr_str((json_object*)vol, "Driver") |
Get the volume driver from the docker df volume object. More... | |
#define | docker_df_volume_mountpoint_get(vol) get_attr_str((json_object*)vol, "Mountpoint") |
Get the volume mountpoint from the docker df volume object. More... | |
#define | docker_df_volume_scope_get(vol) get_attr_str((json_object*)vol, "Scope") |
Get the volume scope from the docker df volume object. More... | |
#define | docker_df_volume_usage_data_get(vol) (docker_df_volume_usage_data*)get_attr_json_object((json_object*)vol, "UsageData") |
Get the volume usage from the docker df volume object. More... | |
#define | docker_df_volume_usage_data_size_get(ud) get_attr_unsigned_long((json_object*)ud, "Size") |
Get the volume size from the docker df volume object. More... | |
#define | docker_df_volume_usage_data_ref_count_get(ud) get_attr_unsigned_long((json_object*)ud, "RefCount") |
Get the volume reference count from the docker df volume object. More... | |
#define | docker_df_container_names_get(ctr) get_attr_json_object((json_object*)ctr, "Names") |
Get the container names list from the docker df container object. More... | |
#define | docker_df_container_names_length(ctr) json_object_array_length(docker_df_container_names_get(ctr)) |
Get the container names list length from the docker df container object. More... | |
#define | docker_df_container_names_get_idx(ctr, i) (const char*)json_object_array_get_idx(docker_df_container_names_get(ctr), i) |
Get the ith name from the container names list from the docker df container object. More... | |
#define | docker_df_container_mounts_get(ctr) get_attr_json_object((json_object*)ctr, "Mounts") |
Get the mounts list from the docker df container object. More... | |
#define | docker_df_container_mounts_length(ctr) json_object_array_length(docker_df_container_mounts_get(ctr)) |
Get the container mounts list length from the docker df container object. More... | |
#define | docker_df_container_mounts_get_idx(ctr, i) (const char*)json_object_array_get_idx(docker_df_container_mounts_get(ctr), i) |
Get the ith mount from the container mounts list from the docker df container object. More... | |
#define | free_docker_df(df) json_object_put((json_object*) df) |
Free the docker df json object. More... | |
#define | docker_df_layers_size_get(df) get_attr_unsigned_long((json_object*)df, "LayersSize") |
Get the layers size from the docker df json object. More... | |
#define | docker_df_images_get(df) get_attr_json_object((json_object*)df, "Images") |
Get the docker images list from the docker df json object. More... | |
#define | docker_df_images_length(df) json_object_array_length(docker_df_images_get(df)) |
Get the docker images list length from the docker df json object. More... | |
#define | docker_df_images_get_idx(df, i) (docker_df_image*)json_object_array_get_idx(docker_df_images_get(df), i) |
Get the ith docker image from the docker df json object. More... | |
#define | docker_df_containers_get(df) get_attr_json_object((json_object*)df, "Containers") |
Get the docker containers list from the docker df json object. More... | |
#define | docker_df_containers_length(df) json_object_array_length(docker_df_containers_get(df)) |
Get the docker containers list length from the docker df json object. More... | |
#define | docker_df_containers_get_idx(df, i) (docker_df_container*)json_object_array_get_idx(docker_df_containers_get(df), i) |
Get the ith docker container from the docker df json object. More... | |
#define | docker_df_volumes_get(df) get_attr_json_object((json_object*)df, "Volumes") |
Get the docker volumes list from the docker df json object. More... | |
#define | docker_df_volumes_length(df) json_object_array_length(docker_df_volumes_get(df)) |
Get the docker volumes list length from the docker df json object. More... | |
#define | docker_df_volumes_get_idx(df, i) (docker_df_volume*)json_object_array_get_idx(docker_df_volumes_get(df), i) |
Get the ith docker volume from the docker df json object. More... | |
Typedefs | |
typedef json_object | docker_version |
Docker Version json object. More... | |
typedef json_object | docker_info |
Docker Info json object. This object represents the response returned from a docker system info call. More... | |
typedef arraylist | docker_event_list |
Docker Event List json object. | |
typedef json_object | docker_event |
Docker Event json object. | |
typedef json_object | docker_df |
Docker disk usage (df) json object. More... | |
typedef json_object | docker_df_image |
Docker image disk usage (image df) json object. | |
typedef json_object | docker_df_container |
Docker container disk usage (container df) json object. | |
typedef json_object | docker_df_volume |
Docker volume disk usage (volume df) json object. | |
typedef json_object | docker_df_volume_usage_data |
Docker volume usage (volume usage df) json object. | |
Functions | |
d_err_t | docker_ping (docker_context *ctx) |
Ping the docker server. Returns E_SUCCESS(0) if the server is reachable. More... | |
d_err_t | docker_system_version (docker_context *ctx, docker_version **version) |
d_err_t | docker_system_info (docker_context *ctx, docker_info **info) |
d_err_t | docker_system_events (docker_context *ctx, arraylist **events, time_t start_time, time_t end_time) |
d_err_t | docker_system_events_cb (docker_context *ctx, void(*docker_events_cb)(docker_event *evt, void *cbargs), void *cbargs, arraylist **events, time_t start_time, time_t end_time) |
d_err_t | docker_system_df (docker_context *ctx, docker_df **df) |
Docker System API.
#define docker_df_container_command_get | ( | ctr | ) | get_attr_str((json_object*)ctr, "Command") |
Get the container command from the docker df container object.
ctr | docker df container object |
#define docker_df_container_created_get | ( | ctr | ) | get_attr_unsigned_long((json_object*)ctr, "Created") |
Get the created time from the docker df container object.
ctr | docker df container object |
#define docker_df_container_id_get | ( | ctr | ) | get_attr_str((json_object*)ctr, "Id") |
Get the container id from the docker df container object.
ctr | docker df container object |
#define docker_df_container_image_get | ( | ctr | ) | get_attr_str((json_object*)ctr, "Image") |
Get the container image name from the docker df container object.
ctr | docker df container object |
#define docker_df_container_image_id_get | ( | ctr | ) | get_attr_str((json_object*)ctr, "ImageID") |
Get the container image id from the docker df container object.
ctr | docker df container object |
#define docker_df_container_mounts_get | ( | ctr | ) | get_attr_json_object((json_object*)ctr, "Mounts") |
Get the mounts list from the docker df container object.
ctr | docker df container object |
#define docker_df_container_mounts_get_idx | ( | ctr, | |
i | |||
) | (const char*)json_object_array_get_idx(docker_df_container_mounts_get(ctr), i) |
Get the ith mount from the container mounts list from the docker df container object.
ctr | docker df container object |
i | index |
#define docker_df_container_mounts_length | ( | ctr | ) | json_object_array_length(docker_df_container_mounts_get(ctr)) |
Get the container mounts list length from the docker df container object.
ctr | docker df container object |
#define docker_df_container_names_get | ( | ctr | ) | get_attr_json_object((json_object*)ctr, "Names") |
Get the container names list from the docker df container object.
ctr | docker df container object |
#define docker_df_container_names_get_idx | ( | ctr, | |
i | |||
) | (const char*)json_object_array_get_idx(docker_df_container_names_get(ctr), i) |
Get the ith name from the container names list from the docker df container object.
ctr | docker df container object |
i | index |
#define docker_df_container_names_length | ( | ctr | ) | json_object_array_length(docker_df_container_names_get(ctr)) |
Get the container names list length from the docker df container object.
ctr | docker df container object |
#define docker_df_container_size_rootfs_get | ( | ctr | ) | get_attr_unsigned_long((json_object*)ctr, "SizeRootFs") |
Get the container rootfs size from the docker df container object.
ctr | docker df container object |
#define docker_df_container_state_get | ( | ctr | ) | get_attr_str((json_object*)ctr, "State") |
Get the container state from the docker df container object.
ctr | docker df container object |
#define docker_df_container_status_get | ( | ctr | ) | get_attr_str((json_object*)ctr, "Status") |
Get the container status from the docker df container object.
ctr | docker df container object |
#define docker_df_containers_get | ( | df | ) | get_attr_json_object((json_object*)df, "Containers") |
Get the docker containers list from the docker df json object.
df | docker df json object |
#define docker_df_containers_get_idx | ( | df, | |
i | |||
) | (docker_df_container*)json_object_array_get_idx(docker_df_containers_get(df), i) |
Get the ith docker container from the docker df json object.
df | docker df json object |
i | index |
#define docker_df_containers_length | ( | df | ) | json_object_array_length(docker_df_containers_get(df)) |
Get the docker containers list length from the docker df json object.
df | docker df json object |
#define docker_df_image_containers_get | ( | img | ) | get_attr_unsigned_long((json_object*)img, "Containers") |
Get the image containers count from the docker df image object.
img | docker df image object |
#define docker_df_image_created_get | ( | img | ) | get_attr_unsigned_long((json_object*)img, "Created") |
Get the image creation datetime from the docker df image object.
img | docker df image object |
#define docker_df_image_id_get | ( | img | ) | get_attr_str((json_object*)img, "Id") |
Get the image id from the docker df image object.
img | docker df image object |
#define docker_df_image_parent_id_get | ( | img | ) | get_attr_str((json_object*)img, "ParentId") |
Get the parent image id from the docker df image object.
img | docker df image object |
#define docker_df_image_repo_digests_get | ( | img | ) | get_attr_json_object((json_object*)img, "RepoDigests") |
Get the image repo digests list from the docker df image object.
img | docker df image object |
#define docker_df_image_repo_digests_get_idx | ( | img, | |
i | |||
) | (const char*)json_object_array_get_idx(docker_df_image_repo_digests_get(img), i) |
Get the ith repo digest from the repo digests list of the docker df image object.
img | docker df image object |
i | index |
#define docker_df_image_repo_digests_length | ( | img | ) | json_object_array_length(docker_df_image_repo_digests_get(img)) |
Get the image repo digests list length from the docker df image object.
img | docker df image object |
#define docker_df_image_repo_tags_get | ( | img | ) | get_attr_json_object((json_object*)img, "RepoTags") |
Get the image repo tags list from the docker df image object.
img | docker df image object |
#define docker_df_image_repo_tags_get_idx | ( | img, | |
i | |||
) | (const char*)json_object_array_get_idx(docker_df_image_repo_tags_get(img), i) |
Get the ith repo tag from the repo tags list of the docker df image object.
img | docker df image object |
i | index |
#define docker_df_image_repo_tags_length | ( | img | ) | json_object_array_length(docker_df_image_repo_tags_get(img)) |
Get the image repo tags list length from the docker df image object.
img | docker df image object |
#define docker_df_image_shared_size_get | ( | img | ) | get_attr_unsigned_long((json_object*)img, "SharedSize") |
Get the image shared size from the docker df image object.
img | docker df image object |
#define docker_df_image_size_get | ( | img | ) | get_attr_unsigned_long((json_object*)img, "Size") |
Get the image size from the docker df image object.
img | docker df image object |
#define docker_df_image_virtual_size_get | ( | img | ) | get_attr_unsigned_long((json_object*)img, "VirtualSize") |
Get the image virtual size from the docker df image object.
img | docker df image object |
#define docker_df_images_get | ( | df | ) | get_attr_json_object((json_object*)df, "Images") |
Get the docker images list from the docker df json object.
df | docker df json object |
#define docker_df_images_get_idx | ( | df, | |
i | |||
) | (docker_df_image*)json_object_array_get_idx(docker_df_images_get(df), i) |
Get the ith docker image from the docker df json object.
df | docker df json object |
i | index |
#define docker_df_images_length | ( | df | ) | json_object_array_length(docker_df_images_get(df)) |
Get the docker images list length from the docker df json object.
df | docker df json object |
#define docker_df_layers_size_get | ( | df | ) | get_attr_unsigned_long((json_object*)df, "LayersSize") |
Get the layers size from the docker df json object.
df | docker df json object |
#define docker_df_volume_driver_get | ( | vol | ) | get_attr_str((json_object*)vol, "Driver") |
Get the volume driver from the docker df volume object.
vol | docker df volume object |
#define docker_df_volume_mountpoint_get | ( | vol | ) | get_attr_str((json_object*)vol, "Mountpoint") |
Get the volume mountpoint from the docker df volume object.
vol | docker df volume object |
#define docker_df_volume_name_get | ( | vol | ) | get_attr_str((json_object*)vol, "Name") |
Get the volume name from the docker df volume object.
vol | docker df volume object |
#define docker_df_volume_scope_get | ( | vol | ) | get_attr_str((json_object*)vol, "Scope") |
Get the volume scope from the docker df volume object.
vol | docker df volume object |
#define docker_df_volume_usage_data_get | ( | vol | ) | (docker_df_volume_usage_data*)get_attr_json_object((json_object*)vol, "UsageData") |
Get the volume usage from the docker df volume object.
vol | docker df volume object |
#define docker_df_volume_usage_data_ref_count_get | ( | ud | ) | get_attr_unsigned_long((json_object*)ud, "RefCount") |
Get the volume reference count from the docker df volume object.
ud | docker df volume object |
#define docker_df_volume_usage_data_size_get | ( | ud | ) | get_attr_unsigned_long((json_object*)ud, "Size") |
Get the volume size from the docker df volume object.
ud | docker df volume object |
#define docker_df_volumes_get | ( | df | ) | get_attr_json_object((json_object*)df, "Volumes") |
Get the docker volumes list from the docker df json object.
df | docker df json object |
#define docker_df_volumes_get_idx | ( | df, | |
i | |||
) | (docker_df_volume*)json_object_array_get_idx(docker_df_volumes_get(df), i) |
Get the ith docker volume from the docker df json object.
df | docker df json object |
i | index |
#define docker_df_volumes_length | ( | df | ) | json_object_array_length(docker_df_volumes_get(df)) |
Get the docker volumes list length from the docker df json object.
df | docker df json object |
#define docker_event_action_get | ( | event | ) | get_attr_str((json_object*)event, "Action") |
Get the action from the docker event object.
event | docker event object |
#define docker_event_actor_id_get | ( | event | ) | get_attr_str(get_attr_json_object((json_object*)event, "Actor"), "ID") |
Get the actor id from the docker event object.
event | docker event object |
#define docker_event_attributes_foreach | ( | event | ) | json_object_object_foreach(docker_event_attributes_get(event), key, val) |
Iterate over the key/val pair of each attribute in the docker event attributes object.
event | docker event object |
#define docker_event_attributes_get | ( | event | ) | get_attr_json_object(get_attr_json_object((json_object*)event, "Actor"), "Attributes") |
Get the actor attributes from the docker event object.
event | docker event object |
#define docker_event_list_get_idx | ( | event_ls, | |
i | |||
) | arraylist_get(event_ls, i) |
Get the ith event from the docker event list.
event_ls | docker event list |
i | index |
#define docker_event_list_length | ( | event_ls | ) | arraylist_length(event_ls) |
Length of docker event list.
event_ls | docker event list |
#define docker_event_time_get | ( | event | ) | get_attr_unsigned_long((json_object*)event, "time") |
Get the event time from the docker event object.
event | docker event object |
#define docker_event_type_get | ( | event | ) | get_attr_str((json_object*)event, "Type") |
Get the event type string from the docker event object.
event | docker event object |
#define docker_info_containers_get | ( | info | ) | get_attr_unsigned_long((json_object*)info, "Containers") |
Get the containers count from the docker info.
info | docker info object |
#define docker_info_containers_paused_get | ( | info | ) | get_attr_unsigned_long((json_object*)info, "ContainersPaused") |
Get the paused containers count from the docker info.
info | docker info object |
#define docker_info_containers_running_get | ( | info | ) | get_attr_unsigned_long((json_object*)info, "ContainersRunning") |
Get the running containers count from the docker info.
info | docker info object |
#define docker_info_containers_stopped_get | ( | info | ) | get_attr_unsigned_long((json_object*)info, "ContainersStopped") |
Get the stopped containers count from the docker info.
info | docker info object |
#define docker_info_images_get | ( | info | ) | get_attr_unsigned_long((json_object*)info, "Images") |
Get the images count from the docker info.
info | docker info object |
#define docker_info_mem_total_get | ( | info | ) | get_attr_unsigned_long((json_object*)info, "MemTotal") |
Get the docker server total memory from the docker info.
info | docker info object |
#define docker_info_name_get | ( | info | ) | get_attr_str((json_object*)info, "Name") |
Get the docker server name from the docker info.
info | docker info object |
#define docker_info_ncpu_get | ( | info | ) | get_attr_int((json_object*)info, "NCPU") |
Get the docker server CPU count from the docker info.
info | docker info object |
#define docker_version_api_version_get | ( | version | ) | get_attr_str((json_object*)version, "ApiVersion") |
Get the api version of the docker server from the docker version object.
version | docker version |
#define docker_version_arch_get | ( | version | ) | get_attr_str((json_object*)version, "Arch") |
Get the architecture of the docker server machine from the docker version object.
version | docker version |
#define docker_version_build_time_get | ( | version | ) | get_attr_str((json_object*)version, "BuildTime") |
Get the build time of the docker server from the docker version object.
version | docker version |
#define docker_version_experimental_get | ( | version | ) | get_attr_boolean((json_object*)version, "Experimental") |
Get the flag indicating if the docker is running in experimental mode from the docker version object.
version | docker version |
#define docker_version_git_commit_get | ( | version | ) | get_attr_str((json_object*)version, "GitCommit") |
Get the git commit id from the docker version object.
version | docker version |
#define docker_version_go_version_get | ( | version | ) | get_attr_str((json_object*)version, "GoVersion") |
Get the golang version string from the docker version object.
version | docker version |
#define docker_version_kernel_version_get | ( | version | ) | get_attr_str((json_object*)version, "KernelVersion") |
Get the kernel version string from the docker version object.
version | docker version |
#define docker_version_min_api_version_get | ( | version | ) | get_attr_str((json_object*)version, "MinAPIVersion") |
Get the minimum api version supported by the docker server from the docker version object.
version | docker version |
#define docker_version_os_get | ( | version | ) | get_attr_str((json_object*)version, "Os") |
Get the operating system of the docker server from the docker version object.
version | docker version |
#define docker_version_version_get | ( | version | ) | get_attr_str((json_object*)version, "Version") |
Get the docker version string from the docker version object.
version | docker version |
#define free_docker_df | ( | df | ) | json_object_put((json_object*) df) |
Free the docker df json object.
df | df object |
#define free_docker_event | ( | event | ) | json_object_put((json_object*) event) |
Free the docker event json object.
event | docker event object |
#define free_docker_event_list | ( | event_ls | ) | arraylist_free(event_ls) |
Free the docker event list object.
event_ls | docker event list |
typedef json_object docker_df |
Docker disk usage (df) json object.
Represents the result of the docker API df
call. The json object contains the df objects for:
typedef json_object docker_info |
Docker Info json object. This object represents the response returned from a docker system info call.
To access the members of docker info use the getters of the form docker_info_<member>_get
typedef json_object docker_version |
Docker Version json object.
To access members of the docker version object use the getter methods of the form docker_version_<member>_get
d_err_t docker_ping | ( | docker_context * | ctx | ) |
Ping the docker server. Returns E_SUCCESS(0) if the server is reachable.
ctx | docker context |
References make_docker_call(), and docker_context_t::url.
d_err_t docker_system_df | ( | docker_context * | ctx, |
docker_df ** | df | ||
) |
Gets the docker usage data
ctx | docker context |
df | object to return |
References make_docker_call(), and docker_context_t::url.
d_err_t docker_system_events | ( | docker_context * | ctx, |
arraylist ** | events, | ||
time_t | start_time, | ||
time_t | end_time | ||
) |
Get the docker events in a time range.
ctx | the docker context |
events | is an array_list containing objects of type docker_event |
start_time | |
end_time |
References docker_log_warn.
d_err_t docker_system_events_cb | ( | docker_context * | ctx, |
void(*)(docker_event *evt, void *cbargs) | docker_events_cb, | ||
void * | cbargs, | ||
arraylist ** | events, | ||
time_t | start_time, | ||
time_t | end_time | ||
) |
Get the docker events in a time range.
ctx | the docker context |
docker_events_cb | pointer to callback when an event is received. |
cbargs | is a pointer to callback arguments |
events | is an array_list containing objects of type docker_event |
start_time | |
end_time |
References make_docker_call(), and docker_context_t::url.
d_err_t docker_system_info | ( | docker_context * | ctx, |
docker_info ** | info | ||
) |
Gets the docker system information
ctx | docker context |
info | object to return |
References make_docker_call(), and docker_context_t::url.
d_err_t docker_system_version | ( | docker_context * | ctx, |
docker_version ** | version | ||
) |
Gets the docker version information
ctx | docker context |
version | docker version object to return |
References make_docker_call(), and docker_context_t::url.