pub struct Source {
pub source_type: SourceType,
pub connection: Option<ConnectionSpec>,
pub manage_publication: bool,
}Expand description
The database documents are read from. Today that’s always Postgres.
The connection is stored unresolved (a literal or an environment reference)
and resolved at runtime by resolve_connection_url,
so a compiled config carries no secret it wasn’t given literally.
Fields§
§source_type: SourceType§connection: Option<ConnectionSpec>How to reach the database. None means “rely entirely on
DATABASE_URL”, checked when the connection is resolved.
manage_publication: boolWhether flusso may auto-create/extend the publication to cover every
table the indexes read. Defaults to true; a CLI flag can override it
per run. See crate docs and the publication-management design.
Implementations§
Source§impl Source
impl Source
Sourcepub fn resolve_connection_url(&self) -> Result<ConnectionUrl, ResolveError>
pub fn resolve_connection_url(&self) -> Result<ConnectionUrl, ResolveError>
Resolve the connection URL now, in the current environment, applying the
DATABASE_URL deployment override. Call this at connect time, not at
load time, so the value is read where the pipeline runs.