_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c12100 | // IsEmpty returns true if there is no item in the queue to be processed.
// Please note that this state is extremely volatile unless IsClosed
// returned true. | |
c12101 | // RegisterWithDepth to register a plugin to the TypeRegistry by passing an uninitialized object. | |
c12102 | // GetTypeOf returns only the type asscociated with the given name.
// If the name is not registered, nil is returned.
// The type returned will be a pointer type. | |
c12103 | // IsTypeRegistered returns true if a type is registered to this registry.
// Note that GetTypeOf can do the same thing by checking for nil but also
// returns the type, so in many cases you will want to call this function. | |
c12104 | // GetRegistered returns the names of all registered types for a given package | |
c12105 | // Colorize returns a colored string with the given colors. | |
c12106 | // Colorizef returns a colored, formatted string with the given colors. | |
c12107 | // NewMutex creates a new mutex with the given spin priority used during Lock. | |
c12108 | // TryLock tries to acquire a lock and returns true if it succeeds. This
// function does not block. | |
c12109 | // Write Drops all messages | |
c12110 | // NextPowerOf2U16 returns the next power of 2 for a given 16bit number | |
c12111 | // NextPowerOf2U32 returns the next power of 2 for a given 32bit number | |
c12112 | // NextPowerOf2U64 returns the next power of 2 for a given 64bit number | |
c12113 | // NewStackWithGrowSize allows to pass a custom grow size to the stack.
// SpinPriorityMedium is used to initialize the spinner. | |
c12114 | // NewStackWithSpinner allows to pass a custom spinner to the stack.
// The given size will also be used as grow size. | |
c12115 | // NewStackWithSpinnerAndGrowSize allows to fully configure the new stack. | |
c12116 | // Len returns the number of elements on the stack.
// Please note that this value can be highly unreliable in multithreaded
// environments as this is only a snapshot of the state at calltime. | |
c12117 | // Pop retrieves the topmost element from the stack.
// A LimitError is returned when the stack is empty. | |
c12118 | // Push adds an element to the top of the stack.
// When the stack's capacity is reached the storage grows as defined during
// construction. If the stack reaches 2^31 elements it is considered full
// and will return an LimitError. | |
c12119 | // ItoLen returns the length of an unsingned integer when converted to a string | |
c12120 | // Itob writes an unsigned integer to the start of a given byte buffer. | |
c12121 | // Itobe writes an unsigned integer to the end of a given byte buffer. | |
c12122 | // Btoi is a fast byte buffer to unsigned int parser that reads until the first
// non-number character is found. It returns the number value as well as the
// length of the number string encountered.
// If a number could not be parsed the returned length will be 0 | |
c12123 | // IndexN returns the nth occurrences of sep in s or -1 if there is no nth
// occurrence of sep. | |
c12124 | // LastIndexN returns the nth occurrence of sep in s or -1 if there is no nth
// occurrence of sep. Searching is going from the end of the string to the start. | |
c12125 | // IsInt returns true if the given string can be converted to an integer.
// The string must contain no whitespaces. | |
c12126 | // IsJSON returns true if the given byte slice contains valid JSON data.
// You can access the results by utilizing the RawMessage returned. | |
c12127 | // NewByteRef creates an unsafe byte slice reference to the given string.
// The referenced data is not guaranteed to stay valid if no reference to the
// original string is held anymore. The returned ByteRef does not count as
// reference.
// Writing to the returned ByteRef will result in a segfault. | |
c12128 | // NewStringRef creates a unsafe string reference to to the given byte slice.
// The referenced data is not guaranteed to stay valid if no reference to the
// original byte slice is held anymore. The returned StringRef does not count as
// reference.
// Changing the size of the underlying byte slice will result in a se... | |
c12129 | // JoinStringers works like strings.Join but takes an array of fmt.Stringer. | |
c12130 | // GetNumBase scans the given string for its numeric base. If num starts with
// '0x' base 16 is assumed. Just '0' assumes base 8. | |
c12131 | // AtoI64 converts a numeric string to an int64, using GetNumBase to detect
// the numeric base for conversion. | |
c12132 | // AtoU64 converts a numeric string to an uint64, using GetNumBase to detect
// the numeric base for conversion. | |
c12133 | // Serialize to JSON. Will err if there are unmarshalable key values | |
c12134 | // Serialize using gob | |
c12135 | // ping does an internal ping against a server to check if it is alive. | |
c12136 | // save stores the session in redis. | |
c12137 | // load reads the session from redis.
// returns true if there is a sessoin data in DB | |
c12138 | // delete removes keys from redis if MaxAge<0 | |
c12139 | // Load is same as sync.Map Load | |
c12140 | // Load is same as sync.Map Store | |
c12141 | // Go starts a new goroutine and tracks its lifecycle.
// Panic will be recovered and logged automatically, except for StopSignal | |
c12142 | // StopAndWait cancel all goroutines started by this executor and wait.
// Wait can be cancelled by the context passed in. | |
c12143 | // AppendMeasure is a formatting routine to append the InflxDB line protocol
// representation of a measure to a memory buffer. | |
c12144 | // NewEngine creates and returns a new engine configured with prefix, handler,
// and tags. | |
c12145 | // Register adds handler to eng. | |
c12146 | // WithPrefix returns a copy of the engine with prefix appended to eng's current
// prefix and tags set to the merge of eng's current tags and those passed as
// argument. Both eng and the returned engine share the same handler. | |
c12147 | // Clock returns a new clock identified by name and tags. | |
c12148 | // ClockAt returns a new clock identified by name and tags with a specified
// start time. | |
c12149 | // ReportAt reports a set of metrics for a given time. The metrics must be of
// type struct, pointer to struct, or a slice or array to one of those. See
// MakeMeasures for details about how to make struct types exposing metrics. | |
c12150 | // WithPrefix returns a copy of the engine with prefix appended to default
// engine's current prefix and tags set to the merge of eng's current tags and
// those passed as argument. Both the default engine and the returned engine
// share the same handler. | |
c12151 | // IncrAt increments by one the counter identified by name and tags. | |
c12152 | // ObserveAt reports value for the histogram identified by name and tags. | |
c12153 | // ReportAt is a helper function that delegates to DefaultEngine. | |
c12154 | // AppendMeasure is a formatting routine to append the dogstatsd protocol
// representation of a measure to a memory buffer. | |
c12155 | // statusCode behaves like strconv.Itoa but uses a lookup table to avoid having
// to do a dynamic memory allocation to convert common http status codes to a
// string representation. | |
c12156 | // This function builds a string of column-separated float representations of
// the given list of buckets, which is then split by calls to nextLe to generate
// the values of the "le" label for each bucket of a histogram.
//
// The intent is to keep the number of dynamic memory allocations constant
// instead of incre... | |
c12157 | // HandleMeasures satisfies the Handler interface. | |
c12158 | // Flush satisfies the Flusher interface. | |
c12159 | // ServeSearch calls f, satisfies the SearchHandler interface. | |
c12160 | // MakeField constructs and returns a new Field from name, value, and ftype. | |
c12161 | // NewTransport wraps t to produce metrics on the default engine for every request
// sent and every response received. | |
c12162 | // NewTransportWith wraps t to produce metrics on eng for every request sent and
// every response received. | |
c12163 | // RequestWithTags returns a shallow copy of req with its context changed with this provided tags
// so the they can be used later during the RoundTrip in the metrics recording.
// The provided ctx must be non-nil. | |
c12164 | // RoundTrip implements http.RoundTripper | |
c12165 | // ServeQuery calls f, satisfies the QueryHandler interface. | |
c12166 | // Col constructs a new Column value from a text and column type. | |
c12167 | // AscCol constructs a ne Column value from a text a column type, which is
// configured as a sorted column in ascending order. | |
c12168 | // DescCol constructs a ne Column value from a text a column type, which is
// configured as a sorted column in descending order. | |
c12169 | // Set sets a set of buckets to the given list of sorted values. | |
c12170 | // NewProcMetricsWith collects metrics on the process identified by pid and
// reports them to eng. | |
c12171 | // NewHandler returns a new http.Handler that implements the
// simple-json-datasource API. | |
c12172 | // NewClient creates and returns a new veneur client publishing metrics to the
// server running at addr. | |
c12173 | // NewClientGlobal creates a client that sends all metrics to the Global Veneur Aggregator | |
c12174 | // NewClientWith creates and returns a new veneur client configured with the
// given config. | |
c12175 | // NewHandler wraps h to produce metrics on the default engine for every request
// received and every response sent. | |
c12176 | // NewHandlerWith wraps h to produce metrics on eng for every request received
// and every response sent. | |
c12177 | // ListenAndServe starts a new dogstatsd server, listening for UDP datagrams on
// addr and forwarding the metrics to handler. | |
c12178 | // Serve runs a dogstatsd server, listening for datagrams on conn and forwarding
// the metrics to handler. | |
c12179 | // M allows for creating a tag list from a map. | |
c12180 | // TagsAreSorted returns true if the given list of tags is sorted by tag name,
// false otherwise. | |
c12181 | // SortTags sorts the slice of tags. | |
c12182 | // NewClientWith creates and returns a new datadog client configured with the
// given config. | |
c12183 | // ServeAnnotations calls f, satisfies the AnnotationsHandler interface. | |
c12184 | // HandleMeasures calls f, satisfies the Handler interface. | |
c12185 | // MultiHandler constructs a handler which dispatches measures to all given
// handlers. | |
c12186 | // NewHandlerWith returns a Handler object that warps hdl and produces
// metrics on eng. | |
c12187 | // ServeHTTP satisfies the http.Handler interface. | |
c12188 | // NewClientWith creates and returns a new InfluxDB client configured with the
// given config. | |
c12189 | // CreateDB creates a database named db in the InfluxDB server that the client
// was configured to send metrics to. | |
c12190 | // StopAt reports the time difference between now and the time the clock was created at.
//
// The metric produced by this method call will have a "stamp" tag set to
// "total". | |
c12191 | // NewDelayStatsWith collects metrics on the process identified by pid and
// reports them to eng. | |
c12192 | // NewGoMetricsWith creates a new collector for the Go unrtime that producers
// metrics on eng. | |
c12193 | // NewConn returns a net.Conn object that wraps c and produces metrics on the
// default engine. | |
c12194 | // NewConn returns a net.Conn object that wraps c and produces metrics on eng. | |
c12195 | // List returns a slice that contains all of the products in the project. | |
c12196 | // Dist builds the distribution for the specified product using the "godelw dist" command and returns the path to the
// created distribution artifact. | |
c12197 | // MustNewPluginInfo returns the result of calling NewInfo with the provided parameters. Panics if the call to
// NewPluginInfo returns an error, so this function should only be used when the inputs are static and known to be valid. | |
c12198 | // String returns a string representation of the form "GOOS-GOARCH". | |
c12199 | // ConfigNotSupported verifies that the provided bytes represent empty YAML. If the YAML is non-empty, return an error. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.