Documentation ¶
Overview ¶
Package tlsprom provides Prometheus instrumentation for TLS configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Observer ¶ added in v0.4.0
type Observer interface { dynamictls.Observer prometheus.Collector }
Observer is a collection of TLS config metrics.
func NewObserver ¶ added in v0.4.0
NewObserver returns a new Observer with the given options.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
An Option applies optional configuration.
func WithClient ¶
func WithClient() Option
WithClient returns an Option that sets the subsystem to "client" and the key usage to ClientAuth.
func WithGRPC ¶
func WithGRPC() Option
WithGRPC returns an Option that sets the namespace to "grpc".
func WithHTTP ¶
func WithHTTP() Option
WithHTTP returns an Option that sets the namespace to "http".
func WithKeyUsages ¶
func WithKeyUsages(usages ...x509.ExtKeyUsage) Option
WithKeyUsages returns an Option that specifies the key usages for certificate verification.
func WithLogger ¶ added in v0.3.0
WithLogger returns an Option that sets the logger for errors.
func WithNamespace ¶
WithNamespace returns an Option that sets the namespace of metrics.
func WithServer ¶
func WithServer() Option
WithServer returns an Option that sets the subsystem to "server" and the key usage to ServerAuth.
func WithSubsystem ¶
WithSubsystem returns an Option that sets the subsystem of metrics.