Skip to main content

QueryServerConfiguration

Trait QueryServerConfiguration 

Source
pub trait QueryServerConfiguration {
    // Required methods
    fn server_configuration(
        &self,
    ) -> Result<Option<StoredServerConfiguration>, StorageError>;
    fn store_server_configuration(
        &self,
        identifier: &str,
        backend_url: &str,
        response: &[u8],
        fetched_at_ns: i64,
    ) -> Result<(), StorageError>;
    fn record_server_configuration_conflict(
        &self,
        conflicting_identifier: &str,
    ) -> Result<(), StorageError>;
}

Required Methods§

Source

fn server_configuration( &self, ) -> Result<Option<StoredServerConfiguration>, StorageError>

The stored copy, or None when this database has never held one.

Source

fn store_server_configuration( &self, identifier: &str, backend_url: &str, response: &[u8], fetched_at_ns: i64, ) -> Result<(), StorageError>

Write the copy whole: identifier, URL, response, and fetch time. Never touches conflicting_identifier, so a matching refresh cannot erase a recorded conflict (CFG-053).

Source

fn record_server_configuration_conflict( &self, conflicting_identifier: &str, ) -> Result<(), StorageError>

Record that the deployment answered with a different identifier (CFG-051). Does nothing when no row exists yet.

Implementations on Foreign Types§

Source§

impl<T> QueryServerConfiguration for &T

Source§

fn server_configuration( &self, ) -> Result<Option<StoredServerConfiguration>, StorageError>

Source§

fn store_server_configuration( &self, identifier: &str, backend_url: &str, response: &[u8], fetched_at_ns: i64, ) -> Result<(), StorageError>

Source§

fn record_server_configuration_conflict( &self, conflicting_identifier: &str, ) -> Result<(), StorageError>

Implementors§