_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c180700 | // 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 clo... | |
c180701 | // Write outputs the response to w. | |
c180702 | // ReadResponse reads res from r, or returns an error if no responses could be
// read. | |
c180703 | // backoff computes a random exponential backoff value for a given number of
// attempts, and boundaries of min and max backoff durations. | |
c180704 | // String returns a human-readable representation of the frame type. | |
c180705 | // NewConsulEngine creates and return a new engine configured with config. | |
c180706 | // ParseMessageID attempts to parse s, which should be an hexadecimal
// representation of an 8 byte message ID. | |
c180707 | // WriteTo writes the message ID to w.
//
// This method satisfies the io.WriterTo interface. | |
c180708 | // 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... | |
c180709 | // 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. | |
c180710 | // 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 ... | |
c180711 | // ReadCommand reads cmd from r, or returns an error if no commands could be
// read. | |
c180712 | // FuncMap get func maps from tmpl | |
c180713 | // Funcs register Funcs for tmpl | |
c180714 | // Execute execute tmpl | |
c180715 | // RegisterPath register view paths | |
c180716 | // Asset get content with name from assetfs | |
c180717 | // Glob list matched files from assetfs | |
c180718 | // NameSpace return namespaced filesystem | |
c180719 | // New initalize the render struct. | |
c180720 | // RegisterViewPath register view path | |
c180721 | // Layout set layout for template. | |
c180722 | // Funcs set helper functions for template with default "application" layout. | |
c180723 | // Execute render template with default "application" layout. | |
c180724 | // RegisterFuncMap register FuncMap for render. | |
c180725 | // Asset get content from AssetFS by name | |
c180726 | // 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. | |
c180727 | // 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. | |
c180728 | // Open requests the S3 object at url. An HTTP status other than 200 is
// considered an error.
//
// If c is nil, Open uses DefaultConfig. | |
c180729 | // Sign signs an HTTP request with the given S3 keys.
//
// This function is a wrapper around DefaultService.Sign. | |
c180730 | // Sign signs an HTTP request with the given S3 keys for use on service s. | |
c180731 | // 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. | |
c180732 | //Find finds nodes based on the pathexpr.PathExpr | |
c180733 | //Lex an XPath expresion on the io.Reader | |
c180734 | //MustParseXML is like ParseXML, but panics instead of returning an error. | |
c180735 | //ParseXML creates an XMLTree structure from an io.Reader. | |
c180736 | //Call checks the arguments and calls Fn if they are valid | |
c180737 | //Parse parses the XPath expression, xp, returning an XPath executor. | |
c180738 | //MustParse is like Parse, but panics instead of returning an error. | |
c180739 | //Exec executes the XPath expression, xp, against the tree, t, with the
//namespace mappings, ns, and returns the result as a stringer. | |
c180740 | //ExecBool is like Exec, except it will attempt to convert the result to its boolean value. | |
c180741 | //ExecNum is like Exec, except it will attempt to convert the result to its number value. | |
c180742 | //ExecNode is like Exec, except it will attempt to return the result as a node-set. | |
c180743 | //MustExec is like Exec, but panics instead of returning an error. | |
c180744 | //ParseExec parses the XPath string, xpstr, and runs Exec. | |
c180745 | //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. | |
c180746 | //GetChildren returns all child nodes of the element | |
c180747 | //GetAttrs returns all attributes of the element | |
c180748 | //ResValue returns the string value of the element and children | |
c180749 | //Parse creates an AST tree for XPath expressions. | |
c180750 | //GetToken returns the xml.Token representation of the node | |
c180751 | //ResValue returns the string value of the attribute | |
c180752 | //Exec executes the XPath expression, xp, against the tree, t, with the
//namespace mappings, ns. | |
c180753 | //ResValue satisfies the Res interface for Num | |
c180754 | //Num satisfies the HasNum interface for String's | |
c180755 | //BuildNS resolves all the namespace nodes of the element and returns them | |
c180756 | //GetAttribute is a convenience function for getting the specified attribute from an element.
//false is returned if the attribute is not found. | |
c180757 | //GetAttributeVal is like GetAttribute, except it returns the attribute's value. | |
c180758 | //GetAttrValOrEmpty is like GetAttributeVal, except it returns an empty string if
//the attribute is not found instead of false. | |
c180759 | //FindNodeByPos finds a node from the given position. Returns nil if the node
//is not found. | |
c180760 | //Marshal prints the result tree, r, in XML form to w. | |
c180761 | //MarshalStr is like Marhal, but returns a string. | |
c180762 | // NewLexer creates a new Lexer reading from io.Reader. This Lexer
// has a DefaultTokenizer according to posix and whitespacesplit
// rules. | |
c180763 | // NewLexerString creates a new Lexer reading from a string. This
// Lexer has a DefaultTokenizer according to posix and whitespacesplit
// rules. | |
c180764 | // Split splits a string according to posix or non-posix rules. | |
c180765 | // Register registers a new error type | |
c180766 | // Get returns the descriptor if it exists or nil otherwise | |
c180767 | // GetAll returns all registered error descriptors | |
c180768 | // From lifts an error to be and Error | |
c180769 | // Descriptor returns the error descriptor from any error | |
c180770 | // GetAttributes returns the error attributes or falls back
// to empty attributes | |
c180771 | // HTTPStatusCode returns the corresponding http status code from an error type | |
c180772 | // HTTPStatusCode returns the HTTP status code for the given error or 500 if it doesn't know | |
c180773 | // HTTPStatusToType infers the error Type from a HTTP Status code | |
c180774 | // ToHTTP writes the error to the http response | |
c180775 | // toImpl creates an equivalent impl for any Error | |
c180776 | // MetadataFromIncomingContext gets the metadata from the given context | |
c180777 | // MetadataFromOutgoingContext gets the metadata from the given context | |
c180778 | // TokenFromMetadata gets the token from the metadata or returns ErrNoToken | |
c180779 | // TokenFromIncomingContext gets the token from the incoming context or returns ErrNoToken | |
c180780 | // OutgoingContextWithToken returns an outgoing context with the token | |
c180781 | // KeyFromMetadata gets the key from the metadata or returns ErrNoKey | |
c180782 | // KeyFromIncomingContext gets the key from the incoming context or returns ErrNoKey | |
c180783 | // OutgoingContextWithKey returns an outgoing context with the key | |
c180784 | // IDFromMetadata gets the key from the metadata or returns ErrNoID | |
c180785 | // IDFromIncomingContext gets the key from the incoming context or returns ErrNoID | |
c180786 | // OutgoingContextWithID returns an outgoing context with the id | |
c180787 | // ServiceInfoFromMetadata gets the service information from the metadata or returns empty strings | |
c180788 | // ServiceInfoFromIncomingContext gets the service information from the incoming context or returns empty strings | |
c180789 | // OutgoingContextWithServiceInfo returns an outgoing context with the id | |
c180790 | // LimitFromMetadata gets the limit from the metadata | |
c180791 | // OffsetFromMetadata gets the offset from the metadata | |
c180792 | // LimitAndOffsetFromIncomingContext gets the limit and offset from the incoming context | |
c180793 | // OutgoingContextWithLimitAndOffset returns an outgoing context with the limit and offset | |
c180794 | // returns true if i before j | |
c180795 | // New creates a new error based on the error descriptor | |
c180796 | // WithNamespace adds a namespace to the logging context | |
c180797 | // Wrap wraps the logger in a Namespaced logger and enables the specified
// namespaces. See SetNamespaces for information on how to set the namspaces | |
c180798 | // WithField adds a field to the logger | |
c180799 | // WithFields adds multiple fields to the logger |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.