mirror of
https://github.com/v0l/zap-stream-core.git
synced 2025-06-19 04:44:58 +00:00
feat: overseer
This commit is contained in:
42
src/overseer/webhook.rs
Normal file
42
src/overseer/webhook.rs
Normal file
@ -0,0 +1,42 @@
|
||||
use crate::ingress::ConnectionInfo;
|
||||
use crate::overseer::{IngressInfo, Overseer};
|
||||
use crate::pipeline::PipelineConfig;
|
||||
use anyhow::Result;
|
||||
use async_trait::async_trait;
|
||||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct WebhookOverseer {
|
||||
url: String,
|
||||
}
|
||||
|
||||
impl WebhookOverseer {
|
||||
pub fn new(url: &str) -> Self {
|
||||
Self {
|
||||
url: url.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Overseer for WebhookOverseer {
|
||||
async fn configure_pipeline(
|
||||
&self,
|
||||
connection: &ConnectionInfo,
|
||||
stream_info: &IngressInfo,
|
||||
) -> Result<PipelineConfig> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn new_segment(
|
||||
&self,
|
||||
pipeline: &Uuid,
|
||||
variant_id: &Uuid,
|
||||
index: u64,
|
||||
duration: f32,
|
||||
path: &PathBuf,
|
||||
) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user