pub struct Config {
pub source: Source,
pub sinks: BTreeMap<SinkName, Sink>,
pub indexes: BTreeMap<IndexName, Index>,
pub on_error: FailurePolicy,
pub server: ServerConfig,
pub prefix: String,
}Expand description
A whole deployment: where data comes from, where it goes, and what to build.
Secrets are deferred (a literal or an environment reference, see
Secret), so a serialized Config carries only the
literals it was given and resolves the rest at runtime. Debug output redacts
literal secrets either way.
Fields§
§source: Source§sinks: BTreeMap<SinkName, Sink>§indexes: BTreeMap<IndexName, Index>§on_error: FailurePolicyWhat to do when a sink rejects a document at the item level. The default
for every index; override per index with Index::on_error.
server: ServerConfigBind addresses for the operational HTTP surfaces. Read by the binary, not
the daemon — transport is the binary’s concern. Env/flag overrides win;
see ServerConfig.
prefix: StringLiteral prefix prepended to every index name flusso owns (indexes,
aliases, and the flusso_meta index), so several deployments can share
one OpenSearch cluster without colliding. Empty (the default) means no
prefix. The binary layers the --index-prefix flag / FLUSSO_INDEX_PREFIX
env var on top (which win); validated at resolution time with
validate_index_prefix. The
flusso-query client must apply the same prefix at runtime to read back.
Implementations§
Source§impl Config
impl Config
Sourcepub fn resolve_mappings(&self) -> Vec<IndexMapping>
pub fn resolve_mappings(&self) -> Vec<IndexMapping>
Project every enabled index into a fully-typed IndexMapping,
using only the declared schema. The engine runs it up front so each index
is created from a complete description without touching the database.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<ConfigToml> for Config
Infallible (secrets are deferred, URLs validated at resolution time), so this
is a From; the blanket impl still gives callers a TryFrom<ConfigToml>.
impl From<ConfigToml> for Config
Infallible (secrets are deferred, URLs validated at resolution time), so this
is a From; the blanket impl still gives callers a TryFrom<ConfigToml>.