pub struct KojiClient { /* private fields */ }Expand description
Koji API client.
Implementations§
Source§impl KojiClient
impl KojiClient
pub fn new(instance: &str) -> Self
pub fn instance(&self) -> &str
Sourcepub fn get_build(&self, build_id: i64) -> Result<BuildInfo, Error>
pub fn get_build(&self, build_id: i64) -> Result<BuildInfo, Error>
Fetch build information by build ID.
Sourcepub fn get_task_info(&self, task_id: i64) -> Result<TaskInfo, Error>
pub fn get_task_info(&self, task_id: i64) -> Result<TaskInfo, Error>
Fetch task information by task ID.
Sourcepub fn get_task_children(&self, task_id: i64) -> Result<Vec<TaskInfo>, Error>
pub fn get_task_children(&self, task_id: i64) -> Result<Vec<TaskInfo>, Error>
Fetch child tasks of a parent task.
Sourcepub fn resolve_build_arch_task(
&self,
task_id: i64,
arch: &str,
) -> Result<TaskInfo, Error>
pub fn resolve_build_arch_task( &self, task_id: i64, arch: &str, ) -> Result<TaskInfo, Error>
Resolve a task ID to the buildArch task for the given architecture.
If the task is already a buildArch task, returns it directly. If it is a parent build task, finds the matching child.
Sourcepub fn download_log(
&self,
task_id: i64,
filename: &str,
dest_dir: &Path,
) -> Result<String, Error>
pub fn download_log( &self, task_id: i64, filename: &str, dest_dir: &Path, ) -> Result<String, Error>
Download a log file from a task using koji download-logs.
Downloads into dest_dir and returns the content of filename.
Sourcepub fn download_build_log(
&self,
build: &BuildInfo,
arch: &str,
filename: &str,
) -> Result<String, Error>
pub fn download_build_log( &self, build: &BuildInfo, arch: &str, filename: &str, ) -> Result<String, Error>
Download a log file from a build’s persistent storage via HTTP.
Build logs are stored at:
https://{topurl}/packages/{name}/{version}/{release}/data/logs/{arch}/{filename}
These persist even after task logs are garbage collected.
Auto Trait Implementations§
impl !RefUnwindSafe for KojiClient
impl !UnwindSafe for KojiClient
impl Forget for KojiClient
impl Freeze for KojiClient
impl Move for KojiClient
impl Send for KojiClient
impl Sync for KojiClient
impl Unpin for KojiClient
impl UnsafeUnpin for KojiClient
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