88 "strings"
99)
1010
11- // MultiProviderConfig is the configuration for a multiple provider setup. This is expected to be given in json format via
11+ // ProviderConfig is the configuration for a multiple provider setup. This is expected to be given in json format via
1212// MULTI_CONFIG environment variable, or in a file location specified by MULTI_CONFIG_FILE.
13- type MultiProviderConfig struct {
13+ type ProviderConfig struct {
1414 // Domain names to list of provider names
1515 Domains map [string ][]string
1616 // Provider Name -> Key/Value pairs for environment
@@ -19,7 +19,7 @@ type MultiProviderConfig struct {
1919
2020// providerNamesForDomain chooses the most appropriate domain from the config and returns its' list of dns providers
2121// looks for most specific match to least specific, one dot at a time. Finally folling back to "default" domain.
22- func (m * MultiProviderConfig ) providerNamesForDomain (domain string ) ([]string , error ) {
22+ func (m * ProviderConfig ) providerNamesForDomain (domain string ) ([]string , error ) {
2323 parts := strings .Split (domain , "." )
2424 var names []string
2525 for i := 0 ; i < len (parts ); i ++ {
@@ -37,7 +37,7 @@ func (m *MultiProviderConfig) providerNamesForDomain(domain string) ([]string, e
3737 return names , nil
3838}
3939
40- func getConfig () (* MultiProviderConfig , error ) {
40+ func getConfig () (* ProviderConfig , error ) {
4141 var rawJSON []byte
4242 var err error
4343 if cfg := os .Getenv ("MULTI_CONFIG" ); cfg != "" {
@@ -49,7 +49,7 @@ func getConfig() (*MultiProviderConfig, error) {
4949 } else {
5050 return nil , fmt .Errorf ("'multi' provider requires json config in MULTI_CONFIG or MULTI_CONFIG_FILE" )
5151 }
52- cfg := & MultiProviderConfig {}
52+ cfg := & ProviderConfig {}
5353 if err = json .Unmarshal (rawJSON , cfg ); err != nil {
5454 return nil , err
5555 }
0 commit comments