Crate lava_api

source ·
Expand description

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);
}

Modules

Structs

  • A local proxy for a LAVA server

Enums