forked from cloudfoundry/gorouter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helper.go
21 lines (17 loc) · 1004 Bytes
/
helper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package test_helpers
import (
"encoding/json"
"net/http"
"time"
"code.cloudfoundry.org/gorouter/metrics/reporter"
"code.cloudfoundry.org/gorouter/route"
"code.cloudfoundry.org/gorouter/stats"
)
type NullVarz struct{}
func (_ NullVarz) MarshalJSON() ([]byte, error) { return json.Marshal(nil) }
func (_ NullVarz) ActiveApps() *stats.ActiveApps { return stats.NewActiveApps() }
func (_ NullVarz) CaptureBadRequest(*http.Request) {}
func (_ NullVarz) CaptureBadGateway(*http.Request) {}
func (_ NullVarz) CaptureRoutingRequest(b *route.Endpoint, req *http.Request) {}
func (_ NullVarz) CaptureRoutingResponse(*route.Endpoint, *http.Response, time.Time, time.Duration) {}
func (_ NullVarz) CaptureRegistryMessage(msg reporter.ComponentTagged) {}