search-replica icon indicating copy to clipboard operation
search-replica copied to clipboard

Split config discovery and configuration logic

Open ubombi opened this issue 1 year ago • 0 comments

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
)

ubombi avatar Nov 06 '22 15:11 ubombi