Debian Codegraph @

options.go

raw symbols SCIP
1 // Copyright © 2013, 2014, The Go-LXC Authors. All rights reserved.
2 // Use of this source code is governed by a LGPLv2.1
3 // license that can be found in the LICENSE file.
4
5 //go:build linux && cgo
6 // +build linux,cgo
7
8 package lxcscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/
9
10 import (
11 "osscip-go gomod github.com/golang/go/src go1.20 os/"
12 )
13
14 // AttachOptions type is used for defining various attach options.
15 type AttachOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions# struct {
16
17 // Specify the namespaces to attach to, as OR'ed list of clone flags (syscall.CLONE_NEWNS | syscall.CLONE_NEWUTS ...).
18 Namespacesscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Namespaces. int
19
20 // Specify the architecture which the kernel should appear to be running as to the command executed.
21 Archscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Arch. Personalityscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/Personality#
22
23 // Cwd specifies the working directory of the command.
24 Cwdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Cwd. string
25
26 // UID specifies the user id to run as.
27 UIDscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#UID. int
28
29 // GID specifies the group id to run as.
30 GIDscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#GID. int
31
32 // Groups specifies the list of additional group ids to run with.
33 Groupsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Groups. []int
34
35 // If ClearEnv is true the environment is cleared before running the command.
36 ClearEnvscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#ClearEnv. bool
37
38 // Env specifies the environment of the process.
39 Envscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Env. []string
40
41 // EnvToKeep specifies the environment of the process when ClearEnv is true.
42 EnvToKeepscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#EnvToKeep. []string
43
44 // StdinFd specifies the fd to read input from.
45 StdinFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#StdinFd. uintptr
46
47 // StdoutFd specifies the fd to write output to.
48 StdoutFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#StdoutFd. uintptr
49
50 // StderrFd specifies the fd to write error output to.
51 StderrFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#StderrFd. uintptr
52
53 // RemountSysProc remounts /sys and /proc for the executed command.
54 // This is required to reflect the container (PID) namespace context
55 // if the command does not attach to the container's mount namespace.
56 RemountSysProcscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#RemountSysProc. bool
57
58 // ElevatedPrivileges runs the command with elevated privileges.
59 // The capabilities, cgroup and security module restrictions of the container are not applied.
60 // WARNING: This may leak privileges into the container.
61 ElevatedPrivilegesscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#ElevatedPrivileges. bool
62 }
63
64 // DefaultAttachOptions is a convenient set of options to be used.
65 var DefaultAttachOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/DefaultAttachOptions. = AttachOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#{
66 Namespacesscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Namespaces.: -1,
67 Archscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Arch.: -1,
68 Cwdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Cwd.: "/",
69 UIDscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#UID.: -1,
70 GIDscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#GID.: -1,
71 Groupsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Groups.: nil,
72 ClearEnvscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#ClearEnv.: false,
73 Envscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#Env.: nil,
74 EnvToKeepscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#EnvToKeep.: nil,
75 StdinFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#StdinFd.: osscip-go gomod github.com/golang/go/src go1.20 os/.Stdinscip-go gomod github.com/golang/go/src go1.20 os/Stdin..Fdscip-go gomod github.com/golang/go/src go1.20 os/File#Fd().(),
76 StdoutFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#StdoutFd.: osscip-go gomod github.com/golang/go/src go1.20 os/.Stdoutscip-go gomod github.com/golang/go/src go1.20 os/Stdout..Fdscip-go gomod github.com/golang/go/src go1.20 os/File#Fd().(),
77 StderrFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#StderrFd.: osscip-go gomod github.com/golang/go/src go1.20 os/.Stderrscip-go gomod github.com/golang/go/src go1.20 os/Stderr..Fdscip-go gomod github.com/golang/go/src go1.20 os/File#Fd().(),
78 RemountSysProcscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#RemountSysProc.: false,
79 ElevatedPrivilegesscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/AttachOptions#ElevatedPrivileges.: false,
80 }
81
82 // TemplateOptions type is used for defining various template options.
83 type TemplateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions# struct {
84
85 // Template specifies the name of the template.
86 Templatescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Template. string
87
88 // Backend specifies the type of the backend.
89 Backendscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Backend. BackendStorescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStore#
90
91 BackendSpecsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#BackendSpecs. *BackendStoreSpecsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#
92
93 // Distro specifies the name of the distribution.
94 Distroscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Distro. string
95
96 // Release specifies the name/version of the distribution.
97 Releasescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Release. string
98
99 // Arch specified the architecture of the container.
100 Archscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Arch. string
101
102 // Variant specifies the variant of the image (default: "default").
103 Variantscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Variant. string
104
105 // Image server (default: "images.linuxcontainers.org").
106 Serverscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Server. string
107
108 // GPG keyid (default: 0x...).
109 KeyIDscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#KeyID. string
110
111 // GPG keyserver to use.
112 KeyServerscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#KeyServer. string
113
114 // Disable GPG validation (not recommended).
115 DisableGPGValidationscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#DisableGPGValidation. bool
116
117 // Flush the local copy (if present).
118 FlushCachescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#FlushCache. bool
119
120 // Force the use of the local copy even if expired.
121 ForceCachescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#ForceCache. bool
122
123 // ExtraArgs provides a way to specify template specific args.
124 ExtraArgsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#ExtraArgs. []string
125 }
126
127 // BackendStoreSpecs represents a LXC storage backend.
128 type BackendStoreSpecsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs# struct {
129 FSTypescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#FSType. string
130 FSSizescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#FSSize. uint64
131 Dirscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#Dir. *string
132 ZFSscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#ZFS. struct {
133 Rootscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#$anon_d37c255621cca675#Root. string
134 }
135 LVMscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#LVM. struct {
136 VGscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#$anon_0cb6736505557490#VG., LVscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#$anon_0cb6736505557490#LV., Thinpoolscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#$anon_0cb6736505557490#Thinpool. string
137 }
138 RBDscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#RBD. struct {
139 Namescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#$anon_1e3bd6c666123440#Name., Poolscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStoreSpecs#$anon_1e3bd6c666123440#Pool. string
140 }
141 }
142
143 // DownloadTemplateOptions is a convenient set of options for "download" template.
144 var DownloadTemplateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/DownloadTemplateOptions. = TemplateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#{
145 Templatescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Template.: "download",
146 Distroscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Distro.: "ubuntu",
147 Releasescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Release.: "trusty",
148 Archscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Arch.: "amd64",
149 }
150
151 // BusyboxTemplateOptions is a convenient set of options for "busybox" template.
152 var BusyboxTemplateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BusyboxTemplateOptions. = TemplateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#{
153 Templatescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Template.: "busybox",
154 }
155
156 // UbuntuTemplateOptions is a convenient set of options for "ubuntu" template.
157 var UbuntuTemplateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/UbuntuTemplateOptions. = TemplateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#{
158 Templatescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/TemplateOptions#Template.: "ubuntu",
159 }
160
161 // ConsoleOptions type is used for defining various console options.
162 type ConsoleOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions# struct {
163
164 // Tty number to attempt to allocate, -1 to allocate the first available tty, or 0 to allocate the console.
165 Ttyscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#Tty. int
166
167 // StdinFd specifies the fd to read input from.
168 StdinFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#StdinFd. uintptr
169
170 // StdoutFd specifies the fd to write output to.
171 StdoutFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#StdoutFd. uintptr
172
173 // StderrFd specifies the fd to write error output to.
174 StderrFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#StderrFd. uintptr
175
176 // EscapeCharacter (a means <Ctrl a>, b maens <Ctrl b>).
177 EscapeCharacterscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#EscapeCharacter. rune
178 }
179
180 // DefaultConsoleOptions is a convenient set of options to be used.
181 var DefaultConsoleOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/DefaultConsoleOptions. = ConsoleOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#{
182 Ttyscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#Tty.: -1,
183 StdinFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#StdinFd.: osscip-go gomod github.com/golang/go/src go1.20 os/.Stdinscip-go gomod github.com/golang/go/src go1.20 os/Stdin..Fdscip-go gomod github.com/golang/go/src go1.20 os/File#Fd().(),
184 StdoutFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#StdoutFd.: osscip-go gomod github.com/golang/go/src go1.20 os/.Stdoutscip-go gomod github.com/golang/go/src go1.20 os/Stdout..Fdscip-go gomod github.com/golang/go/src go1.20 os/File#Fd().(),
185 StderrFdscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#StderrFd.: osscip-go gomod github.com/golang/go/src go1.20 os/.Stderrscip-go gomod github.com/golang/go/src go1.20 os/Stderr..Fdscip-go gomod github.com/golang/go/src go1.20 os/File#Fd().(),
186 EscapeCharacterscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleOptions#EscapeCharacter.: 'a',
187 }
188
189 // CloneOptions type is used for defining various clone options.
190 type CloneOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions# struct {
191
192 // Backend specifies the type of the backend.
193 Backendscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions#Backend. BackendStorescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/BackendStore#
194
195 // lxcpath in which to create the new container. If not set the original container's lxcpath will be used.
196 ConfigPathscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions#ConfigPath. string
197
198 // Do not change the hostname of the container (in the root filesystem).
199 KeepNamescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions#KeepName. bool
200
201 // Use the same MAC address as the original container, rather than generating a new random one.
202 KeepMACscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions#KeepMAC. bool
203
204 // Create a snapshot rather than copy.
205 Snapshotscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions#Snapshot. bool
206 }
207
208 // DefaultCloneOptions is a convenient set of options to be used.
209 var DefaultCloneOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/DefaultCloneOptions. = CloneOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions#{
210 Backendscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CloneOptions#Backend.: Directoryscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/Directory.,
211 }
212
213 // CheckpointOptions type is used for defining checkpoint options for CRIU.
214 type CheckpointOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CheckpointOptions# struct {
215 Directoryscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CheckpointOptions#Directory. string
216 Stopscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CheckpointOptions#Stop. bool
217 Verbosescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CheckpointOptions#Verbose. bool
218 }
219
220 // RestoreOptions type is used for defining restore options for CRIU.
221 type RestoreOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/RestoreOptions# struct {
222 Directoryscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/RestoreOptions#Directory. string
223 Verbosescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/RestoreOptions#Verbose. bool
224 }
225
226 // MigrateOptions type is used for defining migrate options.
227 type MigrateOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions# struct {
228 Directoryscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#Directory. string
229 PredumpDirscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#PredumpDir. string
230 ActionScriptscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#ActionScript. string
231 Verbosescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#Verbose. bool
232 Stopscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#Stop. bool
233 PreservesInodesscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#PreservesInodes. bool
234 GhostLimitscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#GhostLimit. uint64
235 FeaturesToCheckscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/MigrateOptions#FeaturesToCheck. CriuFeaturesscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/CriuFeatures#
236 }
237
238 // ConsoleLogOptions type is used for defining console log options.
239 type ConsoleLogOptionsscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleLogOptions# struct {
240 ClearLogscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleLogOptions#ClearLog. bool
241 ReadLogscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleLogOptions#ReadLog. bool
242 ReadMaxscip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleLogOptions#ReadMax. uint64
243 WriteToLogFilescip-go gomod github.com/lxc/go-lxc . `github.com/lxc/go-lxc`/ConsoleLogOptions#WriteToLogFile. bool
244 }