Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TpmFailuresTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "failures_count", Help: "Total number of failed TPM operations.", }, []string{"operation_type"}, ) CryptoOperationalLatencies = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "crypto_latencies", Help: "Latencies in milliseconds of tpm crypto operations.", Buckets: prometheus.ExponentialBuckets(5, 2, 14), }, []string{"operation_type"}, ) )
Functions ¶
func RecordCryptoOperation ¶
Types ¶
type HealthChecker ¶
type HealthChecker interface { PingRPC(context.Context, *grpc.ClientConn) error PingKMS(context.Context, *grpc.ClientConn) error }
type HealthCheckerManager ¶
type HealthCheckerManager struct { KeyService *kms.Service // contains filtered or unexported fields }
HealthCheckerManager types that encapsulates healthz functionality of kms-plugin. The following health checks are performed: 1. Getting version of the plugin - validates gRPC connectivity. 2. Asserting that the caller has encrypt and decrypt permissions on the crypto key.
func NewHealthChecker ¶
func NewHealthChecker( plugin HealthChecker, keyService *kms.Service, unixSocketPath string, callTimeout time.Duration, servingURL *url.URL, ) *HealthCheckerManager
func (*HealthCheckerManager) HandlerFunc ¶
func (m *HealthCheckerManager) HandlerFunc(w http.ResponseWriter, r *http.Request)
func (*HealthCheckerManager) Serve ¶
func (m *HealthCheckerManager) Serve() chan error
Serve creates http server for hosting healthz.
func (*HealthCheckerManager) TestTpm ¶
func (h *HealthCheckerManager) TestTpm() error
type Metrics ¶
Metrics encapsulates functionality related to serving Prometheus metrics for kms-plugin.
type PluginManager ¶
type PluginManager struct { // Embedding these only to shorten access to fields. net.Listener // contains filtered or unexported fields }
func NewManager ¶
func NewManager(plugin Plugin, unixSocketFilePath string) *PluginManager
NewManager creates a new plugin manager.
Click to show internal directories.
Click to hide internal directories.