update eva
This commit is contained in:
parent
d3c25799cd
commit
39f6483950
1 changed files with 6 additions and 4 deletions
|
@ -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(());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue