_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c25300
train
// exitErr is used to handle an error that is causing the // session to terminate.
{ "resource": "" }
c25301
train
// GoAway can be used to prevent accepting further // connections. It does not close the underlying conn.
{ "resource": "" }
c25302
train
// goAway is used to send a goAway message
{ "resource": "" }
c25303
train
// Ping is used to measure the RTT response time
{ "resource": "" }
c25304
train
// keepalive is a long running goroutine that periodically does // a ping to keep the connection alive.
{ "resource": "" }
c25305
train
// waitForSendErr waits to send a header, checking for a potential shutdown
{ "resource": "" }
c25306
train
// waitForSendErr waits to send a header with optional data, checking for a // potential shutdown. Since there's the expectation that sends can happen // in a timely manner, we enforce the connection write timeout here.
{ "resource": "" }
c25307
train
// sendNoWait does a send without waiting. Since there's the expectation that // the send happens right here, we enforce the connection write timeout if we // can't queue the header to be sent.
{ "resource": "" }
c25308
train
// send is a long running goroutine that sends data
{ "resource": "" }
c25309
train
// recv is a long running goroutine that accepts new data
{ "resource": "" }
c25310
train
// recvLoop continues to receive data until a fatal error is encountered
{ "resource": "" }
c25311
train
// handleStreamMessage handles either a data or window update frame
{ "resource": "" }
c25312
train
// handlePing is invokde for a typePing frame
{ "resource": "" }
c25313
train
// handleGoAway is invokde for a typeGoAway frame
{ "resource": "" }
c25314
train
// incomingStream is used to create a new incoming stream
{ "resource": "" }
c25315
train
// closeStream is used to close a stream once both sides have // issued a close. If there was an in-flight SYN and the stream // was not yet established, then this will give the credit back.
{ "resource": "" }
c25316
train
// InitializeGraphiteCollector creates the connection to the graphite server // and should be called before any metrics are recorded.
{ "resource": "" }
c25317
train
// GetCircuit returns the circuit for the given command and whether this call created it.
{ "resource": "" }
c25318
train
// Flush purges all circuit and metric information from memory.
{ "resource": "" }
c25319
train
// newCircuitBreaker creates a CircuitBreaker with associated Health
{ "resource": "" }
c25320
train
// toggleForceOpen allows manually causing the fallback logic for all instances // of a given command.
{ "resource": "" }
c25321
train
// IsOpen is called before any Command execution to check whether or // not it should be attempted. An "open" circuit means it is disabled.
{ "resource": "" }
c25322
train
// ReportEvent records command metrics for tracking recent error rates and exposing data to the dashboard.
{ "resource": "" }
c25323
train
// NewNumber initializes a RollingNumber struct.
{ "resource": "" }
c25324
train
// Increment increments the number in current timeBucket.
{ "resource": "" }
c25325
train
// UpdateMax updates the maximum value in the current bucket.
{ "resource": "" }
c25326
train
// Sum sums the values over the buckets in the last 10 seconds.
{ "resource": "" }
c25327
train
// Max returns the maximum value seen in the last 10 seconds.
{ "resource": "" }
c25328
train
// Go runs your function while tracking the health of previous calls to it. // If your function begins slowing down or failing repeatedly, we will block // new calls to it for you to give the dependent service time to repair. // // Define a fallback function if you want to define some code to execute during outages.
{ "resource": "" }
c25329
train
// DoC runs your function in a synchronous manner, blocking until either your function succeeds // or an error is returned, including hystrix circuit errors
{ "resource": "" }
c25330
train
// errorWithFallback triggers the fallback while reporting the appropriate metric events.
{ "resource": "" }
c25331
train
// Configure applies settings for a set of circuits
{ "resource": "" }
c25332
train
// ConfigureCommand applies settings for a circuit
{ "resource": "" }
c25333
train
// NumRequests returns the rolling number of requests
{ "resource": "" }
c25334
train
// Errors returns the rolling number of errors
{ "resource": "" }
c25335
train
// Successes returns the rolling number of successes
{ "resource": "" }
c25336
train
// Failures returns the rolling number of failures
{ "resource": "" }
c25337
train
// Rejects returns the rolling number of rejects
{ "resource": "" }
c25338
train
// ShortCircuits returns the rolling number of short circuits
{ "resource": "" }
c25339
train
// Timeouts returns the rolling number of timeouts
{ "resource": "" }
c25340
train
// FallbackSuccesses returns the rolling number of fallback successes
{ "resource": "" }
c25341
train
// FallbackFailures returns the rolling number of fallback failures
{ "resource": "" }
c25342
train
// TotalDuration returns the rolling total duration
{ "resource": "" }
c25343
train
// RunDuration returns the rolling run duration
{ "resource": "" }
c25344
train
// Reset resets all metrics in this collector to 0.
{ "resource": "" }
c25345
train
// NewTiming creates a RollingTiming struct.
{ "resource": "" }
c25346
train
// SortedDurations returns an array of time.Duration sorted from shortest // to longest that have occurred in the last 60 seconds.
{ "resource": "" }
c25347
train
// Add appends the time.Duration given to the current time bucket.
{ "resource": "" }
c25348
train
// Percentile computes the percentile given with a linear interpolation.
{ "resource": "" }
c25349
train
// Mean computes the average timing in the last 60 seconds.
{ "resource": "" }
c25350
train
// The Default Collector function will panic if collectors are not setup to specification.
{ "resource": "" }
c25351
train
// Start begins watching the in-memory circuit breakers for metrics
{ "resource": "" }
c25352
train
// InitializeMetricCollectors runs the registried MetricCollector Initializers to create an array of MetricCollectors.
{ "resource": "" }
c25353
train
// Register places a MetricCollector Initializer in the registry maintained by this metricCollectorRegistry.
{ "resource": "" }
c25354
train
// versionAtMost will return true if the provided version is less than or equal to max
{ "resource": "" }
c25355
train
// versionCompare take to versions split into integer arrays and attempts to compare them // An error will be returned if there is an array length mismatch. // Return values are as follows // -1 - v1 is less than v2 // 0 - v1 is equal to v2 // 1 - v1 is greater than v2
{ "resource": "" }
c25356
train
// parseVersion will parse any integer type version seperated by periods. // This does not fully support semver style versions.
{ "resource": "" }
c25357
train
// New creates a new service based on a service interface and configuration.
{ "resource": "" }
c25358
train
// bool returns the value of the given name, assuming the value is a boolean. // If the value isn't found or is not of the type, the defaultValue is returned.
{ "resource": "" }
c25359
train
// Control issues control functions to the service from a given action string.
{ "resource": "" }
c25360
train
// Errorf logs an error message.
{ "resource": "" }
c25361
train
// Warningf logs an warning message.
{ "resource": "" }
c25362
train
// Infof logs an info message.
{ "resource": "" }
c25363
train
// NError logs an error message and an event ID.
{ "resource": "" }
c25364
train
// NWarning logs an warning message and an event ID.
{ "resource": "" }
c25365
train
// NInfo logs an info message and an event ID.
{ "resource": "" }
c25366
train
// NErrorf logs an error message and an event ID.
{ "resource": "" }
c25367
train
// NWarningf logs an warning message and an event ID.
{ "resource": "" }
c25368
train
// NInfof logs an info message and an event ID.
{ "resource": "" }
c25369
train
// getStopTimeout fetches the time before windows will kill the service.
{ "resource": "" }
c25370
train
// simpleEditor is used as the default gocui editor.
{ "resource": "" }
c25371
train
// EditWrite writes a rune at the cursor position.
{ "resource": "" }
c25372
train
// EditDelete deletes a rune at the cursor position. back determines the // direction.
{ "resource": "" }
c25373
train
// EditNewLine inserts a new line under the cursor.
{ "resource": "" }
c25374
train
// mergeLines merges the lines "y" and "y+1" if possible.
{ "resource": "" }
c25375
train
// newKeybinding returns a new Keybinding object.
{ "resource": "" }
c25376
train
// matchKeypress returns if the keybinding matches the keypress.
{ "resource": "" }
c25377
train
// matchView returns if the keybinding matches the current view.
{ "resource": "" }
c25378
train
// String returns a string from a given cell slice.
{ "resource": "" }
c25379
train
// newView returns a new View object.
{ "resource": "" }
c25380
train
// Size returns the number of visible columns and rows in the View.
{ "resource": "" }
c25381
train
// setRune sets a rune at the given point relative to the view. It applies the // specified colors, taking into account if the cell must be highlighted. Also, // it checks if the position is valid.
{ "resource": "" }
c25382
train
// SetCursor sets the cursor position of the view at the given point, // relative to the view. It checks if the position is valid.
{ "resource": "" }
c25383
train
// Cursor returns the cursor position of the view.
{ "resource": "" }
c25384
train
// SetOrigin sets the origin position of the view's internal buffer, // so the buffer starts to be printed from this point, which means that // it is linked with the origin point of view. It can be used to // implement Horizontal and Vertical scrolling with just incrementing // or decrementing ox and oy.
{ "resource": "" }
c25385
train
// Origin returns the origin position of the view.
{ "resource": "" }
c25386
train
// Write appends a byte slice into the view's internal buffer. Because // View implements the io.Writer interface, it can be passed as parameter // of functions like fmt.Fprintf, fmt.Fprintln, io.Copy, etc. Clear must // be called to clear the view's buffer.
{ "resource": "" }
c25387
train
// parseInput parses char by char the input written to the View. It returns nil // while processing ESC sequences. Otherwise, it returns a cell slice that // contains the processed data.
{ "resource": "" }
c25388
train
// draw re-draws the view's contents.
{ "resource": "" }
c25389
train
// Clear empties the view's internal buffer.
{ "resource": "" }
c25390
train
// clearRunes erases all the cells in the view.
{ "resource": "" }
c25391
train
// BufferLines returns the lines in the view's internal // buffer.
{ "resource": "" }
c25392
train
// Buffer returns a string with the contents of the view's internal // buffer.
{ "resource": "" }
c25393
train
// ViewBufferLines returns the lines in the view's internal // buffer that is shown to the user.
{ "resource": "" }
c25394
train
// ViewBuffer returns a string with the contents of the view's buffer that is // shown to the user.
{ "resource": "" }
c25395
train
// runes in case of error will output the non-parsed runes as a string.
{ "resource": "" }
c25396
train
// newEscapeInterpreter returns an escapeInterpreter that will be able to parse // terminal escape sequences.
{ "resource": "" }
c25397
train
// reset sets the escapeInterpreter in initial state.
{ "resource": "" }
c25398
train
// parseOne parses a rune. If isEscape is true, it means that the rune is part // of an escape sequence, and as such should not be printed verbatim. Otherwise, // it's not an escape sequence.
{ "resource": "" }
c25399
train
// NewGui returns a new Gui object with a given output mode.
{ "resource": "" }