pub struct FileCache { /* private fields */ }Expand description
File-based cache for failover
Implementations§
Source§impl FileCache
impl FileCache
Sourcepub fn save_config(&self, config: &ConfigInfo) -> Result<()>
pub fn save_config(&self, config: &ConfigInfo) -> Result<()>
Save configuration to file cache
Sourcepub fn load_config(
&self,
data_id: &str,
group: &str,
tenant: &str,
) -> Option<ConfigInfo>
pub fn load_config( &self, data_id: &str, group: &str, tenant: &str, ) -> Option<ConfigInfo>
Load configuration from file cache
Sourcepub fn remove_config(
&self,
data_id: &str,
group: &str,
tenant: &str,
) -> Result<()>
pub fn remove_config( &self, data_id: &str, group: &str, tenant: &str, ) -> Result<()>
Remove configuration from file cache
Sourcepub fn save_service(&self, namespace: &str, service: &Service) -> Result<()>
pub fn save_service(&self, namespace: &str, service: &Service) -> Result<()>
Save service info to file cache
Sourcepub fn load_service(
&self,
namespace: &str,
group_name: &str,
service_name: &str,
) -> Option<Service>
pub fn load_service( &self, namespace: &str, group_name: &str, service_name: &str, ) -> Option<Service>
Load service info from file cache
Auto Trait Implementations§
impl Freeze for FileCache
impl RefUnwindSafe for FileCache
impl Send for FileCache
impl Sync for FileCache
impl Unpin for FileCache
impl UnwindSafe for FileCache
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request