pub trait FilterFactory: Sync + Send {
    fn name(&self) -> &'static str;
    fn config_schema(&self) -> RootSchema;
    fn create_filter(
        &self,
        args: CreateFilterArgs
    ) -> Result<FilterInstance, Error>; fn encode_config_to_protobuf(&self, args: Value) -> Result<Any, Error>; fn encode_config_to_json(&self, args: Any) -> Result<Value, Error>; fn require_config(
        &self,
        config: Option<ConfigType>
    ) -> Result<ConfigType, Error> { ... } }
Expand description

Provides the name and creation function for a given Filter.

Required Methods

name returns the configuration name for the Filter The returned string identifies the filter item’s path with the following format: quilkin.filters.<module>.<version>.<item-name> where: : The rust module name containing the filter item : The filter’s version. : The name of the rust item (e.g enum, struct) implementing the filter. For example the v1alpha1 version of the debug filter has the name: quilkin.filters.debug_filter.v1alpha1.Debug

Returns the schema for the configuration of the Filter.

Returns a filter based on the provided arguments.

Converts YAML configuration into its Protobuf equivalvent.

Converts YAML configuration into its Protobuf equivalvent.

Provided Methods

Returns the ConfigType from the provided Option, otherwise it returns Error::MissingConfig if the Option is None.

Implementations on Foreign Types

Returns a filter based on the provided arguments.

Implementors