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 eyre::Context;
|
||||||
use viendesu_core::{
|
use viendesu_core::{
|
||||||
|
@ -8,6 +8,8 @@ use viendesu_core::{
|
||||||
|
|
||||||
use tokio::net;
|
use tokio::net;
|
||||||
|
|
||||||
|
pub use self::config::Config;
|
||||||
|
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
|
||||||
mod context;
|
mod context;
|
||||||
|
@ -21,14 +23,14 @@ pub trait Types: Send + Sync + 'static {
|
||||||
type Service: Service + Clone;
|
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.
|
// TODO: use it.
|
||||||
_ = rx;
|
_ = rx;
|
||||||
let config::Config {
|
let config::Config {
|
||||||
unencrypted,
|
unencrypted,
|
||||||
ssl: _,
|
ssl: _,
|
||||||
} = config;
|
} = &*config;
|
||||||
let unencrypted = unencrypted.expect("SSL-only currently is not supported");
|
let unencrypted = unencrypted.as_ref().expect("SSL-only currently is not supported");
|
||||||
|
|
||||||
if !unencrypted.enable {
|
if !unencrypted.enable {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue