Eunomia
0.1.0
A lightweight eBPF-based CloudNative Monitor tool for Container Security and Observability
container_info.h
Go to the documentation of this file.
1
#ifndef CONTAINER_INFO_H
2
#define CONTAINER_INFO_H
3
4
#include <string>
5
7
enum class
container_status
8
{
9
RUNNING
,
10
EXITED
,
11
INVALID
,
12
};
13
15
static
container_status
container_status_from_str(
const
std::string &s)
16
{
17
if
(s ==
"running"
)
18
{
19
return
container_status::RUNNING
;
20
}
21
else
if
(s ==
"exited"
)
22
{
23
return
container_status::EXITED
;
24
}
25
else
26
{
27
return
container_status::INVALID
;
28
}
29
}
30
32
struct
container_info
33
{
35
std::string
id
;
37
std::string
name
;
39
container_status
status
;
40
};
41
42
#endif
container_info::status
container_status status
container status
Definition:
container_info.h:39
container_status::EXITED
@ EXITED
container_status::RUNNING
@ RUNNING
container_info
container info
Definition:
container_info.h:32
container_info::id
std::string id
container id
Definition:
container_info.h:35
container_info::name
std::string name
container name
Definition:
container_info.h:37
container_status
container_status
statues of container
Definition:
container_info.h:7
container_status::INVALID
@ INVALID
include
eunomia
model
container_info.h
Generated by
1.8.17