3 releases
0.1.2 | Jan 13, 2024 |
---|---|
0.1.1 | Jan 13, 2023 |
0.1.0 | Oct 31, 2022 |
#46 in #jobs
52 downloads per month
91KB
2K
SLoC
Rust lava api crate
This crate provides access to the LAVA REST API
lib.rs
:
Provide access to the data held by a LAVA server via the data export REST interface.
Overview
The central object in this crate is a Lava
, which represents
a local proxy for a LAVA server. The coverage of the data exposed
by LAVA is not complete. It is however possible to readback
- jobs
- test results
- devices
- workers
- tags (which apply to both jobs and devices)
Pagination is handled transparently, but you will likely want to
use TryStreamExt
to iterate over returned streams of objects,
since this crate is async and built on the tokio
runtime.
Example:
use futures::stream::TryStreamExt;
use lava_api::Lava;
#
let lava = Lava::new(&service_uri, lava_token).expect("failed to create Lava object");
// Read back the device data from the server
let mut ld = lava.devices();
while let Some(device) = ld
.try_next()
.await
.expect("failed to read devices from server")
{
println!("Got device {:?}", device);
}
Dependencies
~9–22MB
~312K SLoC