Skip to main content

AgentMessage

Enum AgentMessage 

Source
pub enum AgentMessage {
Show 22 variants Welcome, Refused { reason: String, }, Parse(ParseRequest), Task(Box<TaskRequest>), ForkServer(ForkServerRequest), Watchers(WatchersRequest), StartWatcher { watcher: u64, task: Box<TaskRequest>, cancel_grace_ms: u64, moved_in: bool, }, MoveWatcher { watcher: u64, }, GoWatcher { watcher: u64, max_wait_ms: Option<u64>, }, CancelWatcher { watcher: u64, }, ToWatcher { watcher: u64, message: Box<AgentMessage>, }, EventStored, Fork(ForkRequest), ScriptDeclaration(Box<ScriptDeclaration>), ScriptNotFound { message: String, }, Secret { value: Value, }, ApiAnswer { status: u16, body: Value, note: Option<String>, }, HandleAdded, HandleRefused { message: String, }, SecretFailed { kind: String, message: String, }, Connection { values: BTreeMap<String, Value>, }, ConnectionFailed { kind: String, message: String, },
}
Expand description

A message from the agent to the runner.

Variants§

§

Welcome

The handshake succeeded.

§

Refused

The handshake failed; the runner exits.

Fields

§reason: String

Why, e.g. a version mismatch.

§

Parse(ParseRequest)

A parse job.

§

Task(Box<TaskRequest>)

A task attempt.

§

ForkServer(ForkServerRequest)

The fork server’s preload list (its mode’s request).

§

Watchers(WatchersRequest)

A watcher host’s code set (its mode’s request).

§

StartWatcher

Start a wait step in a watcher host.

Fields

§watcher: u64

The watcher’s ID, unique in the host.

§task: Box<TaskRequest>

What to run.

§cancel_grace_ms: u64

How long a thread it left running has to end before the host does (decision 337).

§moved_in: bool

A poke moving here from older code (decision 335): it says task_imported when it could start, or task_failed, and makes no call until a Self::GoWatcher.

§

MoveWatcher

Stop a poke between its calls: watcher_moved, unless it ended first.

Fields

§watcher: u64

The watcher’s ID.

§

GoWatcher

Let a poke that moved here make its first call.

Fields

§watcher: u64

The watcher’s ID.

§max_wait_ms: Option<u64>

What is left of its max_wait.

§

CancelWatcher

Cancel a watcher: CancelledError at its next await.

Fields

§watcher: u64

The watcher’s ID.

§

ToWatcher

An answer to one watcher, in a watcher host.

Fields

§watcher: u64

The watcher’s ID.

§message: Box<AgentMessage>

What a task’s runner would get.

§

EventStored

The master has what a trigger found: on to the next.

§

Fork(ForkRequest)

Start a runner process (to the fork server).

§

ScriptDeclaration(Box<ScriptDeclaration>)

The declaration a RunnerMessage::ScriptDeclaration asked for, checked.

§

ScriptNotFound

Why the declaration a RunnerMessage::ScriptDeclaration asked for can’t be used: its script root isn’t on this worker (decision 295), its file or job isn’t there, or the file has problems; the DAG file’s import error.

Fields

§message: String

What is wrong.

§

Secret

The value of the secret a RunnerMessage::SecretGet asked for.

Fields

§value: Value

A key’s value as a string; a whole secret as an object of key to value.

§

ApiAnswer

What the API answered a RunnerMessage::ApiCall.

Fields

§status: u16

The HTTP status.

§body: Value

The body, JSON ({"error": ...} for a refusal).

§note: Option<String>

What the task is told of its request: a secret in it masked. Printed to its log.

§

HandleAdded

The handle of a RunnerMessage::HandleAdd is registered.

§

HandleRefused

Why the handle of a RunnerMessage::HandleAdd isn’t registered.

Fields

§message: String

What went wrong.

§

SecretFailed

Why the secret a RunnerMessage::SecretGet asked for can’t be read.

Fields

§kind: String

The error kind (secret_unavailable, secret_denied, secret_not_found).

§message: String

What went wrong, naming the secret (never a value).

§

Connection

The values of the connection a RunnerMessage::ConnectionGet asked for, rendered.

Fields

§values: BTreeMap<String, Value>

Each parameter’s value, as stored JSON.

§

ConnectionFailed

Why the connection a RunnerMessage::ConnectionGet asked for can’t be opened.

Fields

§kind: String

The error kind (connection_not_found, or a secret’s).

§message: String

What went wrong, naming the connection (never a value).

Trait Implementations§

Source§

impl Clone for AgentMessage

Source§

fn clone(&self) -> AgentMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentMessage

Source§

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

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

impl<'de> Deserialize<'de> for AgentMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for AgentMessage

Source§

impl JsonSchema for AgentMessage

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

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

Generates a JSON Schema for this type. Read more
Source§

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 more
Source§

impl PartialEq for AgentMessage

Source§

fn eq(&self, other: &AgentMessage) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AgentMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AgentMessage

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.