mirror of
https://github.com/hanzo-fi/go-libs.git
synced 2026-10-30 20:53:44 +00:00
20 lines
406 B
Go
20 lines
406 B
Go
package servicefx
|
|
|
|
import (
|
|
"go.uber.org/fx"
|
|
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/service/health"
|
|
)
|
|
|
|
const HealthCheckKey = `group:"_healthCheck"`
|
|
|
|
func ProvideHealthCheck(provider any) fx.Option {
|
|
return fx.Provide(
|
|
fx.Annotate(provider, fx.ResultTags(HealthCheckKey)),
|
|
)
|
|
}
|
|
|
|
func HealthModule() fx.Option {
|
|
return fx.Provide(fx.Annotate(health.NewHealthController, fx.ParamTags(HealthCheckKey)))
|
|
}
|