Merge pull request #1650 from travisturner/cloud-124

[CLOUD-124] Add feature flag --future.rename to support rename to FeatureBase
This commit is contained in:
Travis Turner 2021-07-08 14:43:19 -05:00 committed by GitHub
commit 1f04a8d1fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -113,4 +113,7 @@ func BuildServerFlags(cmd *cobra.Command, srv *server.Command) {
// Disk and Memory usage cache for ui/usage endpoint
flags.Float64Var(&srv.Config.UsageDutyCycle, "usage-duty-cycle", srv.Config.UsageDutyCycle, "Sets the percentage of time that is spent recalculating the disk and memory usage cache. 100.0 for always-running, must be > 0.")
// Future flags.
flags.BoolVar(&srv.Config.Future.Rename, "future.rename", false, "Present application name as FeatureBase. Defaults to false, will default to true in an upcoming release.")
}

View file

@ -227,6 +227,14 @@ type Config struct {
// The percentage of time spent recalculating the disk and memory usage cache.
UsageDutyCycle float64 `toml:"usage-duty-cycle"`
// Future flags are used to represent features or functionality which is not
// yet the default behavior, but will be in a future release.
Future struct {
// Rename, if true, will outwardly present the name of the application
// as FeatureBase instead of Pilosa.
Rename bool `toml:"rename"`
} `toml:"future"`
}
// MustValidate checks that all ports in a Config are unique and not zero.
@ -365,6 +373,9 @@ func NewConfig() *Config {
// Disk and Memory Usage
c.UsageDutyCycle = 20.0
// Future flags.
c.Future.Rename = false
return c
}