pub trait GitStorage: Send + Sync {
// Required methods
fn store(
&self,
repo_path: &Path,
session_id: &str,
hail_jsonl: &[u8],
meta_json: &[u8],
) -> Result<String>;
fn load(
&self,
repo_path: &Path,
session_id: &str,
) -> Result<Option<Vec<u8>>>;
fn list(&self, repo_path: &Path) -> Result<Vec<String>>;
}Expand description
Trait for git-based session storage backends.
Required Methods§
Sourcefn store(
&self,
repo_path: &Path,
session_id: &str,
hail_jsonl: &[u8],
meta_json: &[u8],
) -> Result<String>
fn store( &self, repo_path: &Path, session_id: &str, hail_jsonl: &[u8], meta_json: &[u8], ) -> Result<String>
Store a session in the git repository at repo_path.
Creates the orphan branch if it doesn’t exist, then adds/updates blobs
for the HAIL JSONL and metadata JSON under v1/<prefix>/<id>.*.
Returns the relative path within the branch (e.g. v1/ab/abcdef.hail.jsonl).