+1
-1
constellation/src/consumer/mod.rs
+1
-1
constellation/src/consumer/mod.rs
+4
constellation/src/lib.rs
+4
constellation/src/lib.rs
+6
-10
constellation/src/main.rs
constellation/src/bin/main.rs
+6
-10
constellation/src/main.rs
constellation/src/bin/main.rs
···
1
-
mod consumer;
2
-
mod server;
3
-
mod storage;
4
-
5
1
use anyhow::Result;
6
2
use clap::{Parser, ValueEnum};
7
3
use metrics_exporter_prometheus::PrometheusBuilder;
···
15
11
use tokio::runtime;
16
12
use tokio_util::sync::CancellationToken;
17
13
18
-
use consumer::consume;
19
-
use server::serve;
14
+
use constellation::consumer::consume;
15
+
use constellation::server::serve;
20
16
#[cfg(feature = "rocks")]
21
-
use storage::RocksStorage;
22
-
use storage::{LinkReader, LinkStorage, MemStorage, StorageStats};
17
+
use constellation::storage::RocksStorage;
18
+
use constellation::storage::{LinkReader, LinkStorage, MemStorage, StorageStats};
23
19
24
20
const MONITOR_INTERVAL: time::Duration = time::Duration::from_secs(2);
25
21
···
222
218
223
219
#[cfg(test)]
224
220
mod tests {
225
-
use crate::consumer::get_actionable;
226
-
use crate::storage::{LinkReader, LinkStorage, MemStorage};
221
+
use constellation::consumer::get_actionable;
222
+
use constellation::storage::{LinkReader, LinkStorage, MemStorage};
227
223
228
224
#[test]
229
225
fn test_create_like_integrated() {
+1
-1
constellation/src/server/mod.rs
+1
-1
constellation/src/server/mod.rs
+7
-1
constellation/src/storage/mem_store.rs
+7
-1
constellation/src/storage/mem_store.rs
···
1
1
use super::{LinkReader, LinkStorage, PagedAppendingCollection, StorageStats};
2
+
use crate::{ActionableEvent, CountsByCount, Did, RecordId};
2
3
use anyhow::Result;
3
-
use constellation::{ActionableEvent, CountsByCount, Did, RecordId};
4
4
use links::CollectedLink;
5
5
use std::collections::{HashMap, HashSet};
6
6
use std::sync::{Arc, Mutex};
···
101
101
}
102
102
data.links.remove(did); // nb: this is removing by a whole prefix in kv context
103
103
data.dids.remove(did);
104
+
}
105
+
}
106
+
107
+
impl Default for MemStorage {
108
+
fn default() -> Self {
109
+
Self::new()
104
110
}
105
111
}
106
112
+1
-1
constellation/src/storage/mod.rs
+1
-1
constellation/src/storage/mod.rs
+1
-1
constellation/src/storage/rocks_store.rs
+1
-1
constellation/src/storage/rocks_store.rs
···
1
1
use super::{ActionableEvent, LinkReader, LinkStorage, PagedAppendingCollection, StorageStats};
2
+
use crate::{CountsByCount, Did, RecordId};
2
3
use anyhow::{bail, Result};
3
4
use bincode::Options as BincodeOptions;
4
-
use constellation::{CountsByCount, Did, RecordId};
5
5
use links::CollectedLink;
6
6
use rocksdb::{
7
7
AsColumnFamilyRef, ColumnFamilyDescriptor, DBWithThreadMode, IteratorMode, MergeOperands,