OpStoreFactory

Trait OpStoreFactory 

Source
pub trait OpStoreFactory:
    'static
    + Send
    + Sync
    + Debug {
    // Required methods
    fn default_config(&self, config: &mut Config) -> K2Result<()>;
    fn validate_config(&self, config: &Config) -> K2Result<()>;
    fn create(
        &self,
        builder: Arc<Builder>,
        space_id: SpaceId,
    ) -> BoxFut<'static, K2Result<DynOpStore>>;
}
Expand description

A factory for constructing OpStore instances.

Required Methods§

Source

fn default_config(&self, config: &mut Config) -> K2Result<()>

Help the builder construct a default config from the chosen module factories.

Source

fn validate_config(&self, config: &Config) -> K2Result<()>

Validate configuration.

Source

fn create( &self, builder: Arc<Builder>, space_id: SpaceId, ) -> BoxFut<'static, K2Result<DynOpStore>>

Construct an op store instance.

Implementors§