Skip to main content

langfuse_client_base/models/
blob_storage_sync_status.rs

1/*
2 * langfuse
3 *
4 * ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml
5 *
6 * The version of the OpenAPI document:
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BlobStorageSyncStatus : Sync status of the blob storage integration: - `disabled` — integration is not enabled - `error` — last export failed (see `lastError` for details) - `idle` — enabled but has never exported yet - `queued` — next export is overdue (`nextSyncAt` is in the past) and waiting to be picked up by the worker - `up_to_date` — all available data has been exported; next export is scheduled for the future  **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your ETL bookmark to determine if new data is available. Note that exports run with a 20-minute lag buffer, so `lastSyncAt` will always be at least 20 minutes behind real-time.
15/// Sync status of the blob storage integration: - `disabled` — integration is not enabled - `error` — last export failed (see `lastError` for details) - `idle` — enabled but has never exported yet - `queued` — next export is overdue (`nextSyncAt` is in the past) and waiting to be picked up by the worker - `up_to_date` — all available data has been exported; next export is scheduled for the future  **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your ETL bookmark to determine if new data is available. Note that exports run with a 20-minute lag buffer, so `lastSyncAt` will always be at least 20 minutes behind real-time.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum BlobStorageSyncStatus {
18    #[serde(rename = "idle")]
19    Idle,
20    #[serde(rename = "queued")]
21    Queued,
22    #[serde(rename = "up_to_date")]
23    UpToDate,
24    #[serde(rename = "disabled")]
25    Disabled,
26    #[serde(rename = "error")]
27    Error,
28}
29
30impl std::fmt::Display for BlobStorageSyncStatus {
31    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
32        match self {
33            Self::Idle => write!(f, "idle"),
34            Self::Queued => write!(f, "queued"),
35            Self::UpToDate => write!(f, "up_to_date"),
36            Self::Disabled => write!(f, "disabled"),
37            Self::Error => write!(f, "error"),
38        }
39    }
40}
41
42impl Default for BlobStorageSyncStatus {
43    fn default() -> BlobStorageSyncStatus {
44        Self::Idle
45    }
46}