MCPcopy Create free account
hub / github.com/Cosmian/kms / reader

Method reader

crate/server_database/src/stores/sql/sqlite.rs:304–309  ·  view source on GitHub ↗

Returns a reader connection using round-robin distribution.

(&self)

Source from the content-addressed store, hash-verified

302
303 /// Returns a reader connection using round-robin distribution.
304 fn reader(&self) -> &Connection {
305 let idx = self.reader_idx.fetch_add(1, Ordering::Relaxed) % self.readers.len();
306 #[allow(clippy::indexing_slicing)]
307 // SAFETY: idx is computed modulo readers.len(), which is always >= 1.
308 &self.readers[idx]
309 }
310
311 /// Read a value from the `parameters` table by name, or `None` if absent.
312 async fn get_parameter(&self, name: &'static str) -> DbResult<Option<String>> {

Callers 15

get_parameterMethod · 0.80
retrieveMethod · 0.80
retrieve_tagsMethod · 0.80
is_object_owned_byMethod · 0.80
list_uids_for_tagsMethod · 0.80
findMethod · 0.80
find_wrapped_byMethod · 0.80
find_due_for_rotationMethod · 0.80
find_by_rotate_nameMethod · 0.80
find_allMethod · 0.80

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected