pub struct ConnectorConfig {
pub name: String,
pub url: String,
pub username: String,
pub password: String,
pub id_prefix: Option<String>,
pub ws_url: Option<String>,
pub sync_interval_secs: Option<u64>,
pub client_cert: Option<String>,
pub client_key: Option<String>,
pub ca_cert: Option<String>,
pub domain: Option<String>,
}Expand description
Configuration for a remote Haystack server connection.
Fields§
§name: StringDisplay name for this connector.
url: StringBase URL of the remote Haystack API (e.g. “http://remote:8080/api”).
username: StringUsername for SCRAM authentication.
password: StringPassword for SCRAM authentication.
id_prefix: Option<String>Optional tag prefix to namespace remote entity IDs (e.g. “remote1-”).
ws_url: Option<String>WebSocket URL (e.g. “ws://remote:8080/api/ws”). Derived from url if omitted.
sync_interval_secs: Option<u64>Fallback polling interval in seconds (default: 60).
client_cert: Option<String>Path to PEM client certificate for mTLS.
client_key: Option<String>Path to PEM client private key for mTLS.
ca_cert: Option<String>Path to PEM CA certificate for server verification.
domain: Option<String>Optional domain tag for scoping federated queries (e.g. “site:bldg-a”).
Implementations§
Source§impl ConnectorConfig
impl ConnectorConfig
Sourcepub fn effective_ws_url(&self) -> String
pub fn effective_ws_url(&self) -> String
Returns the WebSocket URL. If ws_url is set, returns it directly.
Otherwise derives from url by replacing http:// with ws://
or https:// with wss:// and appending /ws.
Sourcepub fn effective_sync_interval_secs(&self) -> u64
pub fn effective_sync_interval_secs(&self) -> u64
Returns the sync interval in seconds. Defaults to 60 if not set.
Trait Implementations§
Source§impl Clone for ConnectorConfig
impl Clone for ConnectorConfig
Source§fn clone(&self) -> ConnectorConfig
fn clone(&self) -> ConnectorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectorConfig
impl Debug for ConnectorConfig
Source§impl<'de> Deserialize<'de> for ConnectorConfig
impl<'de> Deserialize<'de> for ConnectorConfig
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>,
Auto Trait Implementations§
impl Freeze for ConnectorConfig
impl RefUnwindSafe for ConnectorConfig
impl Send for ConnectorConfig
impl Sync for ConnectorConfig
impl Unpin for ConnectorConfig
impl UnsafeUnpin for ConnectorConfig
impl UnwindSafe for ConnectorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more