update eva

This commit is contained in:
Aleksandr 2025-10-06 23:18:29 +03:00
parent d3c25799cd
commit 39f6483950

View file

@ -1,4 +1,4 @@
use eva::{perfect_derive, supervisor::SlaveRx};
use eva::{perfect_derive, component_configs::ComponentConfig, supervisor::SlaveRx};
use eyre::Context;
use viendesu_core::{
@ -8,6 +8,8 @@ use viendesu_core::{
use tokio::net;
pub use self::config::Config;
pub mod config;
mod context;
@ -21,14 +23,14 @@ pub trait Types: Send + Sync + 'static {
type Service: Service + Clone;
}
pub async fn serve(rx: SlaveRx, config: config::Config, router: axum::Router) -> eyre::Result<()> {
pub async fn serve(rx: SlaveRx, config: ComponentConfig<Config>, router: axum::Router) -> eyre::Result<()> {
// TODO: use it.
_ = rx;
let config::Config {
unencrypted,
ssl: _,
} = config;
let unencrypted = unencrypted.expect("SSL-only currently is not supported");
} = &*config;
let unencrypted = unencrypted.as_ref().expect("SSL-only currently is not supported");
if !unencrypted.enable {
return Ok(());