alpha
Login
or
Join now
microcosm.blue
/
microcosm-rs
Star
0
Fork
3
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
Star
0
Fork
3
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
forgot to add storage.rs now
author
phil
date
1 year ago
(Apr 6, 2025, 9:11 PM -0400)
commit
7c1417e9
7c1417e9e6db9fd62ed3a82a39afa10111b5c5c9
parent
a437b994
a437b9945497c0da0ebca9c6a61f00373d67ef99
+18
1 changed file
Expand all
Collapse all
Unified
Split
ufos
src
storage.rs
+18
ufos/src/storage.rs
Reviewed
···
1
1
+
use crate::{error::StorageError, Cursor, EventBatch};
2
2
+
use std::path::Path;
3
3
+
4
4
+
pub trait StorageWhatever<R: StoreReader, W: StoreWriter, C> { // TODO: extract this
5
5
+
fn init(
6
6
+
path: impl AsRef<Path>,
7
7
+
endpoint: String,
8
8
+
force_endpoint: bool,
9
9
+
config: C,
10
10
+
) -> Result<(R, W, Option<Cursor>), StorageError> where Self: Sized;
11
11
+
}
12
12
+
13
13
+
pub trait StoreWriter {
14
14
+
fn insert_batch(&mut self, event_batch: EventBatch) -> Result<(), StorageError>;
15
15
+
}
16
16
+
17
17
+
pub trait StoreReader: Clone {
18
18
+
}