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

Method reader

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

Returns a reader connection using round-robin distribution.

(&self)

Source from the content-addressed store, hash-verified

252
253 /// Returns a reader connection using round-robin distribution.
254 fn reader(&self) -> &Connection {
255 let idx = self.reader_idx.fetch_add(1, Ordering::Relaxed) % self.readers.len();
256 #[allow(clippy::indexing_slicing)]
257 // SAFETY: idx is computed modulo readers.len(), which is always >= 1.
258 &self.readers[idx]
259 }
260
261 /// Read a value from the `parameters` table by name, or `None` if absent.
262 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
get_db_stateMethod · 0.80

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected