func TestConfig_WriteTracing(t *testing.T) { c := httpd.Config{WriteTracing: true} s := httpd.NewService(c) if !s.Handler.WriteTrace { t.Fatalf("write tracing was not set") } }
func (s *Server) appendHTTPDService(c httpd.Config) { if !c.Enabled { return } srv := httpd.NewService(c) srv.Handler.MetaStore = s.MetaStore srv.Handler.QueryExecutor = s.QueryExecutor srv.Handler.PointsWriter = s.PointsWriter srv.Handler.Version = s.version // If a ContinuousQuerier service has been started, attach it. for _, srvc := range s.Services { if cqsrvc, ok := srvc.(continuous_querier.ContinuousQuerier); ok { srv.Handler.ContinuousQuerier = cqsrvc } } s.Services = append(s.Services, srv) }