feat: overseer

This commit is contained in:
2024-11-15 15:54:51 +00:00
parent 04df558a2d
commit 60199cfa06
27 changed files with 3262 additions and 578 deletions

42
src/overseer/webhook.rs Normal file
View 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!()
}
}