func (r *Registry) GetRegistry(rw http.ResponseWriter, req *http.Request) {
	var items = []*W{}
	for i := 0; i < r.m.list.Len(); i++ {
		items = append(items, r.m.list.Get(i))
	}
	if msg, err := json.Marshal(items); err != nil {
		jsonResponse(rw, http.StatusInternalServerError, err.Error())
	} else {
		rw.Header().Set("Content-Type", "application/json")
		rw.Write(msg)
	}
}
get is an api call to return all the registered listeners
package webhook
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)
type Registry struct {
	m       *monitor
	Changes chan []W
}
func NewRegistry(mon *monitor) Registry {
	return Registry{
		m:       mon,
		Changes: mon.changes,
	}
}
func jsonResponse(rw http.ResponseWriter, code int, msg string) {
	rw.Header().Set("Content-Type", "application/json")
	rw.WriteHeader(code)
	rw.Write([]byte(fmt.Sprintf(`{"message":"%s"}`, msg)))
}