holger-server-lib 0.6.9

Holger server library: config, wiring, gRPC service, Rust API
//! Storage endpoints: the backing-store side of the wiring graph.
//!
//! A [`StorageEndpoint`] is a RON-configured store a repository reads from and
//! writes to — sibling node type to `exposed::ExposedEndpoint`, addressed by
//! `ron_name` and resolved by `wire_holger`. `ron_storage_type` selects the
//! backend (`"znippy"` = immutable content-addressed archive at `ron_path`,
//! `"rocksdb"` = mutable KV) and `ron_path` is where it lives on disk.
//!
//! Gotcha: this is still a stub — `backend_from_config` is a no-op that opens no
//! store (the live backend hangs off `Repository::backend_repository`, not here).
//!
//! Unlike the exposed side (whose `wired_out_repositories` FastRoute table is read
//! on every request), a storage endpoint keeps no back-refs to its repositories:
//! the wiring graph flows repo → storage (forward), and nothing here reads a
//! reverse link. Reverse `storage → repos` edges lived here once as write-only
//! `*const Repository` vectors that no consumer ever read — a dead unsafe pointer
//! set — and were removed. If the UI lineage graph ever needs symmetric
//! storage→repo edges, derive them from the repositories' `ron_in`/`ron_out`
//! rather than reintroducing raw back-ref pointers.

use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize)]
pub struct StorageEndpoint {
    pub ron_name: String,
    pub ron_storage_type: String, // "znippy" | "rocksdb"
    pub ron_path: String,
}

impl StorageEndpoint {
    pub fn backend_from_config(&mut self) -> anyhow::Result<()> {
        Ok(())
    }
}