Skip to main content

OpensearchSink

Struct OpensearchSink 

Source
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: Secret

Cluster 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: bool

Verify TLS certificates. Set false for local dev. Default: true.

§batch_size: u32

Documents per bulk request. Default: 1000.

§max_bytes: u64

Maximum 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: u64

Request timeout in seconds. Default: 30.

§max_retries: u32

Transient failure retries. Default: 3.

§pipeline: Option<String>

Optional ingest pipeline applied on index.

§number_of_shards: u32

Primary shards for each created index. Default: 1.

§number_of_replicas: u32

Replica shards for each created index. Default: 1.

§refresh_interval: String

OpenSearch 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: TextAnalysis

Which analysis backend the built-in flusso_* analyzers use. Default: Builtin.

§auto_subfields: bool

Whether 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

Source

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.

Source

pub fn resolve_username( &self, name: &SinkName, ) -> Result<Option<String>, ResolveError>

Resolve the basic-auth username, applying <NAME>_OPENSEARCH_USERNAME.

Source

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

Source§

fn clone(&self) -> OpensearchSink

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OpensearchSink

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for OpensearchSink

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<OpensearchSink, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for OpensearchSink

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.