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>, BoxError>> + Send;
    fn retrieve_config_item_route(
        &self,
        gateway_name: &str,
        route_name: &str,
    ) -> impl Future<Output = Result<Option<SgHttpRoute>, BoxError>> + Send;
    fn retrieve_config_item_route_names(
        &self,
        name: &str,
    ) -> impl Future<Output = Result<Vec<String>, BoxError>> + Send;
    fn retrieve_config_names(
        &self,
    ) -> impl Future<Output = Result<Vec<String>, BoxError>> + Send;
    fn retrieve_all_plugins(
        &self,
    ) -> impl Future<Output = Result<Vec<PluginConfig>, BoxError>> + Send;
    fn retrieve_plugin(
        &self,
        id: &PluginInstanceId,
    ) -> impl Future<Output = Result<Option<PluginConfig>, BoxError>> + Send;
    fn retrieve_plugins_by_code(
        &self,
        code: &str,
    ) -> impl Future<Output = Result<Vec<PluginConfig>, BoxError>> + Send;

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

Required Methods§

Source

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

Source

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

Source

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

Source

fn retrieve_config_names( &self, ) -> impl Future<Output = Result<Vec<String>, BoxError>> + Send

Source

fn retrieve_all_plugins( &self, ) -> impl Future<Output = Result<Vec<PluginConfig>, BoxError>> + Send

Source

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

Source

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

Provided Methods§

Source

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

Source

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

Source

fn retrieve_config( &self, ) -> impl Future<Output = Result<Config, BoxError>> + Send
where Self: Sync, BoxError: 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,