25 lines
369 B
Go
25 lines
369 B
Go
package monitoring
|
|
|
|
import (
|
|
"go.uber.org/fx"
|
|
|
|
"payouts/internal/config"
|
|
)
|
|
|
|
// Module is a fx module
|
|
var Module = fx.Options(
|
|
fx.Provide(New),
|
|
)
|
|
|
|
// Params represents the module input params
|
|
type Params struct {
|
|
fx.In
|
|
|
|
AppConfig *config.App
|
|
}
|
|
|
|
// New instantiates the metrics service
|
|
func New(p Params) (Metrics, error) {
|
|
return NewMetrics(p.AppConfig.Metrics)
|
|
}
|