aiway-plugin 0.1.2

The aiway plugin lib
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use reqwest::{Client, ClientBuilder};
use std::sync::LazyLock;

pub(crate) struct Network {
    pub(crate) client: Client,
}
impl Network {
    pub fn new() -> Self {
        let client = ClientBuilder::default()
            .connect_timeout(std::time::Duration::from_secs(5))
            .build()
            .unwrap();
        Self { client }
    }
}

pub(crate) static NETWORK: LazyLock<Network> = LazyLock::new(Network::new);