コード例 #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
ファイル: web.go プロジェクト: ccsblueboy/prometheus
// 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
}