generated from Patagia/template-nix
parent
a5e3170d37
commit
b07d037a7d
11 changed files with 1016 additions and 39 deletions
agent
|
@ -7,10 +7,14 @@ license = "MPL-2.0"
|
|||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
clap.workspace = true
|
||||
progenitor.workspace = true
|
||||
reqwest.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
tokio.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-chrome.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
tracing.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "patagia-agent"
|
||||
|
|
|
@ -3,6 +3,8 @@ use clap::Parser;
|
|||
use tokio::time::{sleep, Duration};
|
||||
use tracing_subscriber::prelude::*;
|
||||
|
||||
mod patagia_api;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Cli {}
|
||||
|
@ -19,6 +21,10 @@ async fn main() -> Result<()> {
|
|||
|
||||
tracing::info!("Patagia Agent");
|
||||
|
||||
let client = patagia_api::Client::new("http://localhost:9474");
|
||||
let result = client.version().await?;
|
||||
tracing::info!("Result: {:?}", result);
|
||||
|
||||
sleep(Duration::from_secs(3)).await;
|
||||
Ok(())
|
||||
}
|
||||
|
|
3
agent/src/patagia_api.rs
Normal file
3
agent/src/patagia_api.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
use progenitor::generate_api;
|
||||
|
||||
generate_api!(spec = "../api.json", derives = [schemars::JsonSchema]);
|
Loading…
Add table
Add a link
Reference in a new issue