48
pkg/probod/probod.go
Normal file
48
pkg/probod/probod.go
Normal file
@@ -0,0 +1,48 @@
|
||||
package probod
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"go.gearno.de/kit/log"
|
||||
"go.gearno.de/kit/unit"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
type (
|
||||
Implm struct {
|
||||
cfg config
|
||||
}
|
||||
|
||||
config struct {
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
_ unit.Configurable = (*Implm)(nil)
|
||||
_ unit.Runnable = (*Implm)(nil)
|
||||
)
|
||||
|
||||
func New() *Implm {
|
||||
return &Implm{}
|
||||
}
|
||||
|
||||
func (impl *Implm) GetConfiguration() any {
|
||||
return impl.cfg
|
||||
}
|
||||
|
||||
func (impl *Implm) Run(
|
||||
parentCtx context.Context,
|
||||
l *log.Logger,
|
||||
r prometheus.Registerer,
|
||||
tp trace.TracerProvider,
|
||||
) error {
|
||||
|
||||
l.InfoCtx(parentCtx, "started")
|
||||
|
||||
<-parentCtx.Done()
|
||||
|
||||
l.InfoCtx(parentCtx, "stopped")
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user