alexliesenfeld / health

A simple and flexible health check library for Go.
MIT License
774 stars 38 forks source link

feat: add echo v4 handler support #82

Open adibaulia opened 2 months ago

adibaulia commented 2 months ago

This pull request introduces a feature to support the Echo v4 framework handler. You can implement it as shown below:

e := echo.New()
e.GET("/actuator/health", func(c echo.Context) error {
    return health.NewHandlerEcho(c, checker, options...)
})
alexliesenfeld commented 2 months ago

Thank you. May I ask what the upsides are compared to the standard Echo wrapper?

import "github.com/labstack/echo/v4"
// ...
return echo.WrapHandler(health.NewHandler(checker))