Skip to main content

Runner

Struct Runner 

Source
pub struct Runner {
    pub id: u64,
    pub name: String,
    pub os: String,
    pub status: RunnerStatus,
    pub busy: bool,
    pub ephemeral: Option<bool>,
    pub labels: Vec<String>,
}
Expand description

One self-hosted runner GitHub knows about, local or not.

07-security.md and g2 both require that runners this product did not create still appear — a legacy persistent runner is part of the operator’s real inventory, and hiding it would make the dashboard a worse answer than GitHub’s own page. Nothing here filters by ownership; deciding what is locally owned is e1’s, from the routing label.

§Labels arrive lower-cased

The D18 spike registered Windows and X64 and read back windows and x64 (docs/spikes/d18-org-jit-verification.md, point 3). It also established that no label is added implicitly — a runner carries exactly what was requested, with no self-hosted, no OS and no architecture unless they were asked for. So Runner::labels is what GitHub stores, verbatim, and Runner::has_label compares case-insensitively rather than pretending the case survived.

Fields§

§id: u64§name: String§os: String

GitHub’s own OS string, unparsed. Runner::parsed_os is the lenient reading; this is the fact.

§status: RunnerStatus§busy: bool§ephemeral: Option<bool>

None when GitHub did not send the field.

Absent is not false. A runner whose ephemerality is unknown is exactly the runner an operator most wants flagged, and defaulting it to “not ephemeral” would render that as a settled fact.

§labels: Vec<String>

Implementations§

Source§

impl Runner

Source

pub fn has_label(&self, label: &str) -> bool

Whether this runner carries label, compared case-insensitively because GitHub lower-cases what it stores.

Source

pub fn parsed_os(&self) -> Option<Os>

This runner’s OS as a domain value, when it is one of the three the product supports.

None rather than an error: an unrecognised OS is a runner to display, not a refresh to fail.

Trait Implementations§

Source§

impl Clone for Runner

Source§

fn clone(&self) -> Runner

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 Runner

Source§

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

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

impl Eq for Runner

Source§

impl PartialEq for Runner

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Runner

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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<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