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>,
}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.
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 more