Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/common
/ functions
Functions
539 in github.com/prometheus/common
⨍
Functions
539
◇
Types & classes
97
↓ 2 callers
Function
parseFloat
(s string)
expfmt/text_parse.go:776
↓ 2 callers
Function
readFile
(t *testing.T, filename string)
config/http_config_test.go:2075
↓ 2 callers
Method
readTokenAsMetricName
readTokenAsMetricName copies a metric name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte).
expfmt/text_parse.go:611
↓ 2 callers
Method
reset
(in io.Reader)
expfmt/text_parse.go:123
↓ 2 callers
Method
roundTripperSettings
()
config/http_config.go:959
↓ 2 callers
Method
setOrCreateCurrentMF
()
expfmt/text_parse.go:682
↓ 2 callers
Method
skipBlankTabIfCurrentBlankTab
skipBlankTabIfCurrentBlankTab works exactly as skipBlankTab but doesn't do anything if p.currentByte is neither ' ' nor '\t'.
expfmt/text_parse.go:554
↓ 2 callers
Function
testDiscriminatorHTTPHeader
(t testing.TB)
expfmt/decode_test.go:371
↓ 2 callers
Function
testLabelNames
(t testing.TB)
model/labels_test.go:21
↓ 2 callers
Function
testLabelValues
(t testing.TB)
model/labels_test.go:57
↓ 2 callers
Function
testMetric
(t testing.TB)
model/metric_test.go:18
↓ 2 callers
Function
testTextParse
(t testing.TB)
expfmt/text_parse_test.go:26
↓ 2 callers
Function
testTextParseError
(t testing.TB)
expfmt/text_parse_test.go:431
↓ 2 callers
Function
updateRootCA
updateRootCA parses the given byte slice as a series of PEM encoded certificates and updates tls.Config.RootCAs.
config/http_config.go:1013
↓ 2 callers
Method
usingClientCert
()
config/http_config.go:951
↓ 2 callers
Method
usingClientKey
()
config/http_config.go:955
↓ 2 callers
Function
writeFloat
writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes a few common cases for increased efficiency. For non-hardcoded cases, it
expfmt/text_create.go:432
↓ 2 callers
Function
writeOpenMetricsLabelPairs
writeOpenMetricsLabelPairs works like writeOpenMetrics but formats the float in OpenMetrics style.
expfmt/openmetrics_create.go:370
↓ 1 callers
Method
Clone
Clone returns a copy of the label set.
model/labelset.go:109
↓ 1 callers
Method
CloseIdleConnections
()
config/http_config.go:1158
↓ 1 callers
Method
Del
Del registers a new DELETE route.
route/route.go:98
↓ 1 callers
Function
EncodeKey
(w io.Writer, priv *rsa.PrivateKey)
config/generate.go:46
↓ 1 callers
Method
Equal
Equal returns true if both sets contain the same elements (and not more).
model/fingerprinting.go:67
↓ 1 callers
Method
Equal
(o *SampleHistogramPair)
model/value_histogram.go:176
↓ 1 callers
Function
ExtractSamples
ExtractSamples builds a slice of samples from the provided metric families. If an error occurs during sample extraction, it continues to extract from
expfmt/decode.go:172
↓ 1 callers
Method
FastFingerprint
FastFingerprint returns a Metric's Fingerprint calculated by a faster hashing algorithm, which is, however, more susceptible to hash collisions.
model/metric.go:83
↓ 1 callers
Function
FinalizeOpenMetrics
FinalizeOpenMetrics writes the final `# EOF\n` line required by OpenMetrics.
expfmt/openmetrics_create.go:288
↓ 1 callers
Function
FingerprintFromString
FingerprintFromString transforms a string representation into a Fingerprint.
model/fingerprinting.go:26
↓ 1 callers
Function
GenerateCertificate
(caCert *x509.Certificate, caKey *rsa.PrivateKey, server bool, name string, ipAddresses ...net.IP)
config/generate.go:119
↓ 1 callers
Function
GenerateCertificateAuthority
(commonName string, parentCert *x509.Certificate, parentKey *rsa.PrivateKey)
config/generate.go:77
↓ 1 callers
Method
HasFiring
HasFiring returns true iff one of the alerts is not resolved.
model/alert.go:121
↓ 1 callers
Method
Intersection
Intersection returns the elements contained in both sets.
model/fingerprinting.go:82
↓ 1 callers
Function
LoadHTTPConfig
LoadHTTPConfig parses the YAML input s into a HTTPClientConfig.
config/http_config.go:265
↓ 1 callers
Method
Log
Log implements logger.Log.
promlog/log.go:171
↓ 1 callers
Method
MarshalJSON
MarshalJSON implements the json.Marshaler interface.
model/time.go:120
↓ 1 callers
Method
MarshalText
MarshalText implements the encoding.TextMarshaler interface.
model/time.go:312
↓ 1 callers
Method
Merge
Merge is a helper function to non-destructively merge two label sets.
model/labelset.go:118
↓ 1 callers
Function
Negotiate
Negotiate the most appropriate content_type given the accept header and a list of alternatives.
internal/bitbucket.org/ww/goautoneg/autoneg.go:138
↓ 1 callers
Function
Negotiate
Negotiate returns the Content-Type based on the given Accept header. If no appropriate accepted type is found, FmtText is returned (which is the Prome
expfmt/encode.go:63
↓ 1 callers
Function
NegotiateIncludingOpenMetrics
NegotiateIncludingOpenMetrics works like Negotiate but includes FmtOpenMetrics as an option for the result. Note that this function is temporary and w
expfmt/encode.go:87
↓ 1 callers
Function
New
(fs embed.FS)
assets/embed_gzip.go:32
↓ 1 callers
Function
New
New returns a new leveled oklog logger. Each logged line will be annotated with a timestamp. The output always goes to stderr.
promlog/log.go:116
↓ 1 callers
Function
NewBasicAuthRoundTripper
NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a request unless it has already been set.
config/http_config.go:660
↓ 1 callers
Function
NewDecoder
NewDecoder returns a new decoder based on the given input format. If the input format does not imply otherwise, a text format decoder is returned.
expfmt/decode.go:75
↓ 1 callers
Function
NewDynamic
NewDynamic returns a new leveled logger. Each logged line will be annotated with a timestamp. The output always goes to stderr. Some properties can be
promlog/log.go:139
↓ 1 callers
Function
NewDynamicWithLogger
NewDynamicWithLogger returns a new leveled logger with a custom io.Writer. Each logged line will be annotated with a timestamp. Some properties can be
promlog/log.go:150
↓ 1 callers
Function
NewEncoder
NewEncoder returns a new encoder based on content type negotiation. All Encoder implementations returned by NewEncoder also implement Closer, and call
expfmt/encode.go:119
↓ 1 callers
Function
NewWithLogger
NewWithLogger returns a new leveled oklog logger with a custom log.Logger. Each logged line will be annotated with a timestamp.
promlog/log.go:126
↓ 1 callers
Method
Open
Open implements the fs.FS interface.
assets/embed_gzip.go:37
↓ 1 callers
Function
ParseFingerprint
ParseFingerprint parses the input string into a fingerprint.
model/fingerprinting.go:32
↓ 1 callers
Method
Redacted
Redacted returns the URL but replaces any password with "xxxxx".
config/http_config.go:190
↓ 1 callers
Method
Redirect
Redirect takes an absolute path and sends an internal HTTP redirect for it, prefixed by the router's path prefix. Note that this method does not inclu
route/route.go:120
↓ 1 callers
Method
ResolvedAt
ResolvedAt returns true off the activity interval ended before the given timestamp.
model/alert.go:69
↓ 1 callers
Function
ResponseFormat
ResponseFormat extracts the correct format from a HTTP response header. If no matching format can be found FormatUnknown is returned.
expfmt/decode.go:43
↓ 1 callers
Function
SignatureForLabels
SignatureForLabels works like LabelsToSignature but takes a Metric as parameter (rather than a label map) and only includes the labels with the specif
model/signature.go:98
↓ 1 callers
Function
SignatureWithoutLabels
SignatureWithoutLabels works like LabelsToSignature but takes a Metric as parameter (rather than a label map) and excludes the labels with any of the
model/signature.go:118
↓ 1 callers
Method
Size
Size implements the fs.FileInfo interface.
assets/embed_gzip.go:111
↓ 1 callers
Method
Stat
Stat implements the fs.File interface.
assets/embed_gzip.go:73
↓ 1 callers
Function
StaticFileServer
(root http.FileSystem)
server/static_file_server.go:41
↓ 1 callers
Method
Status
Status returns the status of the alert.
model/alert.go:77
↓ 1 callers
Method
Status
Status returns StatusFiring iff at least one of the alerts is firing.
model/alert.go:131
↓ 1 callers
Method
String
()
model/value_float.go:62
↓ 1 callers
Method
String
String returns a string representation of the Time.
model/time.go:115
↓ 1 callers
Method
String
()
model/value_type.go:69
↓ 1 callers
Method
String
()
model/value_histogram.go:25
↓ 1 callers
Method
Sub
Sub returns the Duration t - o.
model/time.go:90
↓ 1 callers
Method
UnmarshalJSON
UnmarshalJSON implements the json.Unmarshaler interface.
model/time.go:125
↓ 1 callers
Method
UnmarshalText
UnmarshalText implements the encoding.TextUnmarshaler interface.
model/time.go:317
↓ 1 callers
Method
Validate
()
sigv4/sigv4_config.go:33
↓ 1 callers
Method
Validate
Validate returns true iff all fields of the matcher have valid values.
model/silence.go:48
↓ 1 callers
Function
WithDialContextFunc
WithDialContextFunc allows you to override func gets used for the actual dialing. The default is `net.Dialer.DialContext`.
config/http_config.go:439
↓ 1 callers
Function
WithIdleConnTimeout
WithIdleConnTimeout allows setting the idle connection timeout.
config/http_config.go:460
↓ 1 callers
Function
WithParam
WithParam returns a new context with param p set to v.
route/route.go:35
↓ 1 callers
Method
WithPrefix
WithPrefix returns a router that prefixes all registered routes with prefix.
route/route.go:66
↓ 1 callers
Function
WithUserAgent
WithUserAgent allows setting the user agent.
config/http_config.go:467
↓ 1 callers
Method
WriteRune
(r rune)
expfmt/text_create.go:34
↓ 1 callers
Function
computeRevision
()
version/info_go118.go:41
↓ 1 callers
Function
extractCounter
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:204
↓ 1 callers
Function
extractGauge
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:235
↓ 1 callers
Function
extractHistogram
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:354
↓ 1 callers
Function
extractSummary
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:297
↓ 1 callers
Function
extractUntyped
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:266
↓ 1 callers
Method
getClientCertificate
getClientCertificate reads the pair of client cert and key from disk and returns a tls.Certificate.
config/http_config.go:971
↓ 1 callers
Function
histogramMetricName
(name string)
expfmt/text_parse.go:763
↓ 1 callers
Function
isBucket
(name string)
expfmt/text_parse.go:748
↓ 1 callers
Function
isValidMetricNameContinuation
(b byte)
expfmt/text_parse.go:732
↓ 1 callers
Function
isValidMetricNameStart
(b byte)
expfmt/text_parse.go:728
↓ 1 callers
Function
isdigit
(c byte)
model/time.go:185
↓ 1 callers
Function
loadHTTPConfigJSON
loadHTTPConfigJSON parses the JSON input s into a HTTPClientConfig.
config/http_config_test.go:1917
↓ 1 callers
Function
mapToValues
(m map[string]string)
config/http_config.go:812
↓ 1 callers
Function
newClient
NewClient returns a http.Client using the specified http.RoundTripper.
config/http_config.go:474
↓ 1 callers
Function
readCAFile
readCAFile reads the CA cert file from disk.
config/http_config.go:1004
↓ 1 callers
Method
readTokenAsLabelName
readTokenAsLabelName copies a label name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). Th
expfmt/text_parse.go:629
↓ 1 callers
Method
readTokenAsLabelValue
readTokenAsLabelValue copies a label value from p.buf into p.currentToken. In contrast to the other 'readTokenAs...' functions, which start with the l
expfmt/text_parse.go:648
↓ 1 callers
Method
startOfLine
startOfLine represents the state where the next byte read from p.buf is the start of a line (or whitespace leading up to it).
expfmt/text_parse.go:144
↓ 1 callers
Function
summaryMetricName
(name string)
expfmt/text_parse.go:752
↓ 1 callers
Function
testGoodConfig
(t *testing.T, filename string)
sigv4/sigv4_config_test.go:36
↓ 1 callers
Function
writeCertificateAndKey
(path string, cert *x509.Certificate, key *rsa.PrivateKey)
config/generate.go:166
↓ 1 callers
Function
writeExemplar
writeExemplar writes the provided exemplar in OpenMetrics format to w. The function returns the number of bytes written and any error encountered.
expfmt/openmetrics_create.go:447
↓ 1 callers
Function
writeInt
writeInt is equivalent to fmt.Fprint with an int64 argument but uses strconv.AppendInt with a byte slice taken from a sync.Pool to avoid allocations.
expfmt/text_create.go:458
← previous
next →
101–200 of 539, ranked by callers