Documentation ¶
Index ¶
- func CountCounter(counter prometheus.Counter) int
- func CountCounterVecWithLabels(counterVec *prometheus.CounterVec, labels prometheus.Labels) int
- func CountHistogramSamplesWithLabels(histVec *prometheus.HistogramVec, labels prometheus.Labels) int
- func GaugeValueWithLabels(vecGauge *prometheus.GaugeVec, labels prometheus.Labels) (int, error)
- func MustCountHistogramSamplesWithLabels(histVec *prometheus.HistogramVec, labels prometheus.Labels) int
- func WriteTemp(t *testing.T, contents, prefix string) string
- type SafeBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountCounter ¶
func CountCounter(counter prometheus.Counter) int
CountCounter returns the count by label and value of a prometheus metric
func CountCounterVecWithLabels ¶
func CountCounterVecWithLabels(counterVec *prometheus.CounterVec, labels prometheus.Labels) int
CountCounterVecWithLabels returns the current count a prometheus CounterVec with the given labels. If there was a problem collecting the value then it panics.
func CountHistogramSamplesWithLabels ¶
func CountHistogramSamplesWithLabels(histVec *prometheus.HistogramVec, labels prometheus.Labels) int
CountHistogramSamplesWithLabels returns the number of samples a given prometheus Histogram has seen with the given labels. If there was a problem collecting the sample count it panics.
func GaugeValueWithLabels ¶
func GaugeValueWithLabels(vecGauge *prometheus.GaugeVec, labels prometheus.Labels) (int, error)
GaugeValueWithLabels returns the current value with the provided labels from the the GaugeVec argument, or an error if there was a problem collecting the value.
func MustCountHistogramSamplesWithLabels ¶
func MustCountHistogramSamplesWithLabels(histVec *prometheus.HistogramVec, labels prometheus.Labels) int
Types ¶
type SafeBuffer ¶
type SafeBuffer struct {
// contains filtered or unexported fields
}
SafeBuffer is a wrapper around a bytes.Buffer that is made safe for concurrent access. This is required for making a logger backed by a bytes buffer that can be used by a woodpecker instance across multiple goroutines without a data race.
func (*SafeBuffer) Read ¶
func (b *SafeBuffer) Read(p []byte) (n int, err error)
Read safely reads from the wrapped buffer
func (*SafeBuffer) String ¶
func (b *SafeBuffer) String() string
String safely reads from the wrapped buffer
Directories ¶
Path | Synopsis |
---|---|
cmd/ct-test-srv
This is a test server that implements the subset of RFC6962 APIs needed by ct-woodpecker.
|
This is a test server that implements the subset of RFC6962 APIs needed by ct-woodpecker. |