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

Method reader

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

Returns a reader connection using round-robin distribution.

(&self)

Source from the content-addressed store, hash-verified

481
482 /// Returns a reader connection using round-robin distribution.
483 fn reader(&self) -> &Connection {
484 let idx = self.reader_idx.fetch_add(1, Ordering::Relaxed) % self.readers.len();
485 #[allow(clippy::indexing_slicing)]
486 // SAFETY: idx is computed modulo readers.len(), which is always >= 1.
487 &self.readers[idx]
488 }
489
490 /// Read a value from the `parameters` table by name, or `None` if absent.
491 async fn get_parameter(&self, name: &'static str) -> DbResult<Option<String>> {

Callers 15

get_parameterMethod · 0.80
retrieveMethod · 0.80
retrieve_stateMethod · 0.80
retrieve_tagsMethod · 0.80
is_object_owned_byMethod · 0.80
list_uids_for_tagsMethod · 0.80
find_wrapped_byMethod · 0.80
find_due_for_rotationMethod · 0.80
find_by_rotate_nameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected