cmd/ctrld: allocate new ip instead of port

So the alternative listener address can still be used as system
resolver.
This commit is contained in:
Cuong Manh Le
2023-02-21 23:52:50 +07:00
committed by Cuong Manh Le
parent 82900eeca6
commit cad71997aa
5 changed files with 41 additions and 43 deletions
+1 -1
View File
@@ -66,9 +66,9 @@ func InitConfig(v *viper.Viper, name string) {
// Config represents ctrld supported configuration.
type Config struct {
Service ServiceConfig `mapstructure:"service" toml:"service,omitempty"`
Listener map[string]*ListenerConfig `mapstructure:"listener" toml:"listener" validate:"min=1,dive"`
Network map[string]*NetworkConfig `mapstructure:"network" toml:"network" validate:"min=1,dive"`
Upstream map[string]*UpstreamConfig `mapstructure:"upstream" toml:"upstream" validate:"min=1,dive"`
Listener map[string]*ListenerConfig `mapstructure:"listener" toml:"listener" validate:"min=1,dive"`
}
// ServiceConfig specifies the general ctrld config.