Skip to main content

espresso_api/v1/
config.rs

1//! V1 config API.
2
3use async_trait::async_trait;
4use serde::Serialize;
5
6#[async_trait]
7pub trait ConfigApi {
8    type HotShotConfig: Serialize + Send + Sync + 'static;
9    type RuntimeConfig: Serialize + Send + Sync + 'static;
10
11    async fn hotshot_config(&self) -> anyhow::Result<Self::HotShotConfig>;
12
13    async fn env(&self) -> anyhow::Result<Vec<String>>;
14
15    async fn runtime_config(&self) -> anyhow::Result<Self::RuntimeConfig>;
16}