_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c180700
test
// RateLimit consumes messages from the messages channel and limits the rate at // which they are produced to the channel returned by this function. // // The limit is the maximum number of messages per second that are produced. // No rate limit is applied if limit is negative or zero. // // The returned channel is closed when the messages channel is closed.
{ "resource": "" }
c180701
test
// Write outputs the response to w.
{ "resource": "" }
c180702
test
// ReadResponse reads res from r, or returns an error if no responses could be // read.
{ "resource": "" }
c180703
test
// backoff computes a random exponential backoff value for a given number of // attempts, and boundaries of min and max backoff durations.
{ "resource": "" }
c180704
test
// String returns a human-readable representation of the frame type.
{ "resource": "" }
c180705
test
// NewConsulEngine creates and return a new engine configured with config.
{ "resource": "" }
c180706
test
// ParseMessageID attempts to parse s, which should be an hexadecimal // representation of an 8 byte message ID.
{ "resource": "" }
c180707
test
// WriteTo writes the message ID to w. // // This method satisfies the io.WriterTo interface.
{ "resource": "" }
c180708
test
// NewMessage is a helper for creating Message instances directly. A common // use-case is for writing tests, generally you won't use this directly. // // If you do use this, the Command channel is used internally to communicate // message commands, such as "Finish" or "Requeue". When using this for testing, // you can make a channel and inspect any message sent along it for assertions.
{ "resource": "" }
c180709
test
// Finish must be called on every message received from a consumer to let the // NSQ server know that the message was successfully processed. // // One of Finish or Requeue should be called on every message, and the methods // will panic if they are called more than once.
{ "resource": "" }
c180710
test
// Requeue must be called on messages received from a consumer to let the NSQ // server know that the message could not be proessed and should be retried. // The timeout is the amount of time the NSQ server waits before offering this // message again to its consumers. // // One of Finish or Requeue should be called on every message, and the methods // will panic if they are called more than once.
{ "resource": "" }
c180711
test
// ReadCommand reads cmd from r, or returns an error if no commands could be // read.
{ "resource": "" }
c180712
test
// FuncMap get func maps from tmpl
{ "resource": "" }
c180713
test
// Funcs register Funcs for tmpl
{ "resource": "" }
c180714
test
// Execute execute tmpl
{ "resource": "" }
c180715
test
// RegisterPath register view paths
{ "resource": "" }
c180716
test
// Asset get content with name from assetfs
{ "resource": "" }
c180717
test
// Glob list matched files from assetfs
{ "resource": "" }
c180718
test
// NameSpace return namespaced filesystem
{ "resource": "" }
c180719
test
// New initalize the render struct.
{ "resource": "" }
c180720
test
// RegisterViewPath register view path
{ "resource": "" }
c180721
test
// Layout set layout for template.
{ "resource": "" }
c180722
test
// Funcs set helper functions for template with default "application" layout.
{ "resource": "" }
c180723
test
// Execute render template with default "application" layout.
{ "resource": "" }
c180724
test
// RegisterFuncMap register FuncMap for render.
{ "resource": "" }
c180725
test
// Asset get content from AssetFS by name
{ "resource": "" }
c180726
test
// A client implementation of the PLAIN authentication mechanism, as described // in RFC 4616. Authorization identity may be left blank to indicate that it is // the same as the username.
{ "resource": "" }
c180727
test
// Create creates an S3 object at url and sends multipart upload requests as // data is written. // // If h is not nil, each of its entries is added to the HTTP request header. // If c is nil, Create uses DefaultConfig.
{ "resource": "" }
c180728
test
// Open requests the S3 object at url. An HTTP status other than 200 is // considered an error. // // If c is nil, Open uses DefaultConfig.
{ "resource": "" }
c180729
test
// Sign signs an HTTP request with the given S3 keys. // // This function is a wrapper around DefaultService.Sign.
{ "resource": "" }
c180730
test
// Sign signs an HTTP request with the given S3 keys for use on service s.
{ "resource": "" }
c180731
test
// Readdir requests a list of entries in the S3 directory // represented by f and returns a slice of up to n FileInfo // values, in alphabetical order. Subsequent calls // on the same File will yield further FileInfos. // Only direct children are returned, not deeper descendants.
{ "resource": "" }
c180732
test
//Find finds nodes based on the pathexpr.PathExpr
{ "resource": "" }
c180733
test
//Lex an XPath expresion on the io.Reader
{ "resource": "" }
c180734
test
//MustParseXML is like ParseXML, but panics instead of returning an error.
{ "resource": "" }
c180735
test
//ParseXML creates an XMLTree structure from an io.Reader.
{ "resource": "" }
c180736
test
//Call checks the arguments and calls Fn if they are valid
{ "resource": "" }
c180737
test
//Parse parses the XPath expression, xp, returning an XPath executor.
{ "resource": "" }
c180738
test
//MustParse is like Parse, but panics instead of returning an error.
{ "resource": "" }
c180739
test
//Exec executes the XPath expression, xp, against the tree, t, with the //namespace mappings, ns, and returns the result as a stringer.
{ "resource": "" }
c180740
test
//ExecBool is like Exec, except it will attempt to convert the result to its boolean value.
{ "resource": "" }
c180741
test
//ExecNum is like Exec, except it will attempt to convert the result to its number value.
{ "resource": "" }
c180742
test
//ExecNode is like Exec, except it will attempt to return the result as a node-set.
{ "resource": "" }
c180743
test
//MustExec is like Exec, but panics instead of returning an error.
{ "resource": "" }
c180744
test
//ParseExec parses the XPath string, xpstr, and runs Exec.
{ "resource": "" }
c180745
test
//CreateNode is an implementation of xmlbuilder.XMLBuilder. It appends the node //specified in opts and returns the child if it is an element. Otherwise, it returns x.
{ "resource": "" }
c180746
test
//GetChildren returns all child nodes of the element
{ "resource": "" }
c180747
test
//GetAttrs returns all attributes of the element
{ "resource": "" }
c180748
test
//ResValue returns the string value of the element and children
{ "resource": "" }
c180749
test
//Parse creates an AST tree for XPath expressions.
{ "resource": "" }
c180750
test
//GetToken returns the xml.Token representation of the node
{ "resource": "" }
c180751
test
//ResValue returns the string value of the attribute
{ "resource": "" }
c180752
test
//Exec executes the XPath expression, xp, against the tree, t, with the //namespace mappings, ns.
{ "resource": "" }
c180753
test
//ResValue satisfies the Res interface for Num
{ "resource": "" }
c180754
test
//Num satisfies the HasNum interface for String's
{ "resource": "" }
c180755
test
//BuildNS resolves all the namespace nodes of the element and returns them
{ "resource": "" }
c180756
test
//GetAttribute is a convenience function for getting the specified attribute from an element. //false is returned if the attribute is not found.
{ "resource": "" }
c180757
test
//GetAttributeVal is like GetAttribute, except it returns the attribute's value.
{ "resource": "" }
c180758
test
//GetAttrValOrEmpty is like GetAttributeVal, except it returns an empty string if //the attribute is not found instead of false.
{ "resource": "" }
c180759
test
//FindNodeByPos finds a node from the given position. Returns nil if the node //is not found.
{ "resource": "" }
c180760
test
//Marshal prints the result tree, r, in XML form to w.
{ "resource": "" }
c180761
test
//MarshalStr is like Marhal, but returns a string.
{ "resource": "" }
c180762
test
// NewLexer creates a new Lexer reading from io.Reader. This Lexer // has a DefaultTokenizer according to posix and whitespacesplit // rules.
{ "resource": "" }
c180763
test
// NewLexerString creates a new Lexer reading from a string. This // Lexer has a DefaultTokenizer according to posix and whitespacesplit // rules.
{ "resource": "" }
c180764
test
// Split splits a string according to posix or non-posix rules.
{ "resource": "" }
c180765
test
// Register registers a new error type
{ "resource": "" }
c180766
test
// Get returns the descriptor if it exists or nil otherwise
{ "resource": "" }
c180767
test
// GetAll returns all registered error descriptors
{ "resource": "" }
c180768
test
// From lifts an error to be and Error
{ "resource": "" }
c180769
test
// Descriptor returns the error descriptor from any error
{ "resource": "" }
c180770
test
// GetAttributes returns the error attributes or falls back // to empty attributes
{ "resource": "" }
c180771
test
// HTTPStatusCode returns the corresponding http status code from an error type
{ "resource": "" }
c180772
test
// HTTPStatusCode returns the HTTP status code for the given error or 500 if it doesn't know
{ "resource": "" }
c180773
test
// HTTPStatusToType infers the error Type from a HTTP Status code
{ "resource": "" }
c180774
test
// ToHTTP writes the error to the http response
{ "resource": "" }
c180775
test
// toImpl creates an equivalent impl for any Error
{ "resource": "" }
c180776
test
// MetadataFromIncomingContext gets the metadata from the given context
{ "resource": "" }
c180777
test
// MetadataFromOutgoingContext gets the metadata from the given context
{ "resource": "" }
c180778
test
// TokenFromMetadata gets the token from the metadata or returns ErrNoToken
{ "resource": "" }
c180779
test
// TokenFromIncomingContext gets the token from the incoming context or returns ErrNoToken
{ "resource": "" }
c180780
test
// OutgoingContextWithToken returns an outgoing context with the token
{ "resource": "" }
c180781
test
// KeyFromMetadata gets the key from the metadata or returns ErrNoKey
{ "resource": "" }
c180782
test
// KeyFromIncomingContext gets the key from the incoming context or returns ErrNoKey
{ "resource": "" }
c180783
test
// OutgoingContextWithKey returns an outgoing context with the key
{ "resource": "" }
c180784
test
// IDFromMetadata gets the key from the metadata or returns ErrNoID
{ "resource": "" }
c180785
test
// IDFromIncomingContext gets the key from the incoming context or returns ErrNoID
{ "resource": "" }
c180786
test
// OutgoingContextWithID returns an outgoing context with the id
{ "resource": "" }
c180787
test
// ServiceInfoFromMetadata gets the service information from the metadata or returns empty strings
{ "resource": "" }
c180788
test
// ServiceInfoFromIncomingContext gets the service information from the incoming context or returns empty strings
{ "resource": "" }
c180789
test
// OutgoingContextWithServiceInfo returns an outgoing context with the id
{ "resource": "" }
c180790
test
// LimitFromMetadata gets the limit from the metadata
{ "resource": "" }
c180791
test
// OffsetFromMetadata gets the offset from the metadata
{ "resource": "" }
c180792
test
// LimitAndOffsetFromIncomingContext gets the limit and offset from the incoming context
{ "resource": "" }
c180793
test
// OutgoingContextWithLimitAndOffset returns an outgoing context with the limit and offset
{ "resource": "" }
c180794
test
// returns true if i before j
{ "resource": "" }
c180795
test
// New creates a new error based on the error descriptor
{ "resource": "" }
c180796
test
// WithNamespace adds a namespace to the logging context
{ "resource": "" }
c180797
test
// Wrap wraps the logger in a Namespaced logger and enables the specified // namespaces. See SetNamespaces for information on how to set the namspaces
{ "resource": "" }
c180798
test
// WithField adds a field to the logger
{ "resource": "" }
c180799
test
// WithFields adds multiple fields to the logger
{ "resource": "" }