Skip to content

Commit

Permalink
After we moved healthcheck out, discern processor routes from other r…
Browse files Browse the repository at this point in the history
…outes
  • Loading branch information
Ron cohen committed Jul 16, 2018
1 parent 39e7dea commit 5b1f4aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions beater/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var (
}
}

Routes = map[string]routeMapping{
ProcessorRoutes = map[string]routeMapping{
BackendTransactionsURL: {backendHandler, transaction.Processor},
FrontendTransactionsURL: {frontendHandler, transaction.Processor},
BackendErrorsURL: {backendHandler, err.Processor},
Expand All @@ -151,7 +151,7 @@ var (
func newMuxer(beaterConfig *Config, report reporter) *http.ServeMux {
mux := http.NewServeMux()
logger := logp.NewLogger("handler")
for path, mapping := range Routes {
for path, mapping := range ProcessorRoutes {
logger.Infof("Path %s added to request handler", path)

mux.Handle(path, mapping.ProcessorHandler(mapping.Processor, beaterConfig, report))
Expand Down
6 changes: 1 addition & 5 deletions script/output_data/output_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ func main() {
func generate() error {
var checked = map[string]struct{}{}

for path, mapping := range beater.Routes {

if path == beater.HealthCheckURL {
continue
}
for _, mapping := range beater.ProcessorRoutes {

data, err := loader.LoadData(filepath.Join("..", "testdata", mapping.Processor.Name(), "payload.json"))
if err != nil {
Expand Down

0 comments on commit 5b1f4aa

Please sign in to comment.