chanmgr: Introduce get_or_launch_internal
This is going to be useful in a moment.
This commit is contained in:
parent
61ab684f74
commit
3c23c2333a
|
@ -120,6 +120,16 @@ impl<CF: ChannelFactory> AbstractChanMgr<CF> {
|
|||
&self,
|
||||
ident: <<CF as ChannelFactory>::Channel as AbstractChannel>::Ident,
|
||||
target: CF::BuildSpec,
|
||||
) -> Result<(CF::Channel, ChanProvenance)> {
|
||||
let chan = self.get_or_launch_internal(ident, target).await?;
|
||||
Ok(chan)
|
||||
}
|
||||
|
||||
/// Get a channel whose identity is `ident` - internal implementation
|
||||
async fn get_or_launch_internal(
|
||||
&self,
|
||||
ident: <<CF as ChannelFactory>::Channel as AbstractChannel>::Ident,
|
||||
target: CF::BuildSpec,
|
||||
) -> Result<(CF::Channel, ChanProvenance)> {
|
||||
use map::ChannelState::*;
|
||||
|
||||
|
|
Loading…
Reference in New Issue