Debian Codegraph @

specs-go/features/features.go

raw
1 // Package features provides the Features struct.
2 package features
3
4 // Features represents the supported features of the runtime.
5 type Features struct {
6 // OCIVersionMin is the minimum OCI Runtime Spec version recognized by the runtime, e.g., "1.0.0".
7 OCIVersionMin string `json:"ociVersionMin,omitempty"`
8
9 // OCIVersionMax is the maximum OCI Runtime Spec version recognized by the runtime, e.g., "1.0.2-dev".
10 OCIVersionMax string `json:"ociVersionMax,omitempty"`
11
12 // Hooks is the list of the recognized hook names, e.g., "createRuntime".
13 // Nil value means "unknown", not "no support for any hook".
14 Hooks []string `json:"hooks,omitempty"`
15
16 // MountOptions is the list of the recognized mount options, e.g., "ro".
17 // Nil value means "unknown", not "no support for any mount option".
18 // This list does not contain filesystem-specific options passed to mount(2) syscall as (const void *).
19 MountOptions []string `json:"mountOptions,omitempty"`
20
21 // Linux is specific to Linux.
22 Linux *Linux `json:"linux,omitempty"`
23
24 // Annotations contains implementation-specific annotation strings,
25 // such as the implementation version, and third-party extensions.
26 Annotations map[string]string `json:"annotations,omitempty"`
27
28 // PotentiallyUnsafeConfigAnnotations the list of the potential unsafe annotations
29 // that may appear in `config.json`.
30 //
31 // A value that ends with "." is interpreted as a prefix of annotations.
32 PotentiallyUnsafeConfigAnnotations []string `json:"potentiallyUnsafeConfigAnnotations,omitempty"`
33 }
34
35 // Linux is specific to Linux.
36 type Linux struct {
37 // Namespaces is the list of the recognized namespaces, e.g., "mount".
38 // Nil value means "unknown", not "no support for any namespace".
39 Namespaces []string `json:"namespaces,omitempty"`
40
41 // Capabilities is the list of the recognized capabilities , e.g., "CAP_SYS_ADMIN".
42 // Nil value means "unknown", not "no support for any capability".
43 Capabilities []string `json:"capabilities,omitempty"`
44
45 Cgroup *Cgroup `json:"cgroup,omitempty"`
46 Seccomp *Seccomp `json:"seccomp,omitempty"`
47 Apparmor *Apparmor `json:"apparmor,omitempty"`
48 Selinux *Selinux `json:"selinux,omitempty"`
49 IntelRdt *IntelRdt `json:"intelRdt,omitempty"`
50 MountExtensions *MountExtensions `json:"mountExtensions,omitempty"`
51 }
52
53 // Cgroup represents the "cgroup" field.
54 type Cgroup struct {
55 // V1 represents whether Cgroup v1 support is compiled in.
56 // Unrelated to whether the host uses cgroup v1 or not.
57 // Nil value means "unknown", not "false".
58 V1 *bool `json:"v1,omitempty"`
59
60 // V2 represents whether Cgroup v2 support is compiled in.
61 // Unrelated to whether the host uses cgroup v2 or not.
62 // Nil value means "unknown", not "false".
63 V2 *bool `json:"v2,omitempty"`
64
65 // Systemd represents whether systemd-cgroup support is compiled in.
66 // Unrelated to whether the host uses systemd or not.
67 // Nil value means "unknown", not "false".
68 Systemd *bool `json:"systemd,omitempty"`
69
70 // SystemdUser represents whether user-scoped systemd-cgroup support is compiled in.
71 // Unrelated to whether the host uses systemd or not.
72 // Nil value means "unknown", not "false".
73 SystemdUser *bool `json:"systemdUser,omitempty"`
74
75 // Rdma represents whether RDMA cgroup support is compiled in.
76 // Unrelated to whether the host supports RDMA or not.
77 // Nil value means "unknown", not "false".
78 Rdma *bool `json:"rdma,omitempty"`
79 }
80
81 // Seccomp represents the "seccomp" field.
82 type Seccomp struct {
83 // Enabled is true if seccomp support is compiled in.
84 // Nil value means "unknown", not "false".
85 Enabled *bool `json:"enabled,omitempty"`
86
87 // Actions is the list of the recognized actions, e.g., "SCMP_ACT_NOTIFY".
88 // Nil value means "unknown", not "no support for any action".
89 Actions []string `json:"actions,omitempty"`
90
91 // Operators is the list of the recognized operators, e.g., "SCMP_CMP_NE".
92 // Nil value means "unknown", not "no support for any operator".
93 Operators []string `json:"operators,omitempty"`
94
95 // Archs is the list of the recognized archs, e.g., "SCMP_ARCH_X86_64".
96 // Nil value means "unknown", not "no support for any arch".
97 Archs []string `json:"archs,omitempty"`
98
99 // KnownFlags is the list of the recognized filter flags, e.g., "SECCOMP_FILTER_FLAG_LOG".
100 // Nil value means "unknown", not "no flags are recognized".
101 KnownFlags []string `json:"knownFlags,omitempty"`
102
103 // SupportedFlags is the list of the supported filter flags, e.g., "SECCOMP_FILTER_FLAG_LOG".
104 // This list may be a subset of KnownFlags due to some flags
105 // not supported by the current kernel and/or libseccomp.
106 // Nil value means "unknown", not "no flags are supported".
107 SupportedFlags []string `json:"supportedFlags,omitempty"`
108 }
109
110 // Apparmor represents the "apparmor" field.
111 type Apparmor struct {
112 // Enabled is true if AppArmor support is compiled in.
113 // Unrelated to whether the host supports AppArmor or not.
114 // Nil value means "unknown", not "false".
115 Enabled *bool `json:"enabled,omitempty"`
116 }
117
118 // Selinux represents the "selinux" field.
119 type Selinux struct {
120 // Enabled is true if SELinux support is compiled in.
121 // Unrelated to whether the host supports SELinux or not.
122 // Nil value means "unknown", not "false".
123 Enabled *bool `json:"enabled,omitempty"`
124 }
125
126 // IntelRdt represents the "intelRdt" field.
127 type IntelRdt struct {
128 // Enabled is true if Intel RDT support is compiled in.
129 // Unrelated to whether the host supports Intel RDT or not.
130 // Nil value means "unknown", not "false".
131 Enabled *bool `json:"enabled,omitempty"`
132 }
133
134 // MountExtensions represents the "mountExtensions" field.
135 type MountExtensions struct {
136 // IDMap represents the status of idmap mounts support.
137 IDMap *IDMap `json:"idmap,omitempty"`
138 }
139
140 type IDMap struct {
141 // Enabled represents whether idmap mounts supports is compiled in.
142 // Unrelated to whether the host supports it or not.
143 // Nil value means "unknown", not "false".
144 Enabled *bool `json:"enabled,omitempty"`
145 }