_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c6400
train
// UnmarshalYAML implements the yaml.Unmarshaler interface
{ "resource": "" }
c6401
train
// NewClient returns a http.Client using the specified http.RoundTripper.
{ "resource": "" }
c6402
train
// NewClientFromConfig returns a new HTTP client configured for the // given config.HTTPClientConfig. The name is used as go-conntrack metric label.
{ "resource": "" }
c6403
train
// NewRoundTripperFromConfig returns a new HTTP RoundTripper configured for the // given config.HTTPClientConfig. The name is used as go-conntrack metric label.
{ "resource": "" }
c6404
train
// 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.
{ "resource": "" }
c6405
train
// NewTLSConfig creates a new tls.Config from the given TLSConfig.
{ "resource": "" }
c6406
train
// getClientCertificate reads the pair of client cert and key from disk and returns a tls.Certificate.
{ "resource": "" }
c6407
train
// readCAFile reads the CA cert file from disk.
{ "resource": "" }
c6408
train
// updateRootCA parses the given byte slice as a series of PEM encoded certificates and updates tls.Config.RootCAs.
{ "resource": "" }
c6409
train
// RoundTrip implements the http.RoundTrip interface.
{ "resource": "" }
c6410
train
// 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.
{ "resource": "" }
c6411
train
// sourced adds a source field to the logger that contains // the file name and line where the logging happened.
{ "resource": "" }
c6412
train
// NewLogger returns a new Logger logging to out.
{ "resource": "" }
c6413
train
// NewNopLogger returns a logger that discards all log messages.
{ "resource": "" }
c6414
train
// Equal compares the metrics.
{ "resource": "" }
c6415
train
// Before compares the metrics' underlying label sets.
{ "resource": "" }
c6416
train
// Clone returns a copy of the Metric.
{ "resource": "" }
c6417
train
// 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.
{ "resource": "" }
c6418
train
// NewCollector returns a collector which exports metrics about current version information.
{ "resource": "" }
c6419
train
// Print returns version information.
{ "resource": "" }
c6420
train
// Set updates the value of the allowed level.
{ "resource": "" }
c6421
train
// Set updates the value of the allowed format.
{ "resource": "" }
c6422
train
// New returns a new leveled oklog logger. Each logged line will be annotated // with a timestamp. The output always goes to stderr.
{ "resource": "" }
c6423
train
// Validate checks whether all names and values in the label set // are valid.
{ "resource": "" }
c6424
train
// Clone returns a copy of the label set.
{ "resource": "" }
c6425
train
// Merge is a helper function to non-destructively merge two label sets.
{ "resource": "" }
c6426
train
// Add returns the Time t + d.
{ "resource": "" }
c6427
train
// Sub returns the Duration t - o.
{ "resource": "" }
c6428
train
// Time returns the time.Time representation of t.
{ "resource": "" }
c6429
train
// String returns a string representation of the Time.
{ "resource": "" }
c6430
train
// 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.
{ "resource": "" }
c6431
train
// 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.
{ "resource": "" }
c6432
train
// Equal returns true if this SamplePair and o have equal Values and equal // Timestamps. The semantics of Value equality is defined by SampleValue.Equal.
{ "resource": "" }
c6433
train
// Equal compares first the metrics, then the timestamp, then the value. The // semantics of value equality is defined by SampleValue.Equal.
{ "resource": "" }
c6434
train
// parseError sets p.err to a ParseError at the current line with the given // message.
{ "resource": "" }
c6435
train
// 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 // i...
{ "resource": "" }
c6436
train
// Param returns param p for the context, or the empty string when // param does not exist in context.
{ "resource": "" }
c6437
train
// WithParam returns a new context with param p set to v.
{ "resource": "" }
c6438
train
// WithInstrumentation returns a router with instrumentation support.
{ "resource": "" }
c6439
train
// WithPrefix returns a router that prefixes all registered routes with prefix.
{ "resource": "" }
c6440
train
// handle turns a HandlerFunc into an httprouter.Handle.
{ "resource": "" }
c6441
train
// Get registers a new GET route.
{ "resource": "" }
c6442
train
// Options registers a new OPTIONS route.
{ "resource": "" }
c6443
train
// Del registers a new DELETE route.
{ "resource": "" }
c6444
train
// Put registers a new PUT route.
{ "resource": "" }
c6445
train
// Post registers a new POST route.
{ "resource": "" }
c6446
train
// 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.
{ "resource": "" }
c6447
train
// ResponseFormat extracts the correct format from a HTTP response header. // If no matching format can be found FormatUnknown is returned.
{ "resource": "" }
c6448
train
// 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.
{ "resource": "" }
c6449
train
// Decode calls the Decode method of the wrapped Decoder and then extracts the // samples from the decoded MetricFamily into the provided model.Vector.
{ "resource": "" }
c6450
train
// 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.
{ "resource": "" }
c6451
train
//UnmarshalYAML implements the yaml.Unmarshaler interface for Secrets.
{ "resource": "" }
c6452
train
// 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...
{ "resource": "" }
c6453
train
// 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.
{ "resource": "" }
c6454
train
// 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.
{ "resource": "" }
c6455
train
// Validate checks whether the alert data is inconsistent.
{ "resource": "" }
c6456
train
// HasFiring returns true iff one of the alerts is not resolved.
{ "resource": "" }
c6457
train
// 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.
{ "resource": "" }
c6458
train
// Validate returns true iff all fields of the matcher have valid values.
{ "resource": "" }
c6459
train
// Validate returns true iff all fields of the silence have valid values.
{ "resource": "" }
c6460
train
// Dial connects a CoAP client.
{ "resource": "" }
c6461
train
// Send a message. Get a response if there is one.
{ "resource": "" }
c6462
train
// Does path match pattern?
{ "resource": "" }
c6463
train
// ServeCOAP handles a single COAP message. The message arrives from // the given listener having originated from the given UDPAddr.
{ "resource": "" }
c6464
train
// Handle configures a handler for the given path.
{ "resource": "" }
c6465
train
// HandleFunc configures a handler for the given path.
{ "resource": "" }
c6466
train
// FuncHandler builds a handler from a function.
{ "resource": "" }
c6467
train
// Transmit a message.
{ "resource": "" }
c6468
train
// ListenAndServe binds to the given address and serve requests forever.
{ "resource": "" }
c6469
train
// Options gets all the values for the given option.
{ "resource": "" }
c6470
train
// Option gets the first value for the given option ID.
{ "resource": "" }
c6471
train
// RemoveOption removes all references to an option
{ "resource": "" }
c6472
train
// AddOption adds an option.
{ "resource": "" }
c6473
train
// SetOption sets an option, discarding any previous value
{ "resource": "" }
c6474
train
// MarshalBinary produces the binary form of this Message.
{ "resource": "" }
c6475
train
// ParseMessage extracts the Message from the given input.
{ "resource": "" }
c6476
train
// Decode reads a single message from its input.
{ "resource": "" }
c6477
train
// isDate tells whether given string is a valid full-date production // as defined by RFC 3339, section 5.6.
{ "resource": "" }
c6478
train
// isTime tells whether given string is a valid full-time production // as defined by RFC 3339, section 5.6.
{ "resource": "" }
c6479
train
// 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.
{ "resource": "" }
c6480
train
// isIPV6 tells whether given string is a valid representation of an IPv6 address // as defined in RFC 2373, section 2.2.
{ "resource": "" }
c6481
train
// isURI tells whether given string is valid URI, according to RFC 3986.
{ "resource": "" }
c6482
train
// isURITemplate tells whether given string is a valid URI Template // according to RFC6570. // // Current implementation does minimal validation.
{ "resource": "" }
c6483
train
// 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.
{ "resource": "" }
c6484
train
// DecodeJSON decodes json document from r. // // Note that number is decoded into json.Number instead of as a float64
{ "resource": "" }
c6485
train
// jsonType returns the json type of given value v. // // It panics if the given value is not valid json value
{ "resource": "" }
c6486
train
// equals tells if given two json values are equal or not.
{ "resource": "" }
c6487
train
// escape converts given token to valid json-pointer token
{ "resource": "" }
c6488
train
// AddResource adds in-memory resource to the compiler. // // Note that url must not have fragment
{ "resource": "" }
c6489
train
// Compile parses json-schema at given url returns, if successful, // a Schema object that can be used to match against json.
{ "resource": "" }
c6490
train
// BackgroundRun starts the update check and apply cycle.
{ "resource": "" }
c6491
train
// 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.
{ "resource": "" }
c6492
train
// 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.
{ "resource": "" }
c6493
train
// SetFileLabel modifies the "path" label to the specified file label
{ "resource": "" }
c6494
train
// SetFileCreateLabel tells the kernel the label for all files to be created
{ "resource": "" }
c6495
train
// 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.
{ "resource": "" }
c6496
train
// Validate checks that the label does not include unexpected options
{ "resource": "" }
c6497
train
// RelabelNeeded checks whether the user requested a relabel
{ "resource": "" }
c6498
train
// findSELinuxfsMount returns a next selinuxfs mount point found, // if there is one, or an empty string in case of EOF or error.
{ "resource": "" }
c6499
train
// SetFileLabel sets the SELinux label for this path or returns an error.
{ "resource": "" }