func (s *SentinelApi) Get(w http.ResponseWriter, r *http.Request) { responseChannel := make(chan sentinel.SentinelTopology) s.Manager.GetState(sentinel.TopologyRequest{ReplyChannel: responseChannel}) sentinelState := <-responseChannel util.WriteResponseAsJSON(w, sentinelState) }
func (s *TopologyApi) Get(w http.ResponseWriter, r *http.Request) { t := s.Manager.GetCurrentTopology() util.WriteResponseAsJSON(w, t.Items()) }
func (s *ConfigurationApi) Get(w http.ResponseWriter, r *http.Request) { config := s.ConfigurationManager.GetCurrentConfiguration() util.WriteResponseAsJSON(w, config) }