_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c15200
train
// SetListenAddress for exposing metrics on address. If not set, it will be exposed at the // same address of the gin engine that is being used
{ "resource": "" }
c15201
train
// SetMetricsPath set metrics paths
{ "resource": "" }
c15202
train
// SetMetricsPathWithAuth set metrics paths with authentication
{ "resource": "" }
c15203
train
// NewMetric associates prometheus.Collector based on Metric.Type
{ "resource": "" }
c15204
train
// Use adds the middleware to a gin engine.
{ "resource": "" }
c15205
train
// UseWithAuth adds the middleware to a gin engine with BasicAuth.
{ "resource": "" }
c15206
train
// HandlerFunc defines handler function for middleware
{ "resource": "" }
c15207
train
// finndBlice looks for a blice in the trie starting from the root and // returns a pointer to the node representing the end of the blice. If // the blice is not found it returns nil.
{ "resource": "" }
c15208
train
// buildTrie builds the fundamental trie structure from a set of // blices.
{ "resource": "" }
c15209
train
// NewMatcher creates a new Matcher used to match against a set of // blices
{ "resource": "" }
c15210
train
// Match searches in for blices and returns all the blices found as // indexes into the original dictionary
{ "resource": "" }
c15211
train
// stopHandler stops the fetcher if the stopurl is reached. Otherwise it dispatches // the call to the wrapped Handler.
{ "resource": "" }
c15212
train
// logHandler prints the fetch information and dispatches the call to the wrapped Handler.
{ "resource": "" }
c15213
train
// NewHandlerCmd creates a HandlerCmd for the provided request and callback // handler function.
{ "resource": "" }
c15214
train
// Handle is the Handler interface implementation for the HandlerFunc type.
{ "resource": "" }
c15215
train
// NewMux returns an initialized Mux.
{ "resource": "" }
c15216
train
// Handle is the Handler interface implementation for Mux. It dispatches the calls // to the matching Handler.
{ "resource": "" }
c15217
train
// HandleError registers a Handler for a specific error value. Multiple calls // with the same error value override previous calls. As a special case, a nil // error value registers a Handler for any error that doesn't have a specific // Handler.
{ "resource": "" }
c15218
train
// match indicates if the response Handler matches the provided response, and if so, // and if a path criteria is specified, it also indicates the length of the path match.
{ "resource": "" }
c15219
train
// Status sets a criteria based on the Status code of the response for the Response Handler. // Its Handler will only be called if the response has this status code.
{ "resource": "" }
c15220
train
// StatusRange sets a criteria based on the Status code of the response for the Response Handler. // Its Handler will only be called if the response has a status code between the min and max. // If min is greater than max, the values are switched.
{ "resource": "" }
c15221
train
// Scheme sets a criteria based on the scheme of the URL for the Response Handler. Its Handler // will only be called if the scheme of the URL matches exactly the specified scheme.
{ "resource": "" }
c15222
train
// Host sets a criteria based on the host of the URL for the Response Handler. Its Handler // will only be called if the host of the URL matches exactly the specified host.
{ "resource": "" }
c15223
train
// Path sets a criteria based on the path of the URL for the Response Handler. Its Handler // will only be called if the path of the URL starts with this path. Longer matches // have priority over shorter ones.
{ "resource": "" }
c15224
train
// Custom sets a criteria based on a function that receives the HTTP response // and returns true if the matcher should be used to handle this response, // false otherwise.
{ "resource": "" }
c15225
train
// Handler sets the Handler to be called when this Response Handler is the match for // a given response. It registers the Response Handler in its parent Mux.
{ "resource": "" }
c15226
train
// New returns an initialized Fetcher.
{ "resource": "" }
c15227
train
// Close closes the Queue so that no more Commands can be sent. It blocks until // the Fetcher drains all pending commands. After the call, the Fetcher is stopped. // Attempts to enqueue new URLs after Close has been called will always result in // a ErrQueueClosed error.
{ "resource": "" }
c15228
train
// Cancel closes the Queue and drains the pending commands without processing // them, allowing for a fast "stop immediately"-ish operation.
{ "resource": "" }
c15229
train
// Send enqueues a Command into the Fetcher. If the Queue has been closed, it // returns ErrQueueClosed. The Command's URL must have a Host.
{ "resource": "" }
c15230
train
// SendString enqueues a method and some URL strings into the Fetcher. It returns an error // if the URL string cannot be parsed, or if the Queue has been closed. // The first return value is the number of URLs successfully enqueued.
{ "resource": "" }
c15231
train
// SendStringHead enqueues the URL strings to be fetched with a HEAD method. // It returns an error if the URL string cannot be parsed, or if the Queue has been closed. // The first return value is the number of URLs successfully enqueued.
{ "resource": "" }
c15232
train
// SendStringGet enqueues the URL strings to be fetched with a GET method. // It returns an error if the URL string cannot be parsed, or if the Queue has been closed. // The first return value is the number of URLs successfully enqueued.
{ "resource": "" }
c15233
train
// Start starts the Fetcher, and returns the Queue to use to send Commands to be fetched.
{ "resource": "" }
c15234
train
// Debug returns the channel to use to receive the debugging information. It is not intended // to be used by package users.
{ "resource": "" }
c15235
train
// processQueue runs the queue in its own goroutine.
{ "resource": "" }
c15236
train
// Goroutine for a host's worker, processing requests for all its URLs.
{ "resource": "" }
c15237
train
// Get the robots.txt User-Agent-specific group.
{ "resource": "" }
c15238
train
// Call the Handler for this Command. Closes the response's body.
{ "resource": "" }
c15239
train
// Prepare and execute the request for this Command.
{ "resource": "" }
c15240
train
// sliceIQ creates an infinite buffered channel taking input on // in and sending output to next. SliceIQ should be run in its // own goroutine.
{ "resource": "" }
c15241
train
// NewPQueue creates a new priority queue with the provided pqtype // ordering type
{ "resource": "" }
c15242
train
// Push the value item into the priority queue with provided priority.
{ "resource": "" }
c15243
train
// Size returns the elements present in the priority queue count
{ "resource": "" }
c15244
train
// Check queue is empty
{ "resource": "" }
c15245
train
// NewCappedDeque creates a Deque with the specified capacity limit.
{ "resource": "" }
c15246
train
// Size returns the actual deque size
{ "resource": "" }
c15247
train
// Capacity returns the capacity of the deque, or -1 if unlimited
{ "resource": "" }
c15248
train
// Empty checks if the deque is empty
{ "resource": "" }
c15249
train
// Full checks if the deque is full
{ "resource": "" }
c15250
train
// functions to convert a core.Task to a Task
{ "resource": "" }
c15251
train
// SecurityTLSEnabled generates security object for securing gRPC communication
{ "resource": "" }
c15252
train
// SecurityTLSExtended generates security object for securing gRPC communication. // This function accepts also a list of CA cert paths for verifying TLS participant's // identity.
{ "resource": "" }
c15253
train
// NewCollectorGrpcClient returns a collector gRPC Client.
{ "resource": "" }
c15254
train
// NewStreamCollectorGrpcClient returns a stream collector gRPC client
{ "resource": "" }
c15255
train
// NewProcessorGrpcClient returns a processor gRPC Client.
{ "resource": "" }
c15256
train
// NewPublisherGrpcClient returns a publisher gRPC Client.
{ "resource": "" }
c15257
train
// newPluginGrpcClient returns a configured gRPC Client.
{ "resource": "" }
c15258
train
// GetConfigPolicy returns a ConfigPolicyTree for testing
{ "resource": "" }
c15259
train
// Run before every command
{ "resource": "" }
c15260
train
// Checks if a tribe command was issued when tribe mode was not // enabled on the specified snapteld instance.
{ "resource": "" }
c15261
train
// Select selects an available plugin using the least-recently-used strategy.
{ "resource": "" }
c15262
train
// Remove selects a plugin // Since there is no state to cleanup we only need to return the selected plugin
{ "resource": "" }
c15263
train
// ListMembers retrieves a list of tribe members through an HTTP GET call. // A list of tribe member returns if it succeeds. Otherwise, an error is returned.
{ "resource": "" }
c15264
train
// GetMember retrieves the tribe member given a member name. // The request is an HTTP GET call. The corresponding tribe member object returns // if it succeeds. Otherwise, an error is returned.
{ "resource": "" }
c15265
train
// ListAgreements retrieves a list of a tribe agreements through an HTTP GET call. // A list of tribe agreement map returns if it succeeds. Otherwise, an error is returned.
{ "resource": "" }
c15266
train
// AddAgreement adds a tribe agreement giving an agreement name into tribe agreement list // through an HTTP POST call. A map of tribe agreements with the newly added named agreement // returns if it succeeds. Otherwise, an error is returned. Note that the newly added agreement // has no effect unless members join the ...
{ "resource": "" }
c15267
train
// DeleteAgreement removes a tribe agreement giving an agreement name from the tribe agreement list // through an HTTP DELETE call. A map of tribe agreements with the specified agreement removed returns // if it succeeds. Otherwise, an error is returned. Note deleting an agreement removes the agreement // from the trib...
{ "resource": "" }
c15268
train
// GetAgreement retrieves a tribe agreement given an agreement name through an HTTP GET call. // A tribe agreement returns if it succeeded. Otherwise, an error is returned.
{ "resource": "" }
c15269
train
// JoinAgreement adds a tribe member into the agreement given the agreement name and the member name. // It is an HTTP PUT request. The agreement with the newly added member returns if it succeeds. // Otherwise, an error is returned. Note that dual directional agreement replication happens automatically // through the ...
{ "resource": "" }
c15270
train
// LeaveAgreement removes a member from the agreement given the agreement and member names through // an HTTP DELETE call. The agreement with the removed member returns if it succeeds. // Otherwise, an error is returned. For example, it is useful to leave an agreement for a member node repair.
{ "resource": "" }
c15271
train
// Convert core.Namespace to common.Namespace protobuf message
{ "resource": "" }
c15272
train
// Convert common.Metric to core.Metric
{ "resource": "" }
c15273
train
// Convert common.Namespace protobuf message to core.Namespace
{ "resource": "" }
c15274
train
// Convert core.SubscribedPlugin to SubscribedPlugin protobuf message
{ "resource": "" }
c15275
train
// Convert from a SubscribedPlugin protobuf message to core.SubscribedPlugin
{ "resource": "" }
c15276
train
// Convert from core.Plugin to Plugin protobuf message
{ "resource": "" }
c15277
train
// Convert from Plugin protobuf message to core.Plugin
{ "resource": "" }
c15278
train
// Converts Plugin protobuf message to core.Plugin
{ "resource": "" }
c15279
train
// Converts slice of plugin protobuf messages to core.Plugins
{ "resource": "" }
c15280
train
// Converts slice of SubscribedPlugin Messages to core.SubscribedPlugins
{ "resource": "" }
c15281
train
// Converts core.SubscribedPlugins to protobuf messages
{ "resource": "" }
c15282
train
// Converts configMaps to ConfigDataNode
{ "resource": "" }
c15283
train
// Converts ConfigDataNode to ConfigMap protobuf message
{ "resource": "" }
c15284
train
// Converts SnapError protobuf messages to serror.Snaperrors
{ "resource": "" }
c15285
train
// Converts a single SnapError protobuf message to SnapError
{ "resource": "" }
c15286
train
// Returns the fields from a SnapError protobuf message
{ "resource": "" }
c15287
train
// Returns the managesMetric instance that maps to given // string. If an empty string is given, will instead return // the local instance passed in on initialization.
{ "resource": "" }
c15288
train
// WmapToWorkflow attempts to convert a wmap.WorkflowMap to a schedulerWorkflow instance.
{ "resource": "" }
c15289
train
// Start starts a workflow
{ "resource": "" }
c15290
train
// workJobs takes a slice of process and publish nodes and submits jobs for each for a task. // It then iterates down any process nodes to submit their child node jobs for the task
{ "resource": "" }
c15291
train
// GetClientConnection returns a grcp.ClientConn that is unsecured
{ "resource": "" }
c15292
train
// IsTLSEnabled returns true if config values enable TLS in plugin communication
{ "resource": "" }
c15293
train
// WritePEMFile writes block of bytes into a PEM formatted file with given header.
{ "resource": "" }
c15294
train
// MakeCACertKeyPair generates asymmetric private key and certificate // for CA, suitable for signing certificates
{ "resource": "" }
c15295
train
// MakeSubjCertKeyPair generates a private key and a certificate for subject // suitable for securing TLS communication
{ "resource": "" }
c15296
train
// GetConfigTree converts config data for collection node in wmap into a proper cdata.ConfigDataTree
{ "resource": "" }
c15297
train
// merge the command-line options into the current task
{ "resource": "" }
c15298
train
// and define an implementation for that type that performs the schema validation
{ "resource": "" }
c15299
train
//NewTask creates a Task
{ "resource": "" }