Skip to content

Commit

Permalink
add /tsdb endpoint to mock server
Browse files Browse the repository at this point in the history
  • Loading branch information
wg committed Jan 3, 2017
1 parent 658de45 commit 154e813
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/github.com/kentik/libkflow/api/test/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (s *Server) Serve(email, token string, dev api.Device) error {
s.Device = dev
s.mux.HandleFunc("/api/v5/device/", s.wrap(s.device))
s.mux.HandleFunc("/chf", s.wrap(s.flow))
s.mux.HandleFunc("/tsdb", s.wrap(s.tsdb))
return http.Serve(s.listener, s.mux)
}

Expand Down Expand Up @@ -145,6 +146,10 @@ func (s *Server) flow(w http.ResponseWriter, r *http.Request) {
}
}

func (s *Server) tsdb(w http.ResponseWriter, r *http.Request) {
// just ignore it
}

func (s *Server) wrap(f handler) handler {
return func(w http.ResponseWriter, r *http.Request) {
defer func() {
Expand Down

0 comments on commit 154e813

Please sign in to comment.