pub struct Definition {
pub code: Option<String>,
pub env_names: Option<Vec<String>>,
pub environment: Option<String>,
pub handler: Option<String>,
pub image: Option<String>,
pub memory_limit: Option<String>,
pub name: String,
pub namespace: Option<String>,
pub runtime: Option<String>,
pub target: Option<String>,
pub timeout_sec: Option<i32>,
}Fields§
§code: Option<String>Code is the source to run, capped so one function cannot amplify the store.
env_names: Option<Vec<String>>EnvNames are the secret NAMES to mount. Values live in the secret store and are never carried here.
environment: Option<String>Environment is a second spelling of runtime, accepted so a console that says "environment" needs no translation.
handler: Option<String>Handler is the entry point within the code.
image: Option<String>Image names a prebuilt image to run instead of source.
memory_limit: Option<String>MemoryLimit is the memory the function runs with, defaulting to 256Mi. It is also the multiplier on the GB-seconds compute charge.
name: StringName is the function’s org-unique handle and the segment that addresses it, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. The names that would shadow a collection route are reserved.
namespace: Option<String>Namespace groups functions for display. It is cosmetic — the org is the isolation key — and is normalised to a DNS-safe label.
runtime: Option<String>Runtime is the language the code runs under: node, python or deno.
target: Option<String>Target is where the function runs: sandbox (the default) or fleet, the org’s own GPU fleet. fleet supports runtime=python only.
timeout_sec: Option<i32>TimeoutSec is the per-invocation deadline, defaulting to 30 and clamped at 900 — a larger value is capped rather than reset to the default.
Implementations§
Source§impl Definition
impl Definition
pub fn new(name: String) -> Definition
Trait Implementations§
Source§impl Clone for Definition
impl Clone for Definition
Source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more