summaryrefslogtreecommitdiff
path: root/app/controllers/health/controller.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-12 18:11:05 -0600
committermo khan <mo@mokhan.ca>2025-04-12 18:11:05 -0600
commit0bef608297d7def2a18d054e7230fe0e0a3710a7 (patch)
tree93a8ec34baa695705832ace22266e1f13cb9e64e /app/controllers/health/controller.go
parent54715831a2d307390c05214b6ae8bc721ade6680 (diff)
refactor: extract mountable interface to allow controllers to mount themselves into the muxHEADmain
Diffstat (limited to 'app/controllers/health/controller.go')
-rw-r--r--app/controllers/health/controller.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/health/controller.go b/app/controllers/health/controller.go
index e241885..5bcff66 100644
--- a/app/controllers/health/controller.go
+++ b/app/controllers/health/controller.go
@@ -9,6 +9,10 @@ func New() *Controller {
return &Controller{}
}
+func (c *Controller) MountTo(mux *http.ServeMux) {
+ mux.HandleFunc("GET /health", c.Index)
+}
+
func (c *Controller) Index(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}