2020-06-17 16:29:21 +01:00
|
|
|
package prober
|
|
|
|
|
|
|
|
import (
|
2020-11-09 12:57:28 +00:00
|
|
|
"context"
|
2020-06-17 16:29:21 +01:00
|
|
|
|
2021-06-23 12:22:22 -04:00
|
|
|
"github.com/go-kit/log"
|
2020-11-07 17:17:06 +00:00
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
2020-06-17 16:29:21 +01:00
|
|
|
"github.com/ribbybibby/ssl_exporter/config"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// Probers maps a friendly name to a corresponding probe function
|
|
|
|
Probers = map[string]ProbeFn{
|
2020-11-15 22:05:51 +00:00
|
|
|
"https": ProbeHTTPS,
|
|
|
|
"http": ProbeHTTPS,
|
|
|
|
"tcp": ProbeTCP,
|
|
|
|
"file": ProbeFile,
|
|
|
|
"kubernetes": ProbeKubernetes,
|
2021-04-02 05:53:31 -04:00
|
|
|
"kubeconfig": ProbeKubeconfig,
|
2020-06-17 16:29:21 +01:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
// ProbeFn probes
|
2021-06-23 12:22:22 -04:00
|
|
|
type ProbeFn func(ctx context.Context, logger log.Logger, target string, module config.Module, registry *prometheus.Registry) error
|