INNER CODE UNIT · Go
onChange
andrearaponi/dito · cmd/main.go:53
onChange := func(newConfig *config.ProxyConfig) {
// Update components with the new configuration
dito.UpdateComponents(newConfig)
// Update the Dito instance configuration
dito.UpdateConfig(newConfig)
}
// Watch the configuration file for changes if hot reload is enabled
if dito.GetCurrentConfig().HotReload {
go config.WatchConfig(*configFile, onChange, logger)
}
// Start the profiler if the flag is enabled
if *enableProfiler {
startProfiling(dito.Logger)
}
// Start the HTTP server