Update archipelago: API, auth, container, parmanode, performance, security
- API handler, RPC, and server updates - Auth and coding rules - Container data manager, dev orchestrator, health monitor, podman client - Parmanode script runner - Performance resource manager - Security container policies and secrets manager - Add build scripts and documentation
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
use crate::api::ApiHandler;
|
||||
use crate::config::Config;
|
||||
use anyhow::Result;
|
||||
use hyper_util::rt::TokioIo;
|
||||
use hyper_util::server::conn::auto::Builder as AutoBuilder;
|
||||
use hyper::server::conn::Http;
|
||||
use hyper::service::service_fn;
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::Arc;
|
||||
use tokio::net::TcpListener;
|
||||
use hyper::service::service_fn;
|
||||
use tracing::{error, info};
|
||||
use tracing::error;
|
||||
|
||||
pub struct Server {
|
||||
config: Config,
|
||||
_config: Config,
|
||||
api_handler: Arc<ApiHandler>,
|
||||
}
|
||||
|
||||
@@ -19,7 +18,7 @@ impl Server {
|
||||
let api_handler = Arc::new(ApiHandler::new(config.clone()).await?);
|
||||
|
||||
Ok(Self {
|
||||
config,
|
||||
_config: config,
|
||||
api_handler,
|
||||
})
|
||||
}
|
||||
@@ -36,7 +35,6 @@ impl Server {
|
||||
}
|
||||
};
|
||||
|
||||
let io = TokioIo::new(stream);
|
||||
let handler = self.api_handler.clone();
|
||||
|
||||
tokio::spawn(async move {
|
||||
@@ -48,14 +46,8 @@ impl Server {
|
||||
}
|
||||
});
|
||||
|
||||
let mut builder = AutoBuilder::new(
|
||||
hyper_util::rt::TokioExecutor::new()
|
||||
);
|
||||
// Use HTTP/1.1 only for now
|
||||
builder = builder.http1_only();
|
||||
|
||||
if let Err(e) = builder
|
||||
.serve_connection(io, service)
|
||||
if let Err(e) = Http::new()
|
||||
.serve_connection(stream, service)
|
||||
.await
|
||||
{
|
||||
error!("Error serving connection from {}: {}", peer_addr, e);
|
||||
|
||||
Reference in New Issue
Block a user