1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! The backend-assembler seam.
//!
//! The daemon owns the pipeline but not the concrete backends behind it. A
//! [`Backends`] implementation — supplied by the composition root (the CLI) —
//! turns a validated [`Config`] into the source capture, its document builder,
//! and the sink, all as trait objects. This keeps the daemon depending only on
//! the source/sink *abstractions* (`sources-core`/`sinks-core`), never on a
//! concrete Postgres/OpenSearch crate.
use Arc;
use Config;
use Sink;
use ChangeCapture;
use DocumentBuilder;
use crateDaemonOptions;
/// A source capture paired with the document builder over the same source.
///
/// They are built together because both read from one source and share its
/// connection/config — the capture tails changes and reports lag; the builder
/// resolves changed rows to documents.
/// Builds the concrete pipeline backends from a validated [`Config`].
///
/// The daemon depends only on this trait; the composition root (the CLI) is the
/// single place that names concrete backends. Connection and credentials are
/// resolved by the implementation, in the environment that *runs* the pipeline —
/// so a compiled `flusso.lock` carries no secret it wasn't given literally.