Skip to main content

RunOpts

Struct RunOpts 

Source
pub struct RunOpts<'a> {
Show 25 fields pub command: Vec<String>, pub root: Option<&'a str>, pub snapshot_after: u64, pub tail_lines: u64, pub max_bytes: u64, pub timeout_ms: u64, pub kill_after_ms: u64, pub cwd: Option<&'a str>, pub env_vars: Vec<String>, pub env_files: Vec<String>, pub inherit_env: bool, pub mask: Vec<String>, pub tags: Vec<String>, pub log: Option<&'a str>, pub progress_every_ms: u64, pub wait: bool, pub wait_poll_ms: u64, pub notify_command: Option<String>, pub notify_file: Option<String>, pub output_pattern: Option<String>, pub output_match_type: Option<String>, pub output_stream: Option<String>, pub output_command: Option<String>, pub output_file: Option<String>, pub shell_wrapper: Vec<String>,
}
Expand description

Options for the run sub-command.

§Definition-time option alignment rule

Every definition-time option accepted here MUST also be accepted by create (and vice versa), since both commands write the same persisted job definition to meta.json. When adding a new persisted metadata field, wire it through both run and create unless the spec explicitly documents it as launch-only (e.g. snapshot timing, tail sizing, –wait).

Fields§

§command: Vec<String>

Command and arguments to execute.

§root: Option<&'a str>

Override for jobs root directory.

§snapshot_after: u64

Milliseconds to wait before returning; 0 = return immediately.

§tail_lines: u64

Number of tail lines to include in snapshot.

§max_bytes: u64

Max bytes for tail.

§timeout_ms: u64

Timeout in milliseconds; 0 = no timeout.

§kill_after_ms: u64

Milliseconds after SIGTERM before SIGKILL; 0 = immediate SIGKILL.

§cwd: Option<&'a str>

Working directory for the command.

§env_vars: Vec<String>

Environment variables as KEY=VALUE strings.

§env_files: Vec<String>

Paths to env files, applied in order.

§inherit_env: bool

Whether to inherit the current process environment (default: true).

§mask: Vec<String>

Keys to mask in JSON output (values replaced with “***”).

§tags: Vec<String>

User-defined tags for this job (deduplicated preserving first-seen order).

§log: Option<&'a str>

Override full.log path; None = use job dir.

§progress_every_ms: u64

Interval (ms) for state.json updated_at refresh; 0 = disabled.

§wait: bool

If true, wait for the job to reach a terminal state before returning. The response will include exit_code, finished_at, and final_snapshot.

§wait_poll_ms: u64

Poll interval in milliseconds when wait is true.

§notify_command: Option<String>

Shell command string for command notification sink; executed via platform shell. None = no command sink.

§notify_file: Option<String>

File path for NDJSON notification sink; None = no file sink.

§output_pattern: Option<String>

Pattern to match against output lines (output-match notification).

§output_match_type: Option<String>

Match type for output-match: “contains” or “regex”.

§output_stream: Option<String>

Stream selector: “stdout”, “stderr”, or “either”.

§output_command: Option<String>

Shell command string for output-match command sink.

§output_file: Option<String>

File path for output-match NDJSON file sink.

§shell_wrapper: Vec<String>

Resolved shell wrapper argv used to execute command strings. e.g. ["sh", "-lc"] or ["bash", "-lc"].

Trait Implementations§

Source§

impl<'a> Debug for RunOpts<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for RunOpts<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for RunOpts<'a>

§

impl<'a> RefUnwindSafe for RunOpts<'a>

§

impl<'a> Send for RunOpts<'a>

§

impl<'a> Sync for RunOpts<'a>

§

impl<'a> Unpin for RunOpts<'a>

§

impl<'a> UnsafeUnpin for RunOpts<'a>

§

impl<'a> UnwindSafe for RunOpts<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,