tailscale.comtailscale.com/util Directories

util/ directory

Directories

PathSynopsis
util/cachePackage cache contains an interface for a cache around a typed value, and various cache implementations that implement that interface.
util/cibuildPackage cibuild reports runtime CI information.
util/clientmetricPackage clientmetric provides client-side metrics whose values get occasionally logged.
util/cloudenvPackage cloudenv reports which known cloud environment we're running in.
util/cmpverPackage cmpver implements a variant of debian version number comparison.
util/codegenPackage codegen contains shared utilities for generating code.
util/cstructPackage cstruct provides a helper for decoding binary data that is in the form of a padded C structure.
util/ctxkeyctxkey provides type-safe key-value pairs for use with context.Context.
util/deephashPackage deephash hashes a Go value recursively, in a predictable order, without looping.
util/deephash/testtypePackage testtype contains types for testing deephash.
util/dirwalkPackage dirwalk contains code to walk a directory.
util/dnsnamePackage dnsname contains string functions for working with DNS names.
util/eventbusPackage eventbus provides an in-process event bus.
util/eventbus/debug-demodebug-demo is a program that serves a bus's debug interface over HTTP, then generates some fake traffic from a handful of clients.
util/execqueuePackage execqueue implements an ordered asynchronous queue for executing functions.
util/expvarxPackage expvarx provides some extensions to the expvar package.
util/goroutinesThe goroutines package contains utilities for tracking and getting active goroutines.
util/groupmemberPackage groupmember verifies group membership of the provided user on the local system.
util/hashxPackage hashx provides a concrete implementation of hash.Hash that operates on a particular block size.
util/httphdrPackage httphdr implements functionality for parsing and formatting standard HTTP headers.
util/httpmPackage httpm has shorter names for HTTP method constants.
util/jsonutilPackage jsonutil provides utilities to improve JSON performance.
util/limiterPackage limiter provides a keyed token bucket rate limiter.
util/lineiterPackage lineiter iterates over lines in things.
util/linereadPackage lineread reads lines from files.
util/linuxfwPackage linuxfw returns the kind of firewall being used by the kernel.
util/linuxfw/linuxfwtestPackage linuxfwtest contains tests for the linuxfw package.
util/lruPackage lru contains a typed Least-Recently-Used cache.
util/makPackage mak helps make maps.
util/multierrPackage multierr provides a simple multiple-error type.
util/mustPackage must assists in calling functions that must succeed.
util/nocasemapsnocasemaps provides efficient functions to set and get entries in Go maps keyed by a string, where the string is always lower-case.
util/osdiagPackage osdiag provides loggers for OS-specific diagnostic information.
util/osshare
util/osuserPackage osuser implements OS user lookup.
util/pidownerPackage pidowner handles lookups from process ID to its owning user.
util/poolPackage pool contains a generic type for managing a pool of resources; for example, connections to a database, or to a remote service.
util/precompressPackage precompress provides build- and serving-time support for precompressed static resources, to avoid the cost of repeatedly compressing unchanging resources.
util/progresstrackingPackage progresstracking provides wrappers around io.Reader and io.Writer that track progress.
util/quarantinePackage quarantine sets platform specific "quarantine" attributes on files that are received from other hosts.
util/racePackage race contains a helper to "race" two functions, returning the first successful result.
util/racebuildPackage racebuild exports a constant about whether the current binary was built with the race detector.
util/randsPackage rands contains utility functions for randomness.
util/reloadPackage reload contains functions that allow periodically reloading a value (e.g.
util/ringbufferPackage ringbuffer contains a fixed-size concurrency-safe generic ring buffer.
util/setPackage set contains set types.
util/singleflightPackage singleflight provides a duplicate function call suppression mechanism.
util/slicesxPackage slicesx contains some helpful generic slice functions.
util/stringsxPackage stringsx provides additional string manipulation functions that aren't in the standard library's strings package or go4.org/mem.
util/syspolicyPackage syspolicy facilitates retrieval of the current policy settings applied to the device or user and receiving notifications when the policy changes.
util/syspolicy/internalPackage internal contains miscellaneous functions and types that are internal to the syspolicy packages.
util/syspolicy/rsopPackage rsop facilitates source.Store registration via RegisterStore and provides access to the effective policy merged from all registered sources via PolicyFor.
util/syspolicy/settingPackage setting contains types for defining and representing policy settings.
util/syspolicy/sourcePackage source defines interfaces for policy stores, facilitates the creation of policy sources, and provides functionality for reading policy settings from these sources.
util/sysresourcesPackage sysresources provides OS-independent methods of determining the resources available to the current system.
util/systemdPackage systemd contains a minimal wrapper around systemd-notify to enable applications to signal readiness and status to systemd.
util/testenvPackage testenv provides utility functions for tests.
util/topkPackage topk defines a count-min sketch and a cheap probabilistic top-K data structure that uses the count-min sketch to track the top K items in constant memory and O(log(k)) time.
util/truncatePackage truncate provides a utility function for safely truncating UTF-8 strings to a fixed length, respecting multi-byte codepoints.
util/usermetricPackage usermetric provides a container and handler for user-facing metrics.
util/vizerrorPackage vizerror provides types and utility funcs for handling visible errors that are safe to display to end users.
util/winutilPackage winutil contains misc Windows/Win32 helper functions.
util/winutil/authenticode
util/winutil/gp
util/winutil/s4u
util/winutil/winenv
util/zstdframePackage zstdframe provides functionality for encoding and decoding independently compressed zstandard frames.
Version
v1.84.0 (latest)
Published
May 21, 2025
Platform
linux/amd64
Last checked
1 day ago

Tools for package owners.