Trait medea_control_api_proto::ControlApi
source · pub trait ControlApi {
type Error;
// Required methods
fn create<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Sids, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn apply<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Sids, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
fids: &'life1 [Fid],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
fids: &'life1 [Fid],
) -> Pin<Box<dyn Future<Output = Result<Elements, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn healthz<'life0, 'async_trait>(
&'life0 self,
ping: Ping,
) -> Pin<Box<dyn Future<Output = Result<Pong, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
API allowing to control a media server dynamically, by creating, updating
and destroying pipelines of media Element
s on it.
Both API client and API server should implement this trait.
Required Associated Types§
sourcetype Error
type Error
Error returned by this ControlApi
.
Required Methods§
sourcefn create<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Sids, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Sids, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn apply<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Sids, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Sids, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Applies changes to an existing Element
on the media server, or
creates a new one in case there is no Element
with such ID.
§Idempotent
If no Element
with such ID exists, then it will be created,
otherwise it will be reconfigured. Element
s that exist on the same
hierarchy level, but are not specified in the provided Request
, will
be removed.