vector_config::component

Type Alias ProviderDescription

Source
pub type ProviderDescription = ComponentDescription<ProviderComponent>;

Aliased Type§

struct ProviderDescription { /* private fields */ }

Implementations

Source§

impl<T> ComponentDescription<T>
where T: ComponentMarker + Sized + 'static, iter<ComponentDescription<T>>: IntoIterator<Item = &'static ComponentDescription<T>>,

Source

pub const fn new<C: GenerateConfig + Configurable + 'static>( component_name: &'static str, label: &'static str, logical_name: &'static str, description: &'static str, ) -> Self

Creates a new ComponentDescription.

This creates a component description for a component identified both by the given component type T and the component name. As such, if T is SourceComponent, and the name is stdin, you would say that the component is a “source called stdin”.

The type parameter C must be the component’s configuration type that implements Configurable and GenerateConfig.

Source

pub fn example(component_name: &str) -> Result<Value, ExampleError>

Generates an example configuration for the component with the given component name.

§Errors

If no component, identified by T and the given name, is registered, or if there is an error generating the example configuration, an error variant will be returned.

Source

pub fn types() -> Vec<&'static str>

Gets a sorted list of all registered components of the given component type.

Source

pub fn generate_schemas( gen: &RefCell<SchemaGenerator>, ) -> Result<SchemaObject, GenerateError>

Generate a schema object covering all the descriptions of this type.

Trait Implementations§