pub struct SourceConfig {Show 13 fields
pub source_type: SourceType,
pub url: Option<String>,
pub url_env: Option<String>,
pub url_file: Option<String>,
pub host: Option<String>,
pub port: Option<u16>,
pub user: Option<String>,
pub password: Option<String>,
pub password_env: Option<String>,
pub database: Option<String>,
pub environment: Option<SourceEnvironment>,
pub tuning: Option<TuningConfig>,
pub tls: Option<TlsConfig>,
}Fields§
§source_type: SourceType§url: Option<String>§url_env: Option<String>§url_file: Option<String>§host: Option<String>§port: Option<u16>§user: Option<String>§password: Option<String>§password_env: Option<String>§database: Option<String>§environment: Option<SourceEnvironment>Operational profile of the source database.
Selects the default tuning profile when none is explicitly set in
source.tuning.profile or export.tuning.profile:
environment | default profile |
|---|---|
production (default) | balanced (50 ms throttle, 10 k batch, retries) |
replica | balanced |
local | fast (no throttle, 50 k batch — saves ~30% wall on localhost) |
Explicit tuning.profile: always wins over this hint.
tuning: Option<TuningConfig>§tls: Option<TlsConfig>Transport security settings (ADR: SecOps). When absent, Rivet connects
without TLS — a warning is emitted so operators are aware. See TlsConfig.
Implementations§
Source§impl SourceConfig
impl SourceConfig
Sourcepub fn redact_for_artifact(&self) -> (Self, bool)
pub fn redact_for_artifact(&self) -> (Self, bool)
Return a copy of this config with all plaintext credential material stripped,
safe to embed in a persisted [crate::plan::PlanArtifact] (ADR-0005 PA9).
Redaction rules:
password→ alwaysNone(plaintext password never leaves the process).urlcontaininguser[:password]@→ userinfo segment replaced with"REDACTED".url_env,url_file,password_env— kept (env var names and file paths are references, not secrets;applyneeds them to re-resolve credentials).host,port,user,database— kept (structured connection metadata).
If a plaintext password or url is redacted, callers should surface a warning
to the operator so env/file-based auth is available at apply time.
pub fn resolve_url(&self) -> Result<String>
Trait Implementations§
Source§impl Clone for SourceConfig
impl Clone for SourceConfig
Source§fn clone(&self) -> SourceConfig
fn clone(&self) -> SourceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceConfig
impl Debug for SourceConfig
Source§impl<'de> Deserialize<'de> for SourceConfig
impl<'de> Deserialize<'de> for SourceConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for SourceConfig
impl JsonSchema for SourceConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for SourceConfig
impl RefUnwindSafe for SourceConfig
impl Send for SourceConfig
impl Sync for SourceConfig
impl Unpin for SourceConfig
impl UnsafeUnpin for SourceConfig
impl UnwindSafe for SourceConfig
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
Mutably borrows from an owned value. Read more