_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c10900
train
// Hidden option to override the buildHTTPClient function. This is used only // for testing.
{ "resource": "" }
c10901
train
// NewTransport creates a new HTTP transport for managing peers and sending requests
{ "resource": "" }
c10902
train
// Stop stops the HTTP transport.
{ "resource": "" }
c10903
train
// StartupWait specifies how long updates to the heap will block // before the list heap been started // // Defaults to 5 seconds.
{ "resource": "" }
c10904
train
// New returns a new peer heap-chooser-list for the given transport.
{ "resource": "" }
c10905
train
// Update satisfies the peer.List interface, so a peer list updater can manage // the retained peers.
{ "resource": "" }
c10906
train
// retainPeer must be called with the mutex locked.
{ "resource": "" }
c10907
train
// releasePeer must be called with the mutex locked.
{ "resource": "" }
c10908
train
// NotifyStatusChanged receives notifications when a peer becomes available, // connected, unavailable, or when its pending request count changes. // This method satisfies peer.Subscriber and is only used for tests, since // the peer heap has a subscriber for each invividual peer.
{ "resource": "" }
c10909
train
// ThriftForTransport implements the 'thrift' behavior for the given transport or behavior transport.
{ "resource": "" }
c10910
train
// RawForTransport implements the 'raw' behavior for the given transport or behavior transport.
{ "resource": "" }
c10911
train
// NewInboundCallWithOptions builds a new InboundCall with the given context and // options. // // A request context is returned and must be used in place of the original.
{ "resource": "" }
c10912
train
// getInboundCall returns the inbound call on this context or nil.
{ "resource": "" }
c10913
train
// ReadFromRequest reads information from the given request. // // This information may be queried on the context using functions like Caller, // Service, Procedure, etc.
{ "resource": "" }
c10914
train
// ReadFromRequestMeta reads information from the given request. // // This information may be queried on the context using functions like Caller, // Service, Procedure, etc.
{ "resource": "" }
c10915
train
// WriteToResponse writes response information from the InboundCall onto the // given ResponseWriter. // // If used, this must be called before writing the response body to the // ResponseWriter.
{ "resource": "" }
c10916
train
// ExceptionType_Values returns all recognized values of ExceptionType.
{ "resource": "" }
c10917
train
// MarshalText encodes ExceptionType to text. // // If the enum value is recognized, its name is returned. Otherwise, // its integer value is returned. // // This implements the TextMarshaler interface.
{ "resource": "" }
c10918
train
// String returns a readable string representation of ExceptionType.
{ "resource": "" }
c10919
train
// String returns a readable string representation of a TApplicationException // struct.
{ "resource": "" }
c10920
train
// Equals returns true if all the fields of this TApplicationException match the // provided TApplicationException. // // This function performs a deep comparison.
{ "resource": "" }
c10921
train
// MarshalLogObject implements zapcore.ObjectMarshaler, enabling // fast logging of TApplicationException.
{ "resource": "" }
c10922
train
// ClientBuilderOptions returns ClientOptions that InjectClients should use // for a specific Thrift client given information about the field into which // the client is being injected. This API will usually not be used directly by // users but by the generated code.
{ "resource": "" }
c10923
train
// Logger specifies the logger that should be used to log. // Default value is noop zap logger.
{ "resource": "" }
c10924
train
// tmpl specifies the template to use. // It is only used for testing.
{ "resource": "" }
c10925
train
// applyOptions creates new opts based on the given options.
{ "resource": "" }
c10926
train
// ApplyUnaryOutbound applies the given UnaryOutbound middleware to // the given UnaryOutbound transport.
{ "resource": "" }
c10927
train
// Call for UnaryOutboundFunc.
{ "resource": "" }
c10928
train
// ApplyOnewayOutbound applies the given OnewayOutbound middleware to // the given OnewayOutbound transport.
{ "resource": "" }
c10929
train
// CallOneway for OnewayOutboundFunc.
{ "resource": "" }
c10930
train
// ApplyStreamOutbound applies the given StreamOutbound middleware to // the given StreamOutbound transport.
{ "resource": "" }
c10931
train
// CallStream for StreamOutboundFunc.
{ "resource": "" }
c10932
train
// Fills values from this object into the provided YARPC config.
{ "resource": "" }
c10933
train
// mapdecode doesn't suport encoding.TextMarhsaler by default so we have to do // this manually.
{ "resource": "" }
c10934
train
// NewNopContextExtractor returns a no-op ContextExtractor.
{ "resource": "" }
c10935
train
// NewOutboundCall constructs a new OutboundCall with the given options.
{ "resource": "" }
c10936
train
// NewStreamOutboundCall constructs a new OutboundCall with the given // options and enforces the OutboundCall is valid for streams.
{ "resource": "" }
c10937
train
// WriteToRequest fills the given request with request-specific options from // the call. // // The context MAY be replaced by the OutboundCall.
{ "resource": "" }
c10938
train
// WriteToRequestMeta fills the given request with request-specific options from // the call. // // The context MAY be replaced by the OutboundCall.
{ "resource": "" }
c10939
train
// ReadFromResponse reads information from the response for this call. // // This should be called only if the request is unary.
{ "resource": "" }
c10940
train
// NewMapRouter builds a new MapRouter that uses the given name as the // default service name.
{ "resource": "" }
c10941
train
// Register registers the procedure with the MapRouter. // If the procedure does not specify its service name, the procedure will // inherit the default service name of the router. // Procedures should specify their encoding, and multiple procedures with the // same name and service name can exist if they handle differ...
{ "resource": "" }
c10942
train
// Procedures returns a list procedures that // have been registered so far.
{ "resource": "" }
c10943
train
// Extract keys from service names map and return a formatted string
{ "resource": "" }
c10944
train
// NewInbound returns a new TChannel inbound backed by a shared TChannel // transport. The returned ChannelInbound does not support peer.Chooser // and uses TChannel's own internal load balancing peer selection. // If you have a YARPC peer.Chooser, use the unqualified tchannel.NewInbound // instead. // There should on...
{ "resource": "" }
c10945
train
// ToBytes encodes an opentracing.SpanContext and transport.Request into bytes
{ "resource": "" }
c10946
train
// FromBytes decodes bytes into a opentracing.SpanContext and transport.Request
{ "resource": "" }
c10947
train
// NewServerStream will create a new ServerStream.
{ "resource": "" }
c10948
train
// SendMessage sends a request over the stream. It blocks until the message // has been sent. In certain implementations, the timeout on the context // will be used to timeout the request.
{ "resource": "" }
c10949
train
// ReceiveMessage blocks until a message is received from the connection. It // returns an io.Reader with the contents of the message.
{ "resource": "" }
c10950
train
// NewClientStream will create a new ClientStream.
{ "resource": "" }
c10951
train
// Close will close the connection. It blocks until the server has // acknowledged the close. In certain implementations, the timeout on the // context will be used to timeout the request. If the server timed out the // connection will be forced closed by the client.
{ "resource": "" }
c10952
train
// String returns a readable string representation of a EchoResponse // struct.
{ "resource": "" }
c10953
train
// Equals returns true if all the fields of this EchoResponse match the // provided EchoResponse. // // This function performs a deep comparison.
{ "resource": "" }
c10954
train
// MarshalLogObject implements zapcore.ObjectMarshaler, enabling // fast logging of EchoResponse.
{ "resource": "" }
c10955
train
// fileDescriptorClosureVarName is used to refer to a variable that contains a closure of all encoded // file descriptors required to interpret a specific proto file. It is used in the yarpc codebase to // attach reflection information to services.
{ "resource": "" }
c10956
train
// Wrap wraps the given context with the headers.
{ "resource": "" }
c10957
train
// WithHeader returns a new ContextWrapper with the given header.
{ "resource": "" }
c10958
train
// String returns a readable string representation of a SinkRequest // struct.
{ "resource": "" }
c10959
train
// Equals returns true if all the fields of this SinkRequest match the // provided SinkRequest. // // This function performs a deep comparison.
{ "resource": "" }
c10960
train
// MarshalLogObject implements zapcore.ObjectMarshaler, enabling // fast logging of SinkRequest.
{ "resource": "" }
c10961
train
// Run exercise a yarpc client against a rigged httpserver.
{ "resource": "" }
c10962
train
// runRaw tests if a yarpc client returns a remote timeout error behind the // TimeoutError interface when a remote http handler returns a handler timeout.
{ "resource": "" }
c10963
train
// BuildProcedures builds the transport.Procedures.
{ "resource": "" }
c10964
train
// NewStreamClient creates a new stream client.
{ "resource": "" }
c10965
train
// NewUnaryHandler returns a new UnaryHandler.
{ "resource": "" }
c10966
train
// NewOnewayHandler returns a new OnewayHandler.
{ "resource": "" }
c10967
train
// ClientBuilderOptions returns ClientOptions that yarpc.InjectClients should use for a // specific client given information about the field into which the client is being injected.
{ "resource": "" }
c10968
train
// CastError returns an error saying that generated code could not properly cast a proto.Message to it's expected type.
{ "resource": "" }
c10969
train
// Receive will receive a protobuf message from the client stream.
{ "resource": "" }
c10970
train
// Send will send a protobuf message to the client stream.
{ "resource": "" }
c10971
train
// Close will close the protobuf stream.
{ "resource": "" }
c10972
train
// Receive will receive a protobuf message from the server stream.
{ "resource": "" }
c10973
train
// Send will send a protobuf message to the server stream.
{ "resource": "" }
c10974
train
// Expand converts leading tabs to two spaces, such that YAML accepts the whole // block.
{ "resource": "" }
c10975
train
// NewEchoYARPCClient builds a new YARPC client for the Echo service.
{ "resource": "" }
c10976
train
// BuildEchoYARPCProcedures prepares an implementation of the Echo service for YARPC registration.
{ "resource": "" }
c10977
train
// NewOnewayYARPCClient builds a new YARPC client for the Oneway service.
{ "resource": "" }
c10978
train
// BuildOnewayYARPCProcedures prepares an implementation of the Oneway service for YARPC registration.
{ "resource": "" }
c10979
train
// BadResponse returns an object that's not a valid JSON response.
{ "resource": "" }
c10980
train
// callHome extracts the call back address from headers, and makes a raw HTTP // request using the same context and body
{ "resource": "" }
c10981
train
// ApplyRouteTable applies the given Router middleware to the given Router.
{ "resource": "" }
c10982
train
// TransportSpec returns a TransportSpec for the HTTP transport. // // See TransportConfig, InboundConfig, and OutboundConfig for details on the // different configuration parameters supported by this Transport. // // Any Transport, Inbound or Outbound option may be passed to this function. // These options will be app...
{ "resource": "" }
c10983
train
// NewPool returns a pool that we can allocate buffers from.
{ "resource": "" }
c10984
train
// Get returns a buffer from the pool.
{ "resource": "" }
c10985
train
// ResponseHeaders specifies that headers received in response to this request // should replace the given map.
{ "resource": "" }
c10986
train
// WithHeader adds a new header to the request.
{ "resource": "" }
c10987
train
// WithShardKey sets the shard key for the request.
{ "resource": "" }
c10988
train
// WithRoutingKey sets the routing key for the request.
{ "resource": "" }
c10989
train
// WithRoutingDelegate sets the routing delegate for the request.
{ "resource": "" }
c10990
train
// JSONForTransport implements the 'json' behavior for the given transport or behavior transport.
{ "resource": "" }
c10991
train
// String returns a readable string representation of a Hello_Sink_Args // struct.
{ "resource": "" }
c10992
train
// Equals returns true if all the fields of this Hello_Sink_Args match the // provided Hello_Sink_Args. // // This function performs a deep comparison.
{ "resource": "" }
c10993
train
// MarshalLogObject implements zapcore.ObjectMarshaler, enabling // fast logging of Hello_Sink_Args.
{ "resource": "" }
c10994
train
// GetSnk returns the value of Snk if it is set or its // zero value if it is unset.
{ "resource": "" }
c10995
train
// PopString will pop a value from the attribute map and return the string // it points to, or an error if it couldn't pop the value and decode.
{ "resource": "" }
c10996
train
// PopBool will pop a value from the attribute map and return the bool // it points to, or an error if it couldn't pop the value and decode.
{ "resource": "" }
c10997
train
// Pop removes the named key from the AttributeMap and decodes the value into // the dst interface.
{ "resource": "" }
c10998
train
// Get grabs a value from the attribute map and decodes it into the dst // interface.
{ "resource": "" }
c10999
train
// Keys returns all the keys of the attribute map.
{ "resource": "" }