Retrieve

Trait Retrieve 

Source
pub trait Retrieve: Sync + Send {
    // Required methods
    fn retrieve_config_item_gateway(
        &self,
        gateway_name: &str,
    ) -> impl Future<Output = Result<Option<SgGateway>, Box<dyn Error + Send + Sync>>> + Send;
    fn retrieve_config_item_route(
        &self,
        gateway_name: &str,
        route_name: &str,
    ) -> impl Future<Output = Result<Option<SgHttpRoute>, Box<dyn Error + Send + Sync>>> + Send;
    fn retrieve_config_item_route_names(
        &self,
        name: &str,
    ) -> impl Future<Output = Result<Vec<String>, Box<dyn Error + Send + Sync>>> + Send;
    fn retrieve_config_names(
        &self,
    ) -> impl Future<Output = Result<Vec<String>, Box<dyn Error + Send + Sync>>> + Send;
    fn retrieve_all_plugins(
        &self,
    ) -> impl Future<Output = Result<Vec<PluginConfig>, Box<dyn Error + Send + Sync>>> + Send;
    fn retrieve_plugin(
        &self,
        id: &PluginInstanceId,
    ) -> impl Future<Output = Result<Option<PluginConfig>, Box<dyn Error + Send + Sync>>> + Send;
    fn retrieve_plugins_by_code(
        &self,
        code: &str,
    ) -> impl Future<Output = Result<Vec<PluginConfig>, Box<dyn Error + Send + Sync>>> + Send;

    // Provided methods
    fn retrieve_config_item_all_routes(
        &self,
        name: &str,
    ) -> impl Future<Output = Result<BTreeMap<String, SgHttpRoute>, Box<dyn Error + Send + Sync>>> + Send { ... }
    fn retrieve_config_item(
        &self,
        name: &str,
    ) -> impl Future<Output = Result<Option<ConfigItem>, Box<dyn Error + Send + Sync>>> + Send { ... }
    fn retrieve_config(
        &self,
    ) -> impl Future<Output = Result<Config, Box<dyn Error + Send + Sync>>> + Send
       where Self: Sync,
             Box<dyn Error + Send + Sync>: Send { ... }
}

Required Methods§

Source

fn retrieve_config_item_gateway( &self, gateway_name: &str, ) -> impl Future<Output = Result<Option<SgGateway>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_config_item_route( &self, gateway_name: &str, route_name: &str, ) -> impl Future<Output = Result<Option<SgHttpRoute>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_config_item_route_names( &self, name: &str, ) -> impl Future<Output = Result<Vec<String>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_config_names( &self, ) -> impl Future<Output = Result<Vec<String>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_all_plugins( &self, ) -> impl Future<Output = Result<Vec<PluginConfig>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_plugin( &self, id: &PluginInstanceId, ) -> impl Future<Output = Result<Option<PluginConfig>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_plugins_by_code( &self, code: &str, ) -> impl Future<Output = Result<Vec<PluginConfig>, Box<dyn Error + Send + Sync>>> + Send

Provided Methods§

Source

fn retrieve_config_item_all_routes( &self, name: &str, ) -> impl Future<Output = Result<BTreeMap<String, SgHttpRoute>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_config_item( &self, name: &str, ) -> impl Future<Output = Result<Option<ConfigItem>, Box<dyn Error + Send + Sync>>> + Send

Source

fn retrieve_config( &self, ) -> impl Future<Output = Result<Config, Box<dyn Error + Send + Sync>>> + Send
where Self: Sync, Box<dyn Error + Send + Sync>: Send,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Retrieve for K8s

Source§

impl Retrieve for Memory

Source§

impl<F> Retrieve for Fs<F>
where F: ConfigFormat + Send + Sync,

Source§

impl<F> Retrieve for Redis<F>
where F: ConfigFormat + Send + Sync,