示例#1
0
文件: web.go 项目: mjseid/prometheus
// ApplyConfig updates the status state as the new config requires.
// Returns true on success.
func (s *PrometheusStatus) ApplyConfig(conf *config.Config) bool {
	s.mu.Lock()
	defer s.mu.Unlock()

	s.Config = conf.String()

	return true
}
示例#2
0
// ApplyConfig updates the status state as the new config requires.
// Returns true on success.
func (h *Handler) ApplyConfig(conf *config.Config) bool {
	h.mtx.Lock()
	defer h.mtx.Unlock()

	h.externalLabels = conf.GlobalConfig.ExternalLabels
	h.configString = conf.String()

	return true
}