_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c11000
train
// Decode attempts to decode the AttributeMap into the dst interface.
{ "resource": "" }
c11001
train
// Run runs the apachethrift behavior
{ "resource": "" }
c11002
train
// Add moves the current time of the fake clock forward by the duration. // This should only be called from a single goroutine at a time.
{ "resource": "" }
c11003
train
// Set advances the current time of the fake clock to the given absolute time.
{ "resource": "" }
c11004
train
// FakeTimer produces a timer that will emit a time some duration after now, // exposing the fake timer internals and type.
{ "resource": "" }
c11005
train
// FakeAfterFunc waits for the duration to elapse and then executes a function. // A Timer is returned that can be stopped.
{ "resource": "" }
c11006
train
// Now returns the current time on the fake clock.
{ "resource": "" }
c11007
train
// Reset adjusts the timer's scheduled time forward from now, unless it has // already fired.
{ "resource": "" }
c11008
train
// Stop removes a timer from the scheduled timers.
{ "resource": "" }
c11009
train
// NewHelloYARPCClient builds a new YARPC client for the Hello service.
{ "resource": "" }
c11010
train
// BuildHelloYARPCProcedures prepares an implementation of the Hello service for YARPC registration.
{ "resource": "" }
c11011
train
// StartTransports is the first step in startup. It starts all transports // configured on the dispatcher, which is a necessary precondition for making // and receiving RPCs. It's safe to call concurrently, but all calls after the // first return an error.
{ "resource": "" }
c11012
train
// StartOutbounds is the second phase of startup. It starts all outbounds // configured on the dispatcher, which allows users of the dispatcher to // construct clients and begin making outbound RPCs. It's safe to call // concurrently, but all calls after the first return an error.
{ "resource": "" }
c11013
train
// StartInbounds is the final phase of startup. It starts all inbounds // configured on the dispatcher, which allows any registered procedures to // begin receiving requests. It's safe to call concurrently, but all calls // after the first return an error.
{ "resource": "" }
c11014
train
// StopInbounds is the first step in shutdown. It stops all inbounds // configured on the dispatcher, which stops routing RPCs to all registered // procedures. It's safe to call concurrently, but all calls after the first // return an error.
{ "resource": "" }
c11015
train
// StopOutbounds is the second step in shutdown. It stops all outbounds // configured on the dispatcher, which stops clients from making outbound // RPCs. It's safe to call concurrently, but all calls after the first return // an error.
{ "resource": "" }
c11016
train
// StopTransports is the final step in shutdown. It stops all transports // configured on the dispatcher and cleans up any ancillary goroutines. It's // safe to call concurrently, but all calls after the first return an error.
{ "resource": "" }
c11017
train
// Mux specifies that the HTTP server should make the YARPC endpoint available // under the given pattern on the given ServeMux. By default, the YARPC // service is made available on all paths of the HTTP server. By specifying a // ServeMux, users can narrow the endpoints under which the YARPC service is // available a...
{ "resource": "" }
c11018
train
// Interceptor specifies a function which can wrap the YARPC handler. If // provided, this function will be called with an http.Handler which will // route requests through YARPC. The http.Handler returned by this function // may delegate requests to the provided YARPC handler to route them through // YARPC.
{ "resource": "" }
c11019
train
// ShutdownTimeout specifies the maximum duration the inbound should wait for // closing idle connections, and pending calls to complete. // // Set to 0 to wait for a complete drain. // // Defaults to 5 seconds.
{ "resource": "" }
c11020
train
// NewInbound builds a new HTTP inbound that listens on the given address and // sharing this transport.
{ "resource": "" }
c11021
train
// Tracer configures a tracer on this inbound.
{ "resource": "" }
c11022
train
// Stop the inbound using Shutdown.
{ "resource": "" }
c11023
train
// shutdown the inbound, closing the listening socket, closing idle // connections, and waiting for all pending calls to complete.
{ "resource": "" }
c11024
train
// Addr returns the address on which the server is listening. Returns nil if // Start has not been called yet.
{ "resource": "" }
c11025
train
// Swap implements the heap.Interface. Do NOT use this method directly. // Swap must be called in the context of a lock, as it is indirectly called // through heap.Push and heap.Pop.
{ "resource": "" }
c11026
train
// Push implements the heap.Interface. Do NOT use this method directly. // Use pushPeer instead. // Push must be called in the context of a lock, as it is indirectly called // through heap.Push.
{ "resource": "" }
c11027
train
// Pop implements the heap.Interface. Do NOT use this method directly. // Use popPeer instead. // Pop must be called in the context of a lock, as it is indirectly called // through heap.Pop.
{ "resource": "" }
c11028
train
// delete removes the score at the given index. // delete must be called in a lock.
{ "resource": "" }
c11029
train
// pushPeerRandom inserts a peer randomly into the heap among equally scored // peers. This is expected to be called only by Add. // // This ensures that batches of peer updates are inserted randomly throughout // the heap, preventing hearding behavior that may be observed during batch // deployments. // // This must b...
{ "resource": "" }
c11030
train
// Sink is our server-side handler implementation
{ "resource": "" }
c11031
train
// UnaryChain combines a series of `UnaryInbound`s into a single `InboundMiddleware`.
{ "resource": "" }
c11032
train
// OnewayChain combines a series of `OnewayInbound`s into a single `InboundMiddleware`.
{ "resource": "" }
c11033
train
// StreamChain combines a series of `StreamInbound`s into a single `InboundMiddleware`.
{ "resource": "" }
c11034
train
// Start starts an Apache Thrift server on port 8088
{ "resource": "" }
c11035
train
// transportRequestToMetadata will populate all reserved and application headers // from the Request into a new MD.
{ "resource": "" }
c11036
train
// metadataToTransportRequest will populate the Request with all reserved and application // headers into a new Request, only not setting the Body field.
{ "resource": "" }
c11037
train
// addApplicationHeaders adds the headers to md.
{ "resource": "" }
c11038
train
// getApplicationHeaders returns the headers from md without any reserved headers.
{ "resource": "" }
c11039
train
// add to md // return error if key already in md
{ "resource": "" }
c11040
train
// getContentSubtype attempts to get the content subtype. // returns "" if no content subtype can be parsed.
{ "resource": "" }
c11041
train
// ForeachKey implements opentracing.TextMapReader.
{ "resource": "" }
c11042
train
// Set implements opentracing.TextMapWriter.
{ "resource": "" }
c11043
train
// DecodeInto will decode the src's data into the dst interface.
{ "resource": "" }
c11044
train
// InterpolateWith is a MapDecode option that will read a structField's tag // information, and if the `interpolate` option is set, it will use the // interpolate resolver to alter data as it's being decoded into the struct.
{ "resource": "" }
c11045
train
// returns the string read as a bytes slice, wheter the value is NULL, // the number of bytes read and an error, in case the string is longer than // the input slice
{ "resource": "" }
c11046
train
// returns the number read, whether the value is NULL and the number of bytes read
{ "resource": "" }
c11047
train
// ReadPacket returns the packet or an error
{ "resource": "" }
c11048
train
// Dial connects to the given address on the given network using net.Dial // and then returns a new Conn for the connection.
{ "resource": "" }
c11049
train
// DialTLS connects to the given address on the given network using tls.Dial // and then returns a new Conn for the connection.
{ "resource": "" }
c11050
train
// Start initializes goroutines to read responses and process messages
{ "resource": "" }
c11051
train
// SetTimeout sets the time after a request is sent that a MessageTimeout triggers
{ "resource": "" }
c11052
train
// Returns the next available messageID
{ "resource": "" }
c11053
train
// StartTLS sends the command to start a TLS session and then creates a new TLS Client
{ "resource": "" }
c11054
train
// TLSConnectionState returns the current connection's TLS ConnectionState, or an error if not TLS.
{ "resource": "" }
c11055
train
// Value implements the driver.Valuer interface. It uses the "hex" format which // is only supported on PostgreSQL 9.0 or newer.
{ "resource": "" }
c11056
train
// appendArray appends rv to the buffer, returning the extended buffer and // the delimiter used between elements. // // It panics when n <= 0 or rv's Kind is not reflect.Array nor reflect.Slice.
{ "resource": "" }
c11057
train
// Attribute adds an attribute with the given type and values
{ "resource": "" }
c11058
train
// decodeUUIDBinary interprets the binary format of a uuid, returning it in text format.
{ "resource": "" }
c11059
train
// NewEntry returns an Entry object with the specified distinguished name and attribute key-value pairs. // The map of attributes is accessed in alphabetical order of the keys in order to ensure that, for the // same input map of attributes, the output entry will contain the same order of attributes
{ "resource": "" }
c11060
train
// GetAttributeValues returns the values for the named attribute, or an empty list
{ "resource": "" }
c11061
train
// GetRawAttributeValues returns the byte values for the named attribute, or an empty list
{ "resource": "" }
c11062
train
// GetAttributeValue returns the first value for the named attribute, or ""
{ "resource": "" }
c11063
train
// GetRawAttributeValue returns the first value for the named attribute, or an empty slice
{ "resource": "" }
c11064
train
// Print outputs a human-readable description
{ "resource": "" }
c11065
train
// PrettyPrint outputs a human-readable description indenting
{ "resource": "" }
c11066
train
// NewEntryAttribute returns a new EntryAttribute with the desired key-value pair
{ "resource": "" }
c11067
train
// NewSearchRequest creates a new search request
{ "resource": "" }
c11068
train
// Get implements the legacy PGError interface. New code should use the fields // of the Error struct directly.
{ "resource": "" }
c11069
train
// Equal returns true if the AttributeTypeAndValue is equivalent to the specified AttributeTypeAndValue // Case of the attribute type is not significant
{ "resource": "" }
c11070
train
// PasswordModify performs the modification request
{ "resource": "" }
c11071
train
// EncodeX509ToJSON encodes an X.509 certificate into a JSON string.
{ "resource": "" }
c11072
train
// EncodeX509ToText encodes an X.509 certificate into human-readable text.
{ "resource": "" }
c11073
train
// timeString formats a time in UTC with minute precision, in the given color.
{ "resource": "" }
c11074
train
// certStart takes a given start time for the validity of // a certificate and returns that time colored properly // based on how close it is to expiry. If it's more than // a day after the certificate became valid the string will // be green. If it has been less than a day the string will // be yellow. If the certific...
{ "resource": "" }
c11075
train
// certEnd takes a given end time for the validity of // a certificate and returns that time colored properly // based on how close it is to expiry. If the certificate // is more than a month away from expiring it returns a // green string. If the certificate is less than a month // from expiry it returns a yellow stri...
{ "resource": "" }
c11076
train
// PrintCommonName prints the CN from a pkix.Name, or falls back to PrintShortName if CN is missing.
{ "resource": "" }
c11077
train
// PrintShortName turns a pkix.Name into a string of RDN tuples.
{ "resource": "" }
c11078
train
// Handle driver-side settings in parsed connection string.
{ "resource": "" }
c11079
train
// Decides which column formats to use for a prepared statement. The input is // an array of type oids, one element per result column.
{ "resource": "" }
c11080
train
// Implement the "Queryer" interface
{ "resource": "" }
c11081
train
// Send a message of type typ to the server on the other end of cn. The // message should have no payload. This method does not use the scratch // buffer.
{ "resource": "" }
c11082
train
// recvMessage receives any message from the backend, or returns an error if // a problem occurred while reading the message.
{ "resource": "" }
c11083
train
// recv receives a message from the backend, but if an error happened while // reading the message or the received message was an ErrorResponse, it panics. // NoticeResponses are ignored. This function should generally be used only // during the startup sequence.
{ "resource": "" }
c11084
train
// recv1Buf is exactly equivalent to recv1, except it uses a buffer supplied by // the caller to avoid an allocation.
{ "resource": "" }
c11085
train
// recv1 receives a message from the backend, panicking if an error occurs // while attempting to read it. All asynchronous messages are ignored, with // the exception of ErrorResponse.
{ "resource": "" }
c11086
train
// isDriverSetting returns true iff a setting is purely for configuring the // driver's options and should not be sent to the server in the connection // startup packet.
{ "resource": "" }
c11087
train
// isUTF8 returns whether name is a fuzzy variation of the string "UTF-8".
{ "resource": "" }
c11088
train
// Add inserts the given attribute to the list of attributes to add
{ "resource": "" }
c11089
train
// Delete inserts the given attribute to the list of attributes to delete
{ "resource": "" }
c11090
train
// Replace inserts the given attribute to the list of attributes to replace
{ "resource": "" }
c11091
train
// Modify performs the ModifyRequest
{ "resource": "" }
c11092
train
// Compare checks to see if the attribute of the dn matches value. Returns true if it does otherwise // false with any error that occurs if any.
{ "resource": "" }
c11093
train
// Creates a new ListenerConn. Use NewListener instead.
{ "resource": "" }
c11094
train
// We can only allow one goroutine at a time to be running a query on the // connection for various reasons, so the goroutine sending on the connection // must be holding senderLock. // // Returns an error if an unrecoverable error has occurred and the ListenerConn // should be abandoned.
{ "resource": "" }
c11095
train
// setState advances the protocol state to newState. Returns false if moving // to that state from the current state is not allowed.
{ "resource": "" }
c11096
train
// This is the main routine for the goroutine receiving on the database // connection. Most of the main logic is in listenerConnLoop.
{ "resource": "" }
c11097
train
// Send a LISTEN query to the server. See ExecSimpleQuery.
{ "resource": "" }
c11098
train
// Ping the remote server to make sure it's alive. Non-nil error means the // connection has failed and should be abandoned.
{ "resource": "" }
c11099
train
// NewDialListener is like NewListener but it takes a Dialer.
{ "resource": "" }