MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / SimpleCounter

Interface SimpleCounter

internal/metrics/collector.go:193–204  ·  view source on GitHub ↗

SimpleCounter is a simple counter that can only be incremented.

Source from the content-addressed store, hash-verified

191
192// SimpleCounter is a simple counter that can only be incremented.
193type SimpleCounter interface {
194 // Increment increments the counter by 1
195 //
196 // - labels is a set of labels to apply. Can be created using the Label function.
197 Increment(labels ...MetricLabel)
198
199 // IncrementBy increments the counter by the specified number. Only returns an error if the passed by parameter is
200 // negative.
201 //
202 // - labels is a set of labels to apply. Can be created using the Label function.
203 IncrementBy(by float64, labels ...MetricLabel) error
204}
205
206// Counter extends the SimpleCounter interface by adding a WithLabels function to create a copy of the counter that
207// is primed with a set of labels.

Callers

nothing calls this directly

Implementers 4

counterImplinternal/metrics/counter.go
gaugeGeoImplinternal/metrics/gaugegeo.go
counterGeoImplinternal/metrics/countergeo.go
gaugeImplinternal/metrics/gauge.go

Calls

no outgoing calls

Tested by

no test coverage detected