func (sm *safeMetrics) httpStatusListener() httpStatusListener {
	return &endpointMetricsHTTPStatusListener{
		safeMetrics: sm,
	}
}
httpStatusListener returns the listener for the http sink that updates the
relevant counters.
package notifications
import (
	"expvar"
	"fmt"
	"net/http"
	"sync"
)
type EndpointMetrics struct {
	Pending   int             
	Events    int             
	Successes int             
	Failures  int             
	Errors    int             
	Statuses  map[string]int  
}
type safeMetrics struct {
	EndpointMetrics
	sync.Mutex  
}
func newSafeMetrics() *safeMetrics {
	var sm safeMetrics
	sm.Statuses = make(map[string]int)
	return &sm
}