Skip to content

Commit a1d0201

Browse files
committed
[core] Add instanceName as config option
1 parent 98a6bab commit a1d0201

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

core/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ type Config struct {
6767
mesosGpuClusterCompat bool
6868
controlPort int
6969
configurationUri string
70+
instanceName string
7071
}
7172

7273
func (cfg *Config) AddFlags(fs *flag.FlagSet) {
@@ -103,6 +104,7 @@ func (cfg *Config) AddFlags(fs *flag.FlagSet) {
103104
fs.StringVar(&cfg.mesosAuthMode, "mesos.authMode", cfg.mesosAuthMode, "Method to use for Mesos authentication; specify '"+AuthModeBasic+"' for simple HTTP authentication")
104105
fs.BoolVar(&cfg.mesosGpuClusterCompat, "mesos.gpuClusterCompat", cfg.mesosGpuClusterCompat, "When true the framework will receive offers from agents w/ GPU resources.")
105106
fs.StringVar(&cfg.configurationUri, "config", cfg.configurationUri, "URI of the Consul server or YAML configuration file.")
107+
fs.StringVar(&cfg.instanceName, "instance", cfg.instanceName, "User-visible name for this AliECS instance.")
106108
}
107109

108110
const AuthModeBasic = "basic"
@@ -142,6 +144,7 @@ func NewConfig() Config {
142144
},
143145
mesosAuthMode: env("AUTH_MODE", ""),
144146
controlPort: 47102,
147+
instanceName: "AliECS instance",
145148
}
146149
}
147150

0 commit comments

Comments
 (0)