RuntimeRepository

Trait RuntimeRepository 

Source
pub trait RuntimeRepository<DB: Database>: DatabaseRepository<DB> {
    // Required methods
    fn get_all_runtime_configs<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeConfig>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_runtime_config<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 RuntimeConfig,
    ) -> Pin<Box<dyn Future<Output = Result<Uuid, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_model_runtime<'life0, 'async_trait>(
        &'life0 self,
        model_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ModelRuntime>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_model_runtime<'life0, 'life1, 'async_trait>(
        &'life0 self,
        runtime: &'life1 ModelRuntime,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_model_runtime<'life0, 'life1, 'async_trait>(
        &'life0 self,
        runtime: &'life1 ModelRuntime,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_model_runtime<'life0, 'async_trait>(
        &'life0 self,
        runtime_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn record_runtime_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        metrics: &'life1 RuntimeMetrics,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_runtime_metrics_history<'life0, 'async_trait>(
        &'life0 self,
        runtime_id: Uuid,
        from: DateTime<Utc>,
        to: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeMetrics>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn record_runtime_event<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 RuntimeEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_runtime_events<'life0, 'async_trait>(
        &'life0 self,
        runtime_id: Uuid,
        limit: Option<i64>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEvent>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

运行时数据库仓库

Required Methods§

Source

fn get_all_runtime_configs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeConfig>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取所有运行时配置

Source

fn create_runtime_config<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 RuntimeConfig, ) -> Pin<Box<dyn Future<Output = Result<Uuid, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

创建运行时配置

Source

fn get_model_runtime<'life0, 'async_trait>( &'life0 self, model_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ModelRuntime>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取模型运行时

Source

fn create_model_runtime<'life0, 'life1, 'async_trait>( &'life0 self, runtime: &'life1 ModelRuntime, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

创建模型运行时

Source

fn update_model_runtime<'life0, 'life1, 'async_trait>( &'life0 self, runtime: &'life1 ModelRuntime, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

更新模型运行时

Source

fn delete_model_runtime<'life0, 'async_trait>( &'life0 self, runtime_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

删除模型运行时

Source

fn record_runtime_metrics<'life0, 'life1, 'async_trait>( &'life0 self, metrics: &'life1 RuntimeMetrics, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

记录运行时指标

Source

fn get_runtime_metrics_history<'life0, 'async_trait>( &'life0 self, runtime_id: Uuid, from: DateTime<Utc>, to: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeMetrics>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取运行时指标历史

Source

fn record_runtime_event<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 RuntimeEvent, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

记录运行时事件

Source

fn get_runtime_events<'life0, 'async_trait>( &'life0 self, runtime_id: Uuid, limit: Option<i64>, ) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEvent>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取运行时事件

Implementors§