pub trait RemoteConfigStorage: Send + Sync {
// Required methods
fn get_last_fetch_status(&self) -> RemoteConfigResult<Option<FetchStatus>>;
fn set_last_fetch_status(
&self,
status: FetchStatus,
) -> RemoteConfigResult<()>;
fn get_last_successful_fetch_timestamp_millis(
&self,
) -> RemoteConfigResult<Option<u64>>;
fn set_last_successful_fetch_timestamp_millis(
&self,
timestamp: u64,
) -> RemoteConfigResult<()>;
fn get_active_config(
&self,
) -> RemoteConfigResult<Option<HashMap<String, String>>>;
fn set_active_config(
&self,
config: HashMap<String, String>,
) -> RemoteConfigResult<()>;
fn get_active_config_etag(&self) -> RemoteConfigResult<Option<String>>;
fn set_active_config_etag(
&self,
etag: Option<String>,
) -> RemoteConfigResult<()>;
fn get_active_config_template_version(
&self,
) -> RemoteConfigResult<Option<u64>>;
fn set_active_config_template_version(
&self,
template_version: Option<u64>,
) -> RemoteConfigResult<()>;
}Expand description
Abstraction over the persistence layer used to store Remote Config metadata.
A synchronous interface keeps usage ergonomic for the in-memory stub while still allowing different backends to be introduced later on.