tlsprom

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2023 License: MIT Imports: 7 Imported by: 2

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

func NewObserver(options ...Option) (Observer, error)

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

func WithLogger(log logr.Logger) Option

WithLogger returns an Option that sets the logger for errors.

func WithNamespace

func WithNamespace(namespace string) Option

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

func WithSubsystem(subsystem string) Option

WithSubsystem returns an Option that sets the subsystem of metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL