MCPcopy Create free account

hub / github.com/prometheus/common / functions

Functions539 in github.com/prometheus/common

↓ 42 callersMethodString
()
model/value_type.go:24
↓ 40 callersMethodError
Error implements the error interface.
expfmt/text_parse.go:47
↓ 31 callersMethodGet
Get registers a new GET route.
route/route.go:88
↓ 19 callersMethodAdd
Add returns the Time t + d.
model/time.go:85
↓ 13 callersMethodClose
()
expfmt/encode.go:42
↓ 13 callersMethodWriteByte
(c byte)
expfmt/text_create.go:36
↓ 12 callersMethodEqual
Equal reports whether two Times represent the same instant.
model/time.go:70
↓ 12 callersFunctionNewClientFromConfig
NewClientFromConfig returns a new HTTP client configured for the given config.HTTPClientConfig and config.HTTPClientOption. The name is used as go-con
config/http_config.go:481
↓ 11 callersMethodparseError
parseError sets p.err to a ParseError at the current line with the given message.
expfmt/text_parse.go:535
↓ 10 callersMethodSet
Set implements pflag/flag.Value
model/time.go:174
↓ 10 callersMethodWriteString
(s string)
expfmt/text_create.go:35
↓ 9 callersFunctionLoadHTTPConfigFile
LoadHTTPConfigFile parses the given YAML file into a HTTPClientConfig.
config/http_config.go:275
↓ 8 callersMethodIsValid
IsValid is true iff the label name matches the pattern of LabelNameRE. This method, however, does not use LabelNameRE for the check but a much faster
model/labels.go:103
↓ 8 callersMethodServeHTTP
ServeHTTP implements http.Handler.
route/route.go:125
↓ 7 callersMethodBefore
Before reports whether the Time t is before o.
model/time.go:75
↓ 7 callersMethodCloseIdleConnections
()
config/http_config.go:59
↓ 7 callersFunctionParseDuration
ParseDuration parses a string into a time.Duration, assuming that a year always has 365d, a week always has 7d, and a day always has 24h.
model/time.go:204
↓ 7 callersMethodPut
Put registers a new PUT route.
route/route.go:103
↓ 7 callersFunctionTimeFromUnixNano
TimeFromUnixNano returns the Time equivalent to the Unix Time t provided in nanoseconds.
model/time.go:65
↓ 7 callersMethodValidate
Validate validates the TLSConfig to check that only one of the inlined or file-based fields for the TLS CA, client certificate, and client key are use
config/http_config.go:931
↓ 6 callersFunctionNew
New returns a new Router.
route/route.go:48
↓ 6 callersFunctionNewTLSConfig
NewTLSConfig creates a new tls.Config from the given TLSConfig.
config/http_config.go:836
↓ 6 callersMethodTextToMetricFamilies
TextToMetricFamilies reads 'in' as the simple and flat text-based exchange format and creates MetricFamily proto messages. It returns the MetricFamily
expfmt/text_parse.go:102
↓ 6 callersMethodhandle
handle turns a HandlerFunc into an httprouter.Handle.
route/route.go:71
↓ 6 callersFunctionhashNew
hashNew initializes a new fnv64a hash value.
model/fnv.go:24
↓ 6 callersFunctionnewTestServer
(handler func(w http.ResponseWriter, r *http.Request))
config/http_config_test.go:140
↓ 6 callersMethodskipBlankTab
skipBlankTab reads (and discards) bytes from p.buf until it encounters a byte that is neither ' ' nor '\t'. That byte is left in p.currentByte.
expfmt/text_parse.go:544
↓ 5 callersFunctionJoinDir
JoinDir joins dir and path if path is relative. If path is empty or absolute, it is returned unchanged.
config/config.go:85
↓ 5 callersFunctionMetricFamilyToText
MetricFamilyToText converts a MetricFamily proto message into text format and writes the resulting lines to 'out'. It returns the number of bytes writ
expfmt/text_create.go:66
↓ 5 callersMethodRoundTrip
RoundTrip implements the http.RoundTrip interface.
config/http_config.go:1118
↓ 5 callersMethodString
()
model/time.go:259
↓ 5 callersFunctiongenSampleHistogram
()
model/value_histogram_test.go:256
↓ 5 callersFunctionhashAdd
hashAdd adds a string to a fnv64a hash value, returning the updated hash.
model/fnv.go:29
↓ 5 callersFunctionhashAddByte
hashAddByte adds a byte to a fnv64a hash value, returning the updated hash.
model/fnv.go:38
↓ 4 callersMethodFingerprint
Fingerprint returns a unique hash for the alert. It is equivalent to the fingerprint of the alert's label set.
model/alert.go:50
↓ 4 callersFunctionLabelsToSignature
LabelsToSignature returns a quasi-unique signature (i.e., fingerprint) for a given label set. (Collisions are possible but unlikely if the number of l
model/signature.go:31
↓ 4 callersFunctionMetricFamilyToOpenMetrics
MetricFamilyToOpenMetrics converts a MetricFamily proto message into the OpenMetrics text format and writes the resulting lines to 'out'. It returns t
expfmt/openmetrics_create.go:63
↓ 4 callersFunctionParam
Param returns param p for the context, or the empty string when param does not exist in context.
route/route.go:27
↓ 4 callersMethodUnix
Unix returns t as a Unix time, the number of seconds elapsed since January 1, 1970 UTC.
model/time.go:101
↓ 4 callersFunctionbenchmarkLabelToSignature
(b *testing.B, l map[string]string, e uint64)
model/signature_test.go:189
↓ 4 callersFunctionbenchmarkMetricToFastFingerprint
(b *testing.B, ls LabelSet, e Fingerprint)
model/signature_test.go:237
↓ 4 callersFunctionbenchmarkMetricToFastFingerprintConc
(b *testing.B, ls LabelSet, e Fingerprint, concLevel int)
model/signature_test.go:280
↓ 4 callersFunctionbenchmarkMetricToFingerprint
(b *testing.B, ls LabelSet, e Fingerprint)
model/signature_test.go:213
↓ 4 callersFunctioncloneRequest
cloneRequest returns a clone of the provided *http.Request. The clone is a shallow copy of the struct and its Header map.
config/http_config.go:823
↓ 4 callersFunctionisBlankOrTab
(b byte)
expfmt/text_parse.go:736
↓ 4 callersFunctionlabelSetToFastFingerprint
labelSetToFastFingerprint works similar to labelSetToFingerprint but uses a faster and less allocation-heavy hash function, which is more susceptible
model/signature.go:78
↓ 4 callersFunctionwriteEscapedString
(w enhancedWriter, v string, includeDoubleQuote bool)
expfmt/text_create.go:422
↓ 3 callersMethodClone
Clone returns a copy of the Metric.
model/metric.go:43
↓ 3 callersMethodDecode
(*dto.MetricFamily)
expfmt/decode.go:32
↓ 3 callersMethodEncode
(*dto.MetricFamily)
expfmt/encode.go:31
↓ 3 callersMethodEqual
(o *HistogramBucket)
model/value_histogram.go:84
↓ 3 callersFunctionGetRevision
()
version/info_go118.go:26
↓ 3 callersFunctionGetTags
()
version/info_go118.go:33
↓ 3 callersMethodLen
()
model/value.go:314
↓ 3 callersFunctionNewOAuth2RoundTripper
(config *OAuth2, next http.RoundTripper, opts *httpClientOptions)
config/http_config.go:709
↓ 3 callersFunctionNewRoundTripperFromConfig
NewRoundTripperFromConfig returns a new HTTP RoundTripper configured for the given config.HTTPClientConfig and config.HTTPClientOption. The name is us
config/http_config.go:498
↓ 3 callersFunctionParseAccept
Parse an Accept Header string returning a sorted list of clauses
internal/bitbucket.org/ww/goautoneg/autoneg.go:84
↓ 3 callersMethodProxy
Proxy returns the Proxy URL for a request.
config/http_config.go:1231
↓ 3 callersMethodResolved
Resolved returns true iff the activity interval ended in the past.
model/alert.go:63
↓ 3 callersMethodSetDirectory
SetDirectory joins any relative file paths with dir. Any paths that are empty or absolute remain unchanged.
config/config.go:80
↓ 3 callersMethodUnixNano
UnixNano returns t as a Unix time, the number of nanoseconds elapsed since January 1, 1970 UTC.
model/time.go:107
↓ 3 callersMethodValidate
Validate checks whether the alert data is inconsistent.
model/alert.go:85
↓ 3 callersFunctiongetCertificateBlobs
(t *testing.T)
config/http_config_test.go:986
↓ 3 callersFunctionisCount
(name string)
expfmt/text_parse.go:740
↓ 3 callersFunctionisSum
(name string)
expfmt/text_parse.go:744
↓ 3 callersFunctionisValidLabelNameStart
(b byte)
expfmt/text_parse.go:720
↓ 3 callersFunctionlabelSetToFingerprint
labelSetToFingerprint works exactly as LabelsToSignature but takes a LabelSet as parameter (rather than a label map) and returns a Fingerprint.
model/signature.go:54
↓ 3 callersMethodreadTokenUntilNewline
readTokenUntilNewline copies bytes from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The fi
expfmt/text_parse.go:578
↓ 3 callersMethodreadTokenUntilWhitespace
readTokenUntilWhitespace copies bytes from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The
expfmt/text_parse.go:564
↓ 3 callersFunctionwriteCertificate
(bs map[string][]byte, src string, dst string)
config/http_config_test.go:1009
↓ 3 callersFunctionwriteOpenMetricsFloat
writeOpenMetricsFloat works like writeFloat but appends ".0" if the resulting number would otherwise contain neither a "." nor an "e".
expfmt/openmetrics_create.go:494
↓ 2 callersMethodAfter
After reports whether the Time t is after o.
model/time.go:80
↓ 2 callersMethodDecode
Decode calls the Decode method of the wrapped Decoder and then extracts the samples from the decoded MetricFamily into the provided model.Vector.
expfmt/decode.go:159
↓ 2 callersFunctionEncodeCertificate
(w io.Writer, cert *x509.Certificate)
config/generate.go:42
↓ 2 callersMethodEqual
Equal compares first the metrics, then the timestamp, then the value. The semantics of value equality is defined by SampleValue.Equal.
model/value.go:43
↓ 2 callersMethodGetProxyConnectHeader
ProxyConnectHeader() return the Proxy Connext Headers.
config/http_config.go:1267
↓ 2 callersMethodHTTPHeader
()
config/config.go:54
↓ 2 callersFunctionIsValidMetricName
IsValidMetricName returns true iff name matches the pattern of MetricNameRE. This function, however, does not use MetricNameRE for the check but a muc
model/metric.go:90
↓ 2 callersFunctionLoadTLSConfig
LoadTLSConfig parses the given file into a tls.Config.
config/tls_config_test.go:31
↓ 2 callersMethodLog
(keyvals ...interface{})
promlog/log_test.go:75
↓ 2 callersMethodName
Name returns the name of the alert. It is equivalent to the "alertname" label.
model/alert.go:44
↓ 2 callersFunctionNewAuthorizationCredentialsFileRoundTripper
NewAuthorizationCredentialsFileRoundTripper adds the authorization credentials read from the provided file to a request unless the authorization heade
config/http_config.go:625
↓ 2 callersFunctionNewAuthorizationCredentialsRoundTripper
NewAuthorizationCredentialsRoundTripper adds the provided credentials to a request unless the authorization header has already been set.
config/http_config.go:598
↓ 2 callersFunctionNewRoundTripCheckRequest
NewRoundTripCheckRequest creates a new instance of a type that implements http.RoundTripper, which before returning theResponse and theError, executes
config/http_config_test.go:1436
↓ 2 callersFunctionNewTLSRoundTripper
( cfg *tls.Config, settings TLSRoundTripperSettings, newRT func(*tls.Config) (http.RoundTripper, error), )
config/http_config.go:1044
↓ 2 callersFunctionNewUserAgentRoundTripper
NewUserAgentRoundTripper adds the user agent every request header.
config/http_config.go:1172
↓ 2 callersFunctionNow
Now returns the current time as a Time.
model/time.go:53
↓ 2 callersMethodRoundTrip
(r *http.Request)
config/http_config_test.go:1420
↓ 2 callersFunctionSerialNumber
()
config/generate.go:67
↓ 2 callersMethodSet
Set updates the value of the allowed level.
promlog/log.go:71
↓ 2 callersMethodSetLevel
SetLevel changes the log level.
promlog/log.go:178
↓ 2 callersMethodTime
Time returns the time.Time representation of t.
model/time.go:95
↓ 2 callersFunctionTimeFromUnix
TimeFromUnix returns the Time equivalent to the Unix Time t provided in seconds.
model/time.go:59
↓ 2 callersMethodValidate
Validate validates the HTTPClientConfig to check only one of BearerToken, BasicAuth and BearerTokenFile is configured. It also validates that ProxyURL
config/http_config.go:331
↓ 2 callersMethodWithInstrumentation
WithInstrumentation returns a router with instrumentation support.
route/route.go:55
↓ 2 callersFunctionextractSamples
(f *dto.MetricFamily, o *DecodeOptions)
expfmt/decode.go:188
↓ 2 callersMethodgetTLSDataWithHash
()
config/http_config.go:1068
↓ 2 callersFunctionisEmptyNonNilURL
checks if u equals to &url.URL{}
config/http_config_test.go:1754
↓ 2 callersFunctionisValidLabelNameContinuation
(b byte)
expfmt/text_parse.go:724
↓ 2 callersFunctionloadSigv4Config
(filename string)
sigv4/sigv4_config_test.go:24
next →1–100 of 539, ranked by callers