pub struct RestJit { /* private fields */ }Expand description
JitGateway over api.github.com.
Holds no credential of its own: authentication is entirely
AuthenticatedClient’s, and this type only ever hands it an
ApiRequest — whose Debug renders the body as [REDACTED JSON], which
matters here because this is the one place in the crate that posts one.
Implementations§
Source§impl RestJit
impl RestJit
pub fn new(client: Arc<AuthenticatedClient>) -> Self
Sourcepub fn requests_issued(&self) -> u64
pub fn requests_issued(&self) -> u64
How many HTTP requests this gateway has issued.
This is how “no code path retries a 403” is asserted rather than
asserted about: one refused registration must leave this at one.
Sourcepub fn path(target: &ScaleTarget) -> String
pub fn path(target: &ScaleTarget) -> String
The generate-jitconfig path for either scope.
One function rather than a branch at each call site, because v1’s whole
organization finding is that the two differ in nothing but this string.
Trait Implementations§
Source§impl JitGateway for RestJit
impl JitGateway for RestJit
Source§fn generate_jit_config<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
target: &'life1 ScaleTarget,
request: &'life2 JitRunnerRequest,
cancel: &'life3 CancelToken,
) -> Pin<Box<dyn Future<Output = Result<JitRegistration, JitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn generate_jit_config<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
target: &'life1 ScaleTarget,
request: &'life2 JitRunnerRequest,
cancel: &'life3 CancelToken,
) -> Pin<Box<dyn Future<Output = Result<JitRegistration, JitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Register one ephemeral runner and return its configuration. Read more
Auto Trait Implementations§
impl !Freeze for RestJit
impl !RefUnwindSafe for RestJit
impl !UnwindSafe for RestJit
impl Send for RestJit
impl Sync for RestJit
impl Unpin for RestJit
impl UnsafeUnpin for RestJit
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