Пример #1
0
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")
	}
}
Пример #2
0
func (s *Server) appendHTTPDService(c httpd.Config) {
	if !c.Enabled {
		return
	}
	srv := httpd.NewService(c)
	srv.Handler.Version = s.buildInfo.Version
	srv.Handler.Elasticsearch = s.elasticsearch
	srv.Handler.Cassandra = s.cassandra
	s.Services = append(s.Services, srv)
}