INNER CODE UNIT · Go
func
andrearaponi/dito · app/app.go:39
func (d *Dito) UpdateConfig(newConfig *config.ProxyConfig) {
d.configMutex.Lock()
d.Config = newConfig
d.TransportCache.Clear()
d.configMutex.Unlock()
d.Logger.Warn("Configuration updated in Dito")
}
// GetCurrentConfig retrieves the current proxy configuration of the Dito application.
//
// Returns:
// - *config.ProxyConfig: A pointer to the current proxy configuration.
func (d *Dito) GetCurrentConfig() *config.ProxyConfig {
d.configMutex.RLock()
proxyConfig := d.Config
d.configMutex.RUnlock()
return proxyConfig
}