func (app *App) ReloadConfig() error {
	app.Lock()
	defer app.Unlock()

	var err error
	if err = app.configure(); err != nil {
		return err
	}

	runtime.GOMAXPROCS(app.Config.Common.MaxCPU)

	app.Cache.SetMaxSize(app.Config.Cache.MaxSize)
	app.Cache.SetWriteStrategy(app.Config.Cache.WriteStrategy)
	app.Cache.SetTagsEnabled(app.Config.Tags.Enabled)

	if app.Persister != nil {
		app.Persister.Stop()
		app.Persister = nil
	}

	if app.Tags != nil {
		app.Tags.Stop()
		app.Tags = nil
	}

	app.startPersister()

	if app.Collector != nil {
		app.Collector.Stop()
		app.Collector = nil
	}

	app.Collector = NewCollector(app)

	return nil
}
func (app *App) ReloadConfig() error {
	app.Lock()
	defer app.Unlock()

	var err error
	if err = app.configure(); err != nil {
		return err
	}

	runtime.GOMAXPROCS(app.Config.Common.MaxCPU)

	app.Cache.SetMaxSize(app.Config.Cache.MaxSize)
	app.Cache.SetWriteStrategy(app.Config.Cache.WriteStrategy)
	app.Cache.SetTagsEnabled(app.Config.Tags.Enabled)

	if app.Persister != nil {
		app.Persister.Stop()
		app.Persister = nil
	}

	if app.Tags != nil {
		app.Tags.Stop()
		app.Tags = nil
	}

	app.startPersister()

	if app.Collector != nil {
		app.Collector.Stop()
		app.Collector = nil
	}

	app.Collector = NewCollector(app)

	return nil
}
func ( app * App ) ReloadConfig ( ) error { app . Lock ( ) defer app . Unlock ( ) var err error if err = app . configure ( ) ; err != nil { return err } runtime . GOMAXPROCS ( app . Config . Common . MaxCPU ) app . Cache . SetMaxSize ( app . Config . Cache . MaxSize ) app . Cache . SetWriteStrategy ( app . Config . Cache . WriteStrategy ) app . Cache . SetTagsEnabled ( app . Config . Tags . Enabled ) if app . Persister != nil { app . Persister . Stop ( ) app . Persister = nil } if app . Tags != nil { app . Tags . Stop ( ) app . Tags = nil } app . startPersister ( ) if app . Collector != nil { app . Collector . Stop ( ) app . Collector = nil } app . Collector = NewCollector ( app ) return nil }
// ReloadConfig reloads some settings from config
ReloadConfig reloads some settings from config