1
0
mirror of https://github.com/ribbybibby/ssl_exporter.git synced 2025-02-19 19:59:47 +02:00
ssl_exporter/prober/prober.go
Johan Fleury 83f01274fc
Move to github.com/prometheus/common/promlog for logging (#71)
* Move to yaml.v3 everywhere

* Switch to github.com/prometheus/common/promlog for logging
2021-06-23 17:22:22 +01:00

25 lines
595 B
Go

package prober
import (
"context"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/ribbybibby/ssl_exporter/config"
)
var (
// Probers maps a friendly name to a corresponding probe function
Probers = map[string]ProbeFn{
"https": ProbeHTTPS,
"http": ProbeHTTPS,
"tcp": ProbeTCP,
"file": ProbeFile,
"kubernetes": ProbeKubernetes,
"kubeconfig": ProbeKubeconfig,
}
)
// ProbeFn probes
type ProbeFn func(ctx context.Context, logger log.Logger, target string, module config.Module, registry *prometheus.Registry) error