Source, defined in the repo’s root source.go:
Specis the connector’s self-description — identity, supported replication modes, config schema, and resource capabilities. It’s what powers the catalog (see Connectors overview).ValidateandConfigurecheck and apply aConfigbefore any extraction runs.Extractreads into aRecordSinkunder the givenExtractOpts(which resources, which mode, how fast).Teardownreleases whateverConfigureacquired.
Describing your config
ConnectorSpec.Config is a ConfigSchema — a list of ConfigFields, each
with a type (FieldString, FieldSecret, FieldEnum, FieldObject, …), a
scope (ScopeConnection for fields reusable across runs, like a DSN;
ScopePipeline for fields that vary per pipeline, like a table name), and
optionally a VisibleWhen condition for conditional fields in the UI.
Optional capabilities
A source can implement none, some, or all of several optional interfaces — resumable extraction, CDC, resource discovery, rate limiting, and more. See Optional interfaces.Registering it
Add aregister.go that registers your source with the engine, then blank-import
the package wherever it should be available — see Embedding as a
library.