Initial commit
This commit is contained in:
24
internal/service/monitoring/module.go
Normal file
24
internal/service/monitoring/module.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user