pub struct OpenSearchEndpointConfig {
pub host: Option<String>,
pub port: Option<u16>,
pub username: Option<String>,
pub password: Option<String>,
pub index_name: String,
pub operation: OpenSearchOperation,
pub is_tls: bool,
}Expand description
Configuration parsed from an OpenSearch URI.
Format: opensearch://host:port/index?operation=INDEX&username=X&password=Y
or opensearchs://host:port/index?operation=SEARCH (TLS enabled).
§Fields with Global Defaults (Option)
These fields can be set via global defaults in Camel.toml. They are Option<T>
to distinguish between “not set by URI” (None) and “explicitly set by URI” (Some(v)).
After calling merge_with_global(), all are guaranteed Some.
host- OpenSearch server hostnameport- OpenSearch server portusername- Username for authenticationpassword- Password for authentication
§Fields Without Global Defaults
These fields are per-endpoint only:
index_name- Target index name (required)operation- OpenSearch operation to perform (default: SEARCH)is_tls- Whether to use HTTPS (determined by scheme:opensearchs= true)
Fields§
§host: Option<String>OpenSearch server hostname. None if not set in URI.
port: Option<u16>OpenSearch server port. None if not set in URI.
username: Option<String>Username for authentication. Default: None.
password: Option<String>Password for authentication. Default: None.
index_name: StringTarget index name. Required.
operation: OpenSearchOperationOpenSearch operation to perform. Default: SEARCH.
is_tls: boolWhether to use HTTPS. Determined by scheme (opensearchs = true).
Implementations§
Source§impl OpenSearchEndpointConfig
impl OpenSearchEndpointConfig
pub fn from_uri(uri: &str) -> Result<Self, CamelError>
Sourcepub fn merge_with_global(&self, global: &OpenSearchConfig) -> Self
pub fn merge_with_global(&self, global: &OpenSearchConfig) -> Self
Merge with global defaults.
This method fills in None fields from the provided OpenSearchConfig.
It’s intended to be called after parsing a URI when global component
defaults should be applied.
Trait Implementations§
Source§impl Clone for OpenSearchEndpointConfig
impl Clone for OpenSearchEndpointConfig
Source§fn clone(&self) -> OpenSearchEndpointConfig
fn clone(&self) -> OpenSearchEndpointConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more