search-replica
search-replica copied to clipboard
Split config discovery and configuration logic
Make configuration pluggable and implement:
- Basic mandatory schema discovery
Optional:
- Autodiscovery based on schema, PKs, FKs
- Conftags based config
- External config
Each config applies changes on top of previous one in same order as passed to client.
E.G:
posgtres.New(
discovery.WithSchema(), // parse existing PKs, FKs, Indecies. Constraints
discovery.WithConftags("prefix_"), // Apply conftags changes E.G: skip some fields
discovery.WithFileconfig(yamlfile), // Apply additional external config, E.G: change index name
)