12 releases (7 breaking)
0.13.8 | Nov 20, 2024 |
---|---|
0.12.20 | Mar 18, 2024 |
0.12.9 | Oct 2, 2023 |
0.10.4 | Apr 18, 2023 |
0.0.35 | Oct 16, 2020 |
#276 in Hardware support
1,115 stars & 43 watchers
415KB
9K
SLoC
Introduction
This is the Akri Agent project. It is an implementation of a Kubernetes device plugin.
Design
Traits
Public
- DiscoveryHandler - This provides an abstraction to allow protocol specific code to handle discovery and provide details for Instance creation. The trait is defined by Akri's discovery API. Implementations of this trait can be found in the discovery handlers directory.
#[async_trait]
pub trait DiscoveryHandler {
async fn discover(
&self,
request: tonic::Request<akri_discovery_utils::discovery::v0::DiscoverRequest>,
) -> Result<tonic::Response<akri_discovery_utils::discovery::v0::DiscoverStream>, tonic::Status>;
}
Private
- EnvVarQuery - This provides a mockable way to query for
get_discovery_handler
to query environment variables.
trait EnvVarQuery {
fn get_env_var(&self, name: &'static str) -> Result<String, VarError>;
}
Dependencies
~67MB
~1M SLoC