Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSingleRune ¶
GetSingleRune decodes the string s as a single rune if possible.
func RemoveTrailingSpaces ¶
RemoveTrailingSpaces splits the input string into lines, trims any trailing spaces from each line, then puts the lines back together.
Any newlines at the end of the input string are ignored.
The output string always ends in a newline.
func ToLowerSingleByte ¶
ToLowerSingleByte returns the lowercase of a given single ASCII byte. A non ASCII byte is returned unchanged.
func TruncateString ¶
TruncateString truncates a string to a given number of runes.
Types ¶
type EveryN ¶
type EveryN struct { // N is the minimum duration of time between log messages. N time.Duration syncutil.Mutex // contains filtered or unexported fields }
EveryN provides a way to rate limit spammy events. It tracks how recently a given event has occurred so that it can determine whether it's worth handling again.
The zero value for EveryN is usable and is equivalent to Every(0), meaning that all calls to ShouldProcess will return true.
NOTE: If you specifically care about log messages, you should use the version of this in the log package, as it integrates with the verbosity flags.
Directories ¶
Path | Synopsis |
---|---|
csv
Package csv reads and writes comma-separated values (CSV) files.
|
Package csv reads and writes comma-separated values (CSV) files. |
Package hlc implements the Hybrid Logical Clock outlined in "Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases", available online at http://www.cse.buffalo.edu/tech-reports/2014-04.pdf.
|
Package hlc implements the Hybrid Logical Clock outlined in "Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases", available online at http://www.cse.buffalo.edu/tech-reports/2014-04.pdf. |
Package interval provides two implementations for an interval tree.
|
Package interval provides two implementations for an interval tree. |
generic
Package generic provides an implementation of a generic immutable interval B-Tree.
|
Package generic provides an implementation of a generic immutable interval B-Tree. |
Package leaktest provides tools to detect leaked goroutines in tests.
|
Package leaktest provides tools to detect leaked goroutines in tests. |
Package log implements logging.
|
Package log implements logging. |
Package metric provides server metrics (a.k.a.
|
Package metric provides server metrics (a.k.a. |
aggmetric
Package aggmetric provides functionality to create metrics which expose aggregate metrics for internal collection and additionally per-child reporting to prometheus.
|
Package aggmetric provides functionality to create metrics which expose aggregate metrics for internal collection and additionally per-child reporting to prometheus. |
Package pretty prints documents based on a target line width.
|
Package pretty prints documents based on a target line width. |
singleflight
Package singleflight provides a duplicate function call suppression mechanism.
|
Package singleflight provides a duplicate function call suppression mechanism. |
Package sysutil is a cross-platform compatibility layer on top of package syscall.
|
Package sysutil is a cross-platform compatibility layer on top of package syscall. |
pgdate
Package pgdate contains parsing functions and types for dates and times in a manner that is compatible with PostgreSQL.
|
Package pgdate contains parsing functions and types for dates and times in a manner that is compatible with PostgreSQL. |