conf: enable dependency injection of site-config accessing to reduce use of global accessors
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: Strum355
This PR primarily introduces these changes:
SiteConfig()
and ServiceConnections()
methods on internal/conf.(*client)
and internal/conf.Unified
internal/conf.(*client)
and for internal/conf.Unified
internal/conf.(*client)
a type designed to be passed around by exporting internal/conf.DefaultClient()
a. This reduces the reliance on the internal/conf
package which has reliance on other widely used packages, instead shifting the reliance onto the (almost) interface-only internal/conf/conftypes
b. It is expected that a config-type interface from point 2 is passed down the stacks rather than relying on the global internal/conf.Get()
internal/conf.Get()
with calls to a passed-down internal/conf.(*client)
in a select few areas.
a. Other teams can adopt this at their own pace and to the extent they see suitableThis pattern should also allow for moving away from the existing format of mocking site-config once adoption is far enough.
NOTE: all names are subject to change. Please leave your name recommendations if you'd prefer different names.
Push commits to the source branch or add previously merged commits to review them.