README

luci-go: LUCI in Go: shared code

GoDoc

Strive to keep this directory and subdirectories from having more than 7-10 libraries. If they grow too large, consider grouping them into informative subcategories.

The following sub-directories exist:

  • data - data organization, manipulation, storage
  • sync - concurrency coordination
  • runtime - libraries relating to debugging/enhancing the go runtime
  • system - libraries for interacting with the operating system

Directories

Path Synopsis
api
buildbucket/buildbucket/v1
Package buildbucket provides access to the Build Bucket Service.
Package buildbucket provides access to the Build Bucket Service.
buildbucket/swarmbucket/v1
Package swarmbucket provides access to the Buildbucket-Swarming integration.
Package swarmbucket provides access to the Buildbucket-Swarming integration.
gitiles
Package gitiles allows querying git repositories hosted on *.googlesource.com.
Package gitiles allows querying git repositories hosted on *.googlesource.com.
isolate/isolateservice/v1
Package isolateservice provides access to the .
Package isolateservice provides access to the .
luci_config/config/v1
Package config provides access to the Configuration Service.
Package config provides access to the Configuration Service.
swarming/swarming/v1
Package swarming provides access to the .
Package swarming provides access to the .
Package auth implements a wrapper around golang.org/x/oauth2.
Package auth implements a wrapper around golang.org/x/oauth2.
localauth
Package localauth implements localhost HTTP server that hands out tokens to local LUCI-aware processes.
Package localauth implements localhost HTTP server that hands out tokens to local LUCI-aware processes.
Package cli is a helper package for "github.com/maruel/subcommands".
Package cli is a helper package for "github.com/maruel/subcommands".
Package clock is an interface to system time and timers which is easy to test.
Package clock is an interface to system time and timers which is easy to test.
Package config is a library to access the luci-config service.
Package config is a library to access the luci-config service.
impl/filesystem
Package filesystem implements a file system backend for the config client.
Package filesystem implements a file system backend for the config client.
impl/memory
Package memory implements in-memory backend for the config client.
Package memory implements in-memory backend for the config client.
validation
Package validation provides a helper for performing config validations.
Package validation provides a helper for performing config validations.
data
base128
Package base128 implements base128 encoding and decoding.
Package base128 implements base128 encoding and decoding.
caching/cache
Package cache implements both in-memory and on-disk caching.
Package cache implements both in-memory and on-disk caching.
caching/cacheContext
Package cacheContext implements a context.Context wrapper which caches the results of Value calls, speeding up subsequent calls for the same key.
Package cacheContext implements a context.Context wrapper which caches the results of Value calls, speeding up subsequent calls for the same key.
caching/lazyslot
Package lazyslot implements a caching scheme for globally shared objects that take significant time to refresh.
Package lazyslot implements a caching scheme for globally shared objects that take significant time to refresh.
caching/lru
Package lru provides least-recently-used (LRU) cache.
Package lru provides least-recently-used (LRU) cache.
caching/proccache
Package proccache implements a simple in-memory cache that can be injected into a context and shared by all request handlers executing within a process.
Package proccache implements a simple in-memory cache that can be injected into a context and shared by all request handlers executing within a process.
cmpbin
Package cmpbin provides binary serialization routines which ensure that the serialized objects maintain the same sort order of the original inputs when sorted bytewise (i.e.
Package cmpbin provides binary serialization routines which ensure that the serialized objects maintain the same sort order of the original inputs when sorted bytewise (i.e.
rand/cryptorand
Package cryptorand implements a mockable source or crypto strong randomness.
Package cryptorand implements a mockable source or crypto strong randomness.
rand/mathrand
Package mathrand implements a mockable interface for math/rand.Rand.
Package mathrand implements a mockable interface for math/rand.Rand.
recordio
Package recordio implements a basic RecordIO reader and writer.
Package recordio implements a basic RecordIO reader and writer.
sortby
Package sortby provides a succinct way to generate correctly-behaved Less funcions for use with the stdlib 'sort' package.
Package sortby provides a succinct way to generate correctly-behaved Less funcions for use with the stdlib 'sort' package.
stringset
Package stringset is an exceedingly simple 'set' implementation for strings.
Package stringset is an exceedingly simple 'set' implementation for strings.
text/pattern
Package pattern implements lightweight parsable string patterns.
Package pattern implements lightweight parsable string patterns.
text/sanitizehtml
Package sanitizehtml implements a sanitizer of a very limited HTML.
Package sanitizehtml implements a sanitizer of a very limited HTML.
text/stringtemplate
Package stringtemplate implements Python string.Template-like substitution.
Package stringtemplate implements Python string.Template-like substitution.
text/templateproto
Package templateproto defines a proto-based way to configure templates for JSON documents.
Package templateproto defines a proto-based way to configure templates for JSON documents.
text/units
Package units provides common useful printable units.
Package units provides common useful printable units.
treapstore
Package treapstore is a lightweight append-only in-memory key-value store built on top a treap (tree + heap) implementation.
Package treapstore is a lightweight append-only in-memory key-value store built on top a treap (tree + heap) implementation.
Package errors is an augmented replacement package for the stdlib "errors" package.
Package errors is an augmented replacement package for the stdlib "errors" package.
Package eventlog provides a client which can be used to to collect and send batches of ChromeInfraEvent logs to the eventlog service.
Package eventlog provides a client which can be used to to collect and send batches of ChromeInfraEvent logs to the eventlog service.
proto
Package eventlog is a generated protocol buffer package.
Package eventlog is a generated protocol buffer package.
flag
flagenum
Package flagenum is a utility package which facilitates implementation of flag.Value, json.Marshaler, and json.Unmarshaler interfaces via a string-to- value mapping.
Package flagenum is a utility package which facilitates implementation of flag.Value, json.Marshaler, and json.Unmarshaler interfaces via a string-to- value mapping.
multiflag
Package multiflag is a package providing a flag.Value implementation capable of switching between multiple registered sub-flags, each of which have their own set of parameter flags.
Package multiflag is a package providing a flag.Value implementation capable of switching between multiple registered sub-flags, each of which have their own set of parameter flags.
stringlistflag
Package stringlistflag provides a flag.Value implementation which resolves multiple args into a []string.
Package stringlistflag provides a flag.Value implementation which resolves multiple args into a []string.
stringmapflag
Package stringmapflag provides a flag.Value that, when parsed, augments a map[string]string with the supplied parameter.
Package stringmapflag provides a flag.Value that, when parsed, augments a map[string]string with the supplied parameter.
stringsetflag
Package stringsetflag provides a flag.Value implementation which resolves multiple args into a stringset.
Package stringsetflag provides a flag.Value implementation which resolves multiple args into a stringset.
gcloud
googleoauth
Package googleoauth contains some helpers related to Google OAuth2.
Package googleoauth contains some helpers related to Google OAuth2.
gs
Package gs implements a versatile Google Storage client on top of the standard Google Storage Go API.
Package gs implements a versatile Google Storage client on top of the standard Google Storage Go API.
iam
Package iam implements wrappers around some Google Cloud IAM APIs.
Package iam implements wrappers around some Google Cloud IAM APIs.
Package iotools contains a collection of I/O-related utility structs and methods.
Package iotools contains a collection of I/O-related utility structs and methods.
Package isolated defines the isolated common code shared by the client and server.
Package isolated defines the isolated common code shared by the client and server.
Package isolatedclient implements the API to communicate with the Isolated server and to process '.isolated' files.
Package isolatedclient implements the API to communicate with the Isolated server and to process '.isolated' files.
isolatedfake
Package isolatedfake implements an in-process fake Isolated server for integration testing.
Package isolatedfake implements an in-process fake Isolated server for integration testing.
Package lhttp implements HTTP client helper code (JSON, automatic retries, authentication, etc).
Package lhttp implements HTTP client helper code (JSON, automatic retries, authentication, etc).
Package logging defines Logger interface and context.Context helpers to put\get logger from context.Context.
Package logging defines Logger interface and context.Context helpers to put\get logger from context.Context.
gologger
Package gologger is a compatibility layer between go-logging library and luci-go/common/logging.
Package gologger is a compatibility layer between go-logging library and luci-go/common/logging.
config
Package config contains luci-config protobuf definitions.
Package config contains luci-config protobuf definitions.
google
Package google contains utility methods to help interface between Google standard protobufs and native Go types.
Package google contains utility methods to help interface between Google standard protobufs and native Go types.
google/descutil
Package descutil contains utility functions for protobuf descriptor messages.
Package descutil contains utility functions for protobuf descriptor messages.
milo
Package milo is a generated protocol buffer package.
Package milo is a generated protocol buffer package.
transient
Package transient allows you to tag and retry 'transient' errors (i.e.
Package transient allows you to tag and retry 'transient' errors (i.e.
runtime
goroutine
Package goroutine is mostly to house a function for obtaining the current goroutine ID, but probably will eventually contain other naughty functions.
Package goroutine is mostly to house a function for obtaining the current goroutine ID, but probably will eventually contain other naughty functions.
paniccatcher
Package paniccatcher package exposes a set of utility structures and methods that support standardized panic catching and handling.
Package paniccatcher package exposes a set of utility structures and methods that support standardized panic catching and handling.
tracer
Package tracer implements code to generate Chrome-compatible traces.
Package tracer implements code to generate Chrome-compatible traces.
sync
bufferpool
Package bufferpool implements a pool of bytes.Buffer instances backed by a sync.Pool.
Package bufferpool implements a pool of bytes.Buffer instances backed by a sync.Pool.
cancelcond
Package cancelcond implements a wrapper around sync.Cond that response to context.Context cancellation.
Package cancelcond implements a wrapper around sync.Cond that response to context.Context cancellation.
mutexpool
Package mutexpool implements P, a pool of keyed mutexes.
Package mutexpool implements P, a pool of keyed mutexes.
system
environ
Package environ is a simple environment variable manipulation library.
Package environ is a simple environment variable manipulation library.
exitcode
Package exitcode provides common methods to extract exit codes from errors returned by exec.Cmd.
Package exitcode provides common methods to extract exit codes from errors returned by exec.Cmd.
prober
Package prober exports Probe, which implements logic to identify a wrapper's wrapped target.
Package prober exports Probe, which implements logic to identify a wrapper's wrapped target.
terminal
Package terminal is cherry-picked code from golang.org/x/crypto/ssh.
Package terminal is cherry-picked code from golang.org/x/crypto/ssh.
testing
assertions
Package assertions is designed to be a collection of `.` importable, goconvey compatible testing assertions, in the style of "github.com/smartystreets/assertions".
Package assertions is designed to be a collection of `.` importable, goconvey compatible testing assertions, in the style of "github.com/smartystreets/assertions".
prpctest
Package prpctest is a package to facilitate pRPC testing by wrapping httptest with a pRPC Server.
Package prpctest is a package to facilitate pRPC testing by wrapping httptest with a pRPC Server.
Package tsmon contains global state and utility functions for configuring and interacting with tsmon.
Package tsmon contains global state and utility functions for configuring and interacting with tsmon.
distribution
Package distribution contains distribution metrics, fixed width and geometric bucketers.
Package distribution contains distribution metrics, fixed width and geometric bucketers.
field
Package field contains constructors for metric field definitions.
Package field contains constructors for metric field definitions.
metric
Package metric is the API for defining metrics and updating their values.
Package metric is the API for defining metrics and updating their values.
monitor
Package monitor contains the code for sending metric data to monitoring endpoints.
Package monitor contains the code for sending metric data to monitoring endpoints.
runtimestats
Package runtimestats exposes metrics related to the Go runtime.
Package runtimestats exposes metrics related to the Go runtime.
store
Package store contains code for storing and retreiving metrics.
Package store contains code for storing and retreiving metrics.
store/storetest
Package storetest is imported exclusively by tests for Store implementations.
Package storetest is imported exclusively by tests for Store implementations.
target
Package target contains information about the thing that is sending metrics - either a NetworkDevice (a machine) or a Task (a service).
Package target contains information about the thing that is sending metrics - either a NetworkDevice (a machine) or a Task (a service).
ts_mon_proto
Package ts_mon_proto is a generated protocol buffer package.
Package ts_mon_proto is a generated protocol buffer package.
types
Package types contains miscellaneous structs and interfaces used throughout tsmon.
Package types contains miscellaneous structs and interfaces used throughout tsmon.
versions
Package versions allows processes to report string-valued metrics with versions of various libraries they link with.
Package versions allows processes to report string-valued metrics with versions of various libraries they link with.