Add /runner/:name endpoint
This commit is contained in:
parent
b5bdd49d9c
commit
0253d2d90b
6 changed files with 79 additions and 26 deletions
|
|
@ -5,6 +5,7 @@ use time::OffsetDateTime;
|
|||
|
||||
use crate::{config::Config, shared::RunnerStatus};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RunnerInfo {
|
||||
pub secret: String,
|
||||
pub last_seen: OffsetDateTime,
|
||||
|
|
@ -81,4 +82,8 @@ impl Runners {
|
|||
.find(|hash| !covered.contains(hash))
|
||||
.map(|hash| hash as &str)
|
||||
}
|
||||
|
||||
pub fn get(&self, name: &str) -> Option<RunnerInfo> {
|
||||
self.runners.get(name).cloned()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue