hyperinfer-core 0.1.1

Core types and traits for HyperInfer LLM Gateway
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use async_trait::async_trait;

use crate::error::ConfigError;
use crate::redis::PolicyUpdate;
use crate::types::Config;

#[async_trait]
pub trait ConfigStore: Clone + Send + Sync + 'static {
    async fn fetch_config(&self) -> Result<Config, ConfigError>;
    async fn publish_config_update(&self, config: &Config) -> Result<(), ConfigError>;
    async fn publish_policy_update(&self, update: &PolicyUpdate) -> Result<(), ConfigError>;
    async fn ping(&self) -> Result<(), ConfigError>;
}