Bootstrap probod deamon

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-01-16 13:32:55 +01:00
parent 516995708d
commit 8983a0d7ed
6 changed files with 216 additions and 1 deletions

48
pkg/probod/probod.go Normal file
View 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
}