Struct lava_api::Lava

source ·
pub struct Lava { /* private fields */ }
Expand description

A local proxy for a LAVA server

This provides convenient access to some of the data stored on a LAVA server, including jobs, devices, tags and workers.

Implementations§

Create a new Lava proxy

Here url is the address of the server, and token is an optional LAVA security token used to validate access.

Refresh the tag cache

Tags are cached to make lookup cheaper, and because the number of jobs can be very large: resolving tags individually for each job would be extremely slow. The cache has to be periodically refreshed to account for changes.

Note that tags are automatically refreshed by calling tag or tags, but not by calling devices or jobs.

Retrieve the Tag for the given tag id.

Retrieve all the tags from the server

The returned data is not a stream, but a flat vector when the method succeeds. This also updates the tag cache.

Obtain a Stream of all the Device instances on the server.

Obtain a customisable query object for Job instances on the server.

The returned JobsBuilder can be used first to select the subset of jobs that will be returned, and then after that is complete to obtain a stream of matching jobs. The default query is the same as that for JobsBuilder::new.

Obtain a Stream of all the Worker instances on the server.

Obtain a Stream of all the TestCase instances for a given job id.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more