hst: configurable wait delay
All checks were successful
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 1m58s
Test / Hakurei (push) Successful in 2m47s
Test / Sandbox (race detector) (push) Successful in 3m56s
Test / Planterette (push) Successful in 3m58s
Test / Hakurei (race detector) (push) Successful in 4m31s
Test / Flake checks (push) Successful in 1m17s

This is useful for programs that take a long time to clean up.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-07-29 03:06:49 +09:00
parent 940ee00ffe
commit f7bd28118c
13 changed files with 62 additions and 27 deletions

View File

@@ -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