pub struct SandboxLifecyclePolicy {
pub max_lifetime_seconds: Option<u32>,
pub idle_pause_seconds: Option<u32>,
pub on_pause: Option<Vec<String>>,
pub on_resume: Option<Vec<String>>,
}Expand description
How long a sandbox may live and when it is paused.
Declaration-time ceilings, not per-request values: every sandbox created through this declaration’s binding is held to them, whatever a caller asks for at runtime.
Fields§
§max_lifetime_seconds: Option<u32>Wall-clock ceiling on a single sandbox, after which the platform terminates it.
Optional because not every backend has the primitive: Kubernetes has
activeDeadlineSeconds and AWS maximumDurationInSeconds, while neither Azure nor Local
expose one, so declaring a ceiling there is refused at plan time rather than accepted and
never applied. AWS caps it at 8 hours.
idle_pause_seconds: Option<u32>Idle period after which the sandbox is paused, where the platform supports it.
Stored state written before the rename calls this idleSuspendSeconds.
on_pause: Option<Vec<String>>A program the agent runs inside the image, with the image’s own grant, before the platform pauses the sandbox with its memory kept. Killed by process group at a deadline. Best effort: the image must also survive a stop with no warning. The program must be one of the image’s own files, not on a declared image-permissions mount. AWS only.
on_resume: Option<Vec<String>>A program the agent runs inside the image after such a pause resumes. Best effort, with a deadline. The same rule for the program applies. AWS only.
Trait Implementations§
Source§impl Clone for SandboxLifecyclePolicy
impl Clone for SandboxLifecyclePolicy
Source§impl Debug for SandboxLifecyclePolicy
impl Debug for SandboxLifecyclePolicy
Source§impl Default for SandboxLifecyclePolicy
impl Default for SandboxLifecyclePolicy
Source§impl<'de> Deserialize<'de> for SandboxLifecyclePolicy
impl<'de> Deserialize<'de> for SandboxLifecyclePolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SandboxLifecyclePolicy
Source§impl PartialEq for SandboxLifecyclePolicy
impl PartialEq for SandboxLifecyclePolicy
Source§impl Serialize for SandboxLifecyclePolicy
impl Serialize for SandboxLifecyclePolicy
impl StructuralPartialEq for SandboxLifecyclePolicy
Auto Trait Implementations§
impl Forget for SandboxLifecyclePolicy
impl Freeze for SandboxLifecyclePolicy
impl Move for SandboxLifecyclePolicy
impl RefUnwindSafe for SandboxLifecyclePolicy
impl Send for SandboxLifecyclePolicy
impl Sync for SandboxLifecyclePolicy
impl Unpin for SandboxLifecyclePolicy
impl UnsafeUnpin for SandboxLifecyclePolicy
impl UnwindSafe for SandboxLifecyclePolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.