various: shared HTTP client with connection pooling

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id13c17e9352da970a289f4e3ad909c5b6a6a6964
This commit is contained in:
raf 2026-02-18 17:20:29 +03:00
commit 7ee9ee1159
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 64 additions and 20 deletions

View file

@ -1,4 +1,4 @@
use std::collections::HashMap;
use std::{collections::HashMap, sync::Arc};
use async_trait::async_trait;
use regex::Regex;
@ -20,9 +20,9 @@ pub struct GitHubPlatform {
}
impl GitHubPlatform {
pub fn new(token: Option<String>) -> Self {
pub fn with_client(client: Arc<Client>, token: Option<String>) -> Self {
Self {
client: Client::new(),
client: (*client).clone(),
token,
}
}