change name of variable

Signed-off-by: Brian Downs <brian.downs@gmail.com>
This commit is contained in:
Brian Downs 2020-08-19 14:30:53 -07:00
parent a4b2953017
commit fa2c1422b3
4 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ type Server struct {
ClusterInit bool
ClusterReset bool
EncryptSecrets bool
SetupHooks []func(config.Control) error
StartupHooks []func(config.Control) error
}
var ServerConfig Server

View File

@ -193,7 +193,7 @@ func run(app *cli.Context, cfg *cmds.Server) error {
return errors.Wrap(err, "Invalid tls-min-version")
}
serverConfig.SetupHooks = append(serverConfig.SetupHooks, cfg.SetupHooks...)
serverConfig.StartupHooks = append(serverConfig.StartupHooks, cfg.StartupHooks...)
// TLS config based on mozilla ssl-config generator
// https://ssl-config.mozilla.org/#server=golang&version=1.13.6&config=intermediate&guideline=5.4

View File

@ -60,7 +60,7 @@ func StartServer(ctx context.Context, config *Config) error {
return errors.Wrap(err, "starting tls server")
}
for _, hook := range config.SetupHooks {
for _, hook := range config.StartupHooks {
hook(config.ControlConfig)
}

View File

@ -10,5 +10,5 @@ type Config struct {
ControlConfig config.Control
Rootless bool
SupervisorPort int
SetupHooks []func(config.Control) error
StartupHooks []func(config.Control) error
}