Trigger build
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user