pub struct OpensearchSink {Show 14 fields
pub url: Secret,
pub username: Option<Secret>,
pub password: Option<Secret>,
pub tls_verify: bool,
pub batch_size: u32,
pub max_bytes: u64,
pub timeout_secs: u64,
pub max_retries: u32,
pub pipeline: Option<String>,
pub number_of_shards: u32,
pub number_of_replicas: u32,
pub refresh_interval: String,
pub text_analysis: TextAnalysis,
pub auto_subfields: bool,
}Expand description
Per-backend configuration for an OpenSearch destination. The Sink enum that
selects between this and StdoutSink is a composition concern and lives in
the schema crate; the backend sinks read these settings directly.
Fields§
§url: SecretCluster URL, resolved at runtime (<NAME>_OPENSEARCH_URL overrides).
username: Option<Secret>Basic-auth user, resolved at runtime (<NAME>_OPENSEARCH_USERNAME).
password: Option<Secret>Basic-auth password, resolved at runtime (<NAME>_OPENSEARCH_PASSWORD).
tls_verify: boolVerify TLS certificates. Set false for local dev. Default: true.
batch_size: u32Documents per bulk request. Default: 1000.
max_bytes: u64Maximum serialized size of a single bulk request, in bytes. A flush is
split so no request exceeds this, independent of batch_size, keeping
requests under OpenSearch’s http.max_content_length (100 MB default).
Default: 10 MiB. A single document larger than this is sent on its own.
timeout_secs: u64Request timeout in seconds. Default: 30.
max_retries: u32Transient failure retries. Default: 3.
pipeline: Option<String>Optional ingest pipeline applied on index.
number_of_shards: u32Primary shards for each created index. Default: 1.
number_of_replicas: u32Replica shards for each created index. Default: 1.
refresh_interval: StringOpenSearch refresh_interval applied to each index once its backfill
completes — the steady-state visibility ceiling (e.g. "10s", "1s",
or "-1" to disable automatic refresh). Indexes are seeded with refresh
off (-1) and handed this value afterwards. flusso forces an immediate
refresh on any flush that catches the pipeline up, so this only bounds
search staleness while a backlog is draining. Default: "10s".
text_analysis: TextAnalysisWhich analysis backend the built-in flusso_* analyzers use. Default:
Builtin.
auto_subfields: boolWhether the sink automatically enriches text/keyword fields with a
good analyzer and the keyword / keyword_lowercase / text subfields.
A field’s explicit mapping always wins. Default: true.
Implementations§
Source§impl OpensearchSink
impl OpensearchSink
Sourcepub fn resolve_url(&self, name: &SinkName) -> Result<HttpUrl, ResolveError>
pub fn resolve_url(&self, name: &SinkName) -> Result<HttpUrl, ResolveError>
Resolve the cluster URL in the current environment, applying the
<NAME>_OPENSEARCH_URL deployment override for the sink named name.
Sourcepub fn resolve_username(
&self,
name: &SinkName,
) -> Result<Option<String>, ResolveError>
pub fn resolve_username( &self, name: &SinkName, ) -> Result<Option<String>, ResolveError>
Resolve the basic-auth username, applying <NAME>_OPENSEARCH_USERNAME.
Sourcepub fn resolve_password(
&self,
name: &SinkName,
) -> Result<Option<String>, ResolveError>
pub fn resolve_password( &self, name: &SinkName, ) -> Result<Option<String>, ResolveError>
Resolve the basic-auth password, applying <NAME>_OPENSEARCH_PASSWORD.
Trait Implementations§
Source§impl Clone for OpensearchSink
impl Clone for OpensearchSink
Source§fn clone(&self) -> OpensearchSink
fn clone(&self) -> OpensearchSink
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more