api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name: "timestamp_authority_api_latency",
		Help: "API Latency on calls",
	}, []string{"path", "code"})

	MetricLatencySummary = promauto.NewSummaryVec(prometheus.SummaryOpts{
		Name: "timestamp_authority_api_latency_summary",
		Help: "API Latency on calls",
	}, []string{"path", "code"})

	MetricRequestLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name: "timestamp_authority_latency_by_api",
		Help: "API Latency (in ns) by path and method",
		Buckets: prometheus.ExponentialBucketsRange(
			float64(time.Millisecond),
			float64(4*time.Second),
			10),
	}, []string{"path", "method"})

	MetricRequestCount = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "timestamp_authority_http_requests_total",
		Help: "Total number of HTTP requests by status code, path, and method.",
	}, []string{"code", "path", "method"})

	MetricNTPLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name: "timestamp_authority_ntp_latency",
		Help: "NTP request latency",
	}, []string{"host"})

	MetricNTPSyncCount = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "timestamp_authority_ntp_sync_total",
		Help: "Total number of NTP requests against a remote server",
	}, []string{"host", "failed"})

	MetricNTPErrorCount = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "timestamp_authority_ntp_errors_total",
		Help: "Total number of NTP related errors",
	}, []string{"reason"})
)

Functions

func ConfigureAPI

func ConfigureAPI()

func GetTimestampCertChainHandler

func GetTimestampCertChainHandler(params ts.GetTimestampCertChainParams) middleware.Responder

func TimestampResponseHandler

func TimestampResponseHandler(params ts.GetTimestampResponseParams) middleware.Responder

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI() (*API, error)

Jump to

Keyboard shortcuts

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