luci-go: LUCI in Go: shared code


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
Expand ▾ Collapse ▴


Path Synopsis
api/buildbucket/buildbucket/v1 Package buildbucket provides access to the Build Bucket Service.
api/buildbucket/swarmbucket/v1 Package swarmbucket provides access to the Buildbucket-Swarming integration.
api/gitiles Package gitiles implements GitilesClient in "" package on top of Gitiles's REST API.
api/internal/gensupport Package gensupport is an internal implementation detail used by code generated by the google-api-go-generator tool.
api/isolate/isolateservice/v1 Package isolateservice provides access to the .
api/luci_config/config/v1 Package config provides access to the Configuration Service.
api/swarming/swarming/v1 Package swarming provides access to the .
bq Package bq is a library for working with BigQuery.
cli Package cli is a helper package for "".
clock Package clock is an interface to system time and timers which is easy to test.
data/base128 Package base128 implements base128 encoding and decoding.
data/caching/cache Package cache implements both in-memory and on-disk caching.
data/caching/cacheContext Package cacheContext implements a context.Context wrapper which caches the results of Value calls, speeding up subsequent calls for the same key.
data/caching/lazyslot Package lazyslot implements a caching scheme for globally shared objects that take significant time to refresh.
data/caching/lru Package lru provides least-recently-used (LRU) cache.
data/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.
data/rand/cryptorand Package cryptorand implements a mockable source or crypto strong randomness.
data/rand/mathrand Package mathrand implements a mockable interface for math/rand.Rand.
data/recordio Package recordio implements a basic RecordIO reader and writer.
data/sortby Package sortby provides a succinct way to generate correctly-behaved Less functions for use with the stdlib 'sort' package.
data/stringset Package stringset is an exceedingly simple 'set' implementation for strings.
data/strpair Package strpair implements parsing and formatting of lists of colon-delimited key-value pair strings.
data/text/pattern Package pattern implements lightweight parsable string patterns.
data/text/sanitizehtml Package sanitizehtml implements a sanitizer of a very limited HTML.
data/text/stringtemplate Package stringtemplate implements Python string.Template-like substitution.
data/text/templateproto Package templateproto defines a proto-based way to configure templates for JSON documents.
data/text/units Package units provides common useful printable units.
data/treapstore Package treapstore is a lightweight append-only in-memory key-value store built on top a treap (tree + heap) implementation.
errors Package errors is an augmented replacement package for the stdlib "errors" package.
flag Package flag provides the utilities for implementing command line flags.
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.
flag/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.
flag/stringlistflag Package stringlistflag provides a flag.Value implementation which resolves multiple args into a []string.
flag/stringmapflag Package stringmapflag provides a flag.Value that, when parsed, augments a map[string]string with the supplied parameter.
flag/stringsetflag Package stringsetflag provides a flag.Value implementation which resolves multiple args into a stringset.
gcloud/gae Package gae defines information about the AppEngine environment.
gcloud/googleoauth Package googleoauth contains some helpers related to Google OAuth2.
gcloud/gs Package gs implements a versatile Google Storage client on top of the standard Google Storage Go API.
gcloud/iam Package iam implements wrappers around some Google Cloud IAM APIs.
git/footer Package footer implements parsing logic for git footer and its predecessor (legacy `<KEY>=<arbitrary value>` style).
iotools Package iotools contains a collection of I/O-related utility structs and methods.
isolated Package isolated defines the isolated common code shared by the client and server.
isolatedclient Package isolatedclient implements the API to communicate with the Isolated server and to process '.isolated' files.
isolatedclient/isolatedfake Package isolatedfake implements an in-process fake Isolated server for integration testing.
lhttp Package lhttp implements HTTP client helper code (JSON, automatic retries, authentication, etc).
logging Package logging defines Logger interface and context.Context helpers to put\get logger from context.Context.
logging/gologger Package gologger is a compatibility layer between go-logging library and luci-go/common/logging.
logging/sdlogger Package sdlogger is a logger that formats entries as JSON understood by Stackdriver log collectors.
proto Package proto contains protobuf-related utilities.
proto/access Package access contains Access service protocol.
proto/config Package config contains luci-config protobuf definitions.
proto/examples Package examples shows how to design protos which adhere to the Google Cloud API design guide.
proto/gerrit Package gerrit contains Gerrit service definition.
proto/git Package git contains Git-related protobuf definitions.
proto/gitiles Package gitiles contains Gitiles service definition.
proto/gitiles/mock_gitiles Package mock_gitiles is a generated GoMock package.
proto/google Package google contains utility methods to help interface between Google standard protobufs and native Go types.
proto/google/descutil Package descutil contains utility functions for protobuf descriptor messages.
proto/mask Package mask provides utility functions for google protobuf field mask Supports advanced field mask semantics: - Refer to fields and map keys using .
proto/paged Package paged implements a helper for making paginated Datastore queries.
proto/realms Package realms contains LUCI Realms protobuf definitions.
proto/srcman Package srcman contains source manifest protobuf definitions.
retry/transient 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.
runtime/paniccatcher Package paniccatcher package exposes a set of utility structures and methods that support standardized panic catching and handling.
runtime/profiling Package profiling provides a tool to profile various aspects of the process.
spantest Package spantest implements creation/destruction of a temporary Spanner database.
sync/dispatcher Package dispatcher implements a super-charged version of a buffered channel connected to a (potentially) parallelized work dispatcher.
sync/dispatcher/buffer Package buffer implements a batching buffer with batch lease and retry management.
sync/mutexpool Package mutexpool implements P, a pool of keyed mutexes.
system/environ Package environ is an environment variable manipulation library.
system/exec2 Package exec2 is like os/exec but supports timeout in Wait and process containment for unix using process group.
system/exitcode Package exitcode provides common methods to extract exit codes from errors returned by exec.Cmd.
system/pager Package pager implements paging using commands "less" or "more", depending on availability.
system/prober Package prober exports Probe, which implements logic to identify a wrapper's wrapped target.
system/signals Package signals makes it easier to catch SIGTERM.
system/terminal Package terminal is just a way to forward "".IsTerminal(fd int) In a way that will work on appengine (specifically; it doesn't break appengine's compilation).
testing/assertions Package assertions is designed to be a collection of `.` importable, goconvey compatible testing assertions, in the style of "".
testing/mock Package mock has utility functions for gomock.
testing/prpctest Package prpctest is a package to facilitate pRPC testing by wrapping httptest with a pRPC Server.
trace Package trace provides support for collecting tracing spans.
tsmon Package tsmon contains global state and utility functions for configuring and interacting with tsmon.
tsmon/distribution Package distribution contains distribution metrics, fixed width and geometric bucketers.
tsmon/examples/beep package dummy_project implements a demo application that populates monitoring data for a dummy_project.
tsmon/examples/beep/dummy_project dummy_project implements a monitoring target interface for DummyProject.
tsmon/field Package field contains constructors for metric field definitions.
tsmon/metric Package metric is the API for defining metrics and updating their values.
tsmon/monitor Package monitor contains the code for sending metric data to monitoring endpoints.
tsmon/registry Package registry holds a map of all metrics registered by the process.
tsmon/runtimestats Package runtimestats exposes metrics related to the Go runtime.
tsmon/store Package store contains code for storing and retrieving metrics.
tsmon/store/storetest Package storetest is imported exclusively by tests for Store implementations.
tsmon/target Package target contains information about the thing that is sending metrics - either a NetworkDevice (a machine) or a Task (a service).
tsmon/ts_mon_proto Package ts_mon_proto contains ts_mon protobuf source and generated protobuf data.
tsmon/types Package types contains miscellaneous structs and interfaces used throughout tsmon.
tsmon/versions Package versions allows processes to report string-valued metrics with versions of various libraries they link with.