chore: embed Config into Source (#1864)

To keep a persistent backend storage for configuration, we will have to
keep a single source of truth. This involves supporting bi-directional
conversion between Config and Source.


This PR make the following changes:
* Embed Config in Source
* Add `ToConfig()` to extract Config from Source.
This commit is contained in:
Yuan Teoh
2025-11-13 14:11:25 -08:00
committed by GitHub
parent 46b072c3f4
commit ae0c29254a
42 changed files with 299 additions and 286 deletions

View File

@@ -137,8 +137,10 @@ func TestUpdateServer(t *testing.T) {
newSources := map[string]sources.Source{
"example-source": &alloydbpg.Source{
Name: "example-alloydb-source",
Kind: "alloydb-postgres",
Config: alloydbpg.Config{
Name: "example-alloydb-source",
Kind: "alloydb-postgres",
},
},
}
newAuth := map[string]auth.AuthService{"example-auth": nil}