libpod/events: Update event time format and add timeNano

Add new event type in cmd/podman to better match the docker format.

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
AhmedGrati
2023-12-16 14:06:34 +01:00
committed by Paul Holzinger
parent 59b6f48d90
commit a3a1b44c31
5 changed files with 146 additions and 31 deletions

View File

@ -104,21 +104,22 @@ In the case where an ID is used, the ID may be in its full or shortened form. T
Format the output to JSON Lines or using the given Go template.
| **Placeholder** | **Description** |
|-------------------------|-----------------------------------------------|
| .Attributes ... | created_at, _by, labels, and more (map[]) |
| .ContainerExitCode | Exit code (int) |
| .ContainerInspectData | Payload of the container's inspect |
| .HealthStatus | Health Status (string) |
| .ID | Container ID (full 64-bit SHA) |
| .Image | Name of image being run (string) |
| .Name | Container name (string) |
| .Network | Name of network being used (string) |
| .PodID | ID of pod associated with container, if any |
| .Status | Event status (e.g., create, start, died, ...) |
| .Time ... | Event timestamp (string) |
| .ToHumanReadable *bool* | If true, truncates CID in output |
| .Type | Event type (e.g., image, container, pod, ...) |
| **Placeholder** | **Description** |
|-------------------------|----------------------------------------------- ---|
| .Attributes ... | created_at, _by, labels, and more (map[]) |
| .ContainerExitCode | Exit code (int) |
| .ContainerInspectData | Payload of the container's inspect |
| .HealthStatus | Health Status (string) |
| .ID | Container ID (full 64-bit SHA) |
| .Image | Name of image being run (string) |
| .Name | Container name (string) |
| .Network | Name of network being used (string) |
| .PodID | ID of pod associated with container, if any |
| .Status | Event status (e.g., create, start, died, ...) |
| .Time ... | Event timestamp (string) |
| .TimeNano | Event timestamp with nanosecond precision (int64) |
| .ToHumanReadable *bool* | If true, truncates CID in output |
| .Type | Event type (e.g., image, container, pod, ...) |
#### **--help**