Trigger build

This commit is contained in:
Dominik Werder
2023-09-06 14:25:02 +02:00
parent 8e7567008f
commit 76915d5d82
4 changed files with 28 additions and 13 deletions

View File

@@ -53,6 +53,7 @@ pub struct ChannelAdd {
#[derive(Debug)]
pub enum ConnSetCmd {
ChannelAdd(ChannelAdd),
CheckHealth,
Shutdown,
}
@@ -87,6 +88,18 @@ impl CaConnSetCtrl {
self.tx.send(CaConnSetEvent::ConnSetCmd(cmd)).await?;
Ok(())
}
pub async fn shutdown(&self) -> Result<(), Error> {
let cmd = ConnSetCmd::Shutdown;
self.tx.send(CaConnSetEvent::ConnSetCmd(cmd)).await?;
Ok(())
}
pub async fn check_health(&self) -> Result<(), Error> {
let cmd = ConnSetCmd::CheckHealth;
self.tx.send(CaConnSetEvent::ConnSetCmd(cmd)).await?;
Ok(())
}
}
pub struct CaConnSet {
@@ -138,7 +151,12 @@ impl CaConnSet {
match ev {
CaConnSetEvent::ConnSetCmd(cmd) => match cmd {
ConnSetCmd::ChannelAdd(x) => self.add_channel_to_addr(x).await,
ConnSetCmd::CheckHealth => {
error!("TODO implement check health");
Ok(())
}
ConnSetCmd::Shutdown => {
debug!("shutdown received");
self.shutdown = true;
Ok(())
}