pub struct ScriptDeclaration {Show 14 fields
pub job: String,
pub script: String,
pub interpreter: String,
pub args: Vec<Template>,
pub env: BTreeMap<String, Template>,
pub secrets: Vec<SecretDecl>,
pub working_dir: String,
pub retries: Option<u32>,
pub retry_delay_ms: Option<u64>,
pub timeout_ms: Option<u64>,
pub queue: Option<String>,
pub max_output_size: Option<u64>,
pub outcomes: Vec<OutcomeDecl>,
pub cleanup: Option<ScriptCleanupDeclaration>,
}Expand description
A declared script, as the agent answers a ScriptOperator (decision 293): what its task
runs, and only the settings its schedr.toml gives (the DAG’s defaults apply to the
others).
Fields§
§job: StringIts reference, <root>:<path>#<name> (an absolute one resolved to its root).
script: StringThe script, relative to the script root.
interpreter: StringThe interpreter’s name.
args: Vec<Template>Its arguments, as the task carries them (templates).
env: BTreeMap<String, Template>Its environment variables, as the task carries them (templates).
secrets: Vec<SecretDecl>The secrets it declares.
working_dir: StringWhere it runs, relative to the script root.
retries: Option<u32>retries, if given.
retry_delay_ms: Option<u64>retry_delay, if given.
timeout_ms: Option<u64>timeout, if given.
queue: Option<String>queue, if given.
max_output_size: Option<u64>max_output_size, if given.
outcomes: Vec<OutcomeDecl>[outcomes], if given: each name with its exit code.
cleanup: Option<ScriptCleanupDeclaration>[cleanup], if given.
Trait Implementations§
Source§impl Clone for ScriptDeclaration
impl Clone for ScriptDeclaration
Source§fn clone(&self) -> ScriptDeclaration
fn clone(&self) -> ScriptDeclaration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScriptDeclaration
impl Debug for ScriptDeclaration
Source§impl<'de> Deserialize<'de> for ScriptDeclaration
impl<'de> Deserialize<'de> for ScriptDeclaration
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ScriptDeclaration
Source§impl JsonSchema for ScriptDeclaration
impl JsonSchema for ScriptDeclaration
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ScriptDeclaration
impl PartialEq for ScriptDeclaration
Source§impl Serialize for ScriptDeclaration
impl Serialize for ScriptDeclaration
impl StructuralPartialEq for ScriptDeclaration
Auto Trait Implementations§
impl Freeze for ScriptDeclaration
impl RefUnwindSafe for ScriptDeclaration
impl Send for ScriptDeclaration
impl Sync for ScriptDeclaration
impl Unpin for ScriptDeclaration
impl UnsafeUnpin for ScriptDeclaration
impl UnwindSafe for ScriptDeclaration
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
Mutably borrows from an owned value. Read more