aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/container.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-29 03:06:49 +0900
committerOphestra <cat@gensokyo.uk>2025-07-29 03:06:49 +0900
commitf7bd28118c4ac34a9a444073b31ca8f2579188f3 (patch)
treed094700b4d367250e9de16226cc7cc49a0dc3b55 /hst/container.go
parent940ee00ffee9208a244a99ff085a981c1af1d7c4 (diff)
hst: configurable wait delay
This is useful for programs that take a long time to clean up. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/container.go')
-rw-r--r--hst/container.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/hst/container.go b/hst/container.go
index 1ee9e839..c385344c 100644
--- a/hst/container.go
+++ b/hst/container.go
@@ -1,6 +1,8 @@
package hst
import (
+ "time"
+
"hakurei.app/container/seccomp"
)
@@ -10,8 +12,10 @@ type (
// container hostname
Hostname string `json:"hostname,omitempty"`
- // do not interrupt and wait for initial process during termination
- ImmediateTermination bool `json:"immediate_termination,omitempty"`
+ // duration to wait for after interrupting a container's initial process in nanoseconds;
+ // a negative value causes the container to be terminated immediately on cancellation
+ WaitDelay time.Duration `json:"wait_delay,omitempty"`
+
// extra seccomp flags
SeccompFlags seccomp.ExportFlag `json:"seccomp_flags"`
// extra seccomp presets