_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c6400
// UnmarshalYAML implements the yaml.Unmarshaler interface
c6401
// NewClient returns a http.Client using the specified http.RoundTripper.
c6402
// NewClientFromConfig returns a new HTTP client configured for the // given config.HTTPClientConfig. The name is used as go-conntrack metric label.
c6403
// NewRoundTripperFromConfig returns a new HTTP RoundTripper configured for the // given config.HTTPClientConfig. The name is used as go-conntrack metric label.
c6404
// NewBearerAuthFileRoundTripper adds the bearer token read from the provided file to a request unless // the authorization header has already been set. This file is read for every request.
c6405
// NewTLSConfig creates a new tls.Config from the given TLSConfig.
c6406
// getClientCertificate reads the pair of client cert and key from disk and returns a tls.Certificate.
c6407
// readCAFile reads the CA cert file from disk.
c6408
// updateRootCA parses the given byte slice as a series of PEM encoded certificates and updates tls.Config.RootCAs.
c6409
// RoundTrip implements the http.RoundTrip interface.
c6410
// labelSetToFastFingerprint works similar to labelSetToFingerprint but uses a // faster and less allocation-heavy hash function, which is more susceptible to // create hash collisions. Therefore, collision detection should be applied.
c6411
// sourced adds a source field to the logger that contains // the file name and line where the logging happened.
c6412
// NewLogger returns a new Logger logging to out.
c6413
// NewNopLogger returns a logger that discards all log messages.
c6414
// Equal compares the metrics.
c6415
// Before compares the metrics' underlying label sets.
c6416
// Clone returns a copy of the Metric.
c6417
// IsValidMetricName returns true iff name matches the pattern of MetricNameRE. // This function, however, does not use MetricNameRE for the check but a much // faster hardcoded implementation.
c6418
// NewCollector returns a collector which exports metrics about current version information.
c6419
// Print returns version information.
c6420
// Set updates the value of the allowed level.
c6421
// Set updates the value of the allowed format.
c6422
// New returns a new leveled oklog logger. Each logged line will be annotated // with a timestamp. The output always goes to stderr.
c6423
// Validate checks whether all names and values in the label set // are valid.
c6424
// Clone returns a copy of the label set.
c6425
// Merge is a helper function to non-destructively merge two label sets.
c6426
// Add returns the Time t + d.
c6427
// Sub returns the Duration t - o.
c6428
// Time returns the time.Time representation of t.
c6429
// String returns a string representation of the Time.
c6430
// 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.
c6431
// Equal returns true if the value of v and o is equal or if both are NaN. Note // that v==o is false if both are NaN. If you want the conventional float // behavior, use == to compare two SampleValues.
c6432
// Equal returns true if this SamplePair and o have equal Values and equal // Timestamps. The semantics of Value equality is defined by SampleValue.Equal.
c6433
// Equal compares first the metrics, then the timestamp, then the value. The // semantics of value equality is defined by SampleValue.Equal.
c6434
// parseError sets p.err to a ParseError at the current line with the given // message.
c6435
// readTokenAsLabelValue copies a label value from p.buf into p.currentToken. // In contrast to the other 'readTokenAs...' functions, which start with the // last read byte in p.currentByte, this method ignores p.currentByte and starts // with reading a new byte from p.buf. The first byte not part of a label value // is still copied into p.currentByte, but not into p.currentToken.
c6436
// Param returns param p for the context, or the empty string when // param does not exist in context.
c6437
// WithParam returns a new context with param p set to v.
c6438
// WithInstrumentation returns a router with instrumentation support.
c6439
// WithPrefix returns a router that prefixes all registered routes with prefix.
c6440
// handle turns a HandlerFunc into an httprouter.Handle.
c6441
// Get registers a new GET route.
c6442
// Options registers a new OPTIONS route.
c6443
// Del registers a new DELETE route.
c6444
// Put registers a new PUT route.
c6445
// Post registers a new POST route.
c6446
// 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 include // functionality for handling relative paths or full URL redirects.
c6447
// ResponseFormat extracts the correct format from a HTTP response header. // If no matching format can be found FormatUnknown is returned.
c6448
// 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.
c6449
// Decode calls the Decode method of the wrapped Decoder and then extracts the // samples from the decoded MetricFamily into the provided model.Vector.
c6450
// ExtractSamples builds a slice of samples from the provided metric // families. If an error occurrs during sample extraction, it continues to // extract from the remaining metric families. The returned error is the last // error that has occurred.
c6451
//UnmarshalYAML implements the yaml.Unmarshaler interface for Secrets.
c6452
// MetricFamilyToText converts a MetricFamily proto message into text format and // writes the resulting lines to 'out'. It returns the number of bytes written // and any error encountered. The output will have the same order as the input, // no further sorting is performed. Furthermore, this function assumes the input // is already sanitized and does not perform any sanity checks. If the input // contains duplicate metrics or invalid metric or label names, the conversion // will result in invalid text format output. // // This method fulfills the type 'prometheus.encoder'.
c6453
// writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes // a few common cases for increased efficiency. For non-hardcoded cases, it uses // strconv.AppendFloat to avoid allocations, similar to writeInt.
c6454
// 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.
c6455
// Validate checks whether the alert data is inconsistent.
c6456
// HasFiring returns true iff one of the alerts is not resolved.
c6457
// 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 // hardcoded implementation.
c6458
// Validate returns true iff all fields of the matcher have valid values.
c6459
// Validate returns true iff all fields of the silence have valid values.
c6460
// Dial connects a CoAP client.
c6461
// Send a message. Get a response if there is one.
c6462
// Does path match pattern?
c6463
// ServeCOAP handles a single COAP message. The message arrives from // the given listener having originated from the given UDPAddr.
c6464
// Handle configures a handler for the given path.
c6465
// HandleFunc configures a handler for the given path.
c6466
// FuncHandler builds a handler from a function.
c6467
// Transmit a message.
c6468
// ListenAndServe binds to the given address and serve requests forever.
c6469
// Options gets all the values for the given option.
c6470
// Option gets the first value for the given option ID.
c6471
// RemoveOption removes all references to an option
c6472
// AddOption adds an option.
c6473
// SetOption sets an option, discarding any previous value
c6474
// MarshalBinary produces the binary form of this Message.
c6475
// ParseMessage extracts the Message from the given input.
c6476
// Decode reads a single message from its input.
c6477
// isDate tells whether given string is a valid full-date production // as defined by RFC 3339, section 5.6.
c6478
// isTime tells whether given string is a valid full-time production // as defined by RFC 3339, section 5.6.
c6479
// isIPV4 tells whether given string is a valid representation of an IPv4 address // according to the "dotted-quad" ABNF syntax as defined in RFC 2673, section 3.2.
c6480
// isIPV6 tells whether given string is a valid representation of an IPv6 address // as defined in RFC 2373, section 2.2.
c6481
// isURI tells whether given string is valid URI, according to RFC 3986.
c6482
// isURITemplate tells whether given string is a valid URI Template // according to RFC6570. // // Current implementation does minimal validation.
c6483
// isRegex tells whether given string is a valid regular expression, // according to the ECMA 262 regular expression dialect. // // The implementation uses go-lang regexp package.
c6484
// DecodeJSON decodes json document from r. // // Note that number is decoded into json.Number instead of as a float64
c6485
// jsonType returns the json type of given value v. // // It panics if the given value is not valid json value
c6486
// equals tells if given two json values are equal or not.
c6487
// escape converts given token to valid json-pointer token
c6488
// AddResource adds in-memory resource to the compiler. // // Note that url must not have fragment
c6489
// Compile parses json-schema at given url returns, if successful, // a Schema object that can be used to match against json.
c6490
// BackgroundRun starts the update check and apply cycle.
c6491
// Fetch will return an HTTP request to the specified url and return // the body of the result. An error will occur for a non 200 status code.
c6492
// InitLabels returns the process label and file labels to be used within // the container. A list of options can be passed into this function to alter // the labels. The labels returned will include a random MCS String, that is // guaranteed to be unique.
c6493
// SetFileLabel modifies the "path" label to the specified file label
c6494
// SetFileCreateLabel tells the kernel the label for all files to be created
c6495
// Relabel changes the label of path to the filelabel string. // It changes the MCS label to s0 if shared is true. // This will allow all containers to share the content.
c6496
// Validate checks that the label does not include unexpected options
c6497
// RelabelNeeded checks whether the user requested a relabel
c6498
// findSELinuxfsMount returns a next selinuxfs mount point found, // if there is one, or an empty string in case of EOF or error.
c6499
// SetFileLabel sets the SELinux label for this path or returns an error.