mirror of
https://github.com/ribbybibby/ssl_exporter.git
synced 2026-08-21 03:46:18 +00:00
21 lines
422 B
Go
21 lines
422 B
Go
package prober
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"time"
|
|
|
|
"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,
|
|
}
|
|
)
|
|
|
|
// ProbeFn probes
|
|
type ProbeFn func(target string, module config.Module, timeout time.Duration, tlsConfig *tls.Config) (*tls.ConnectionState, error)
|