package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

CleanupTempDirs removes all directories listed in the record file specified by recordPath.
CreateTempDir creates a temporary directory with a prefix under the given parentDir and returns the absolute path of the temporary directory.
CreateWithSync creates a file wrapped with logic to periodically sync whenever more than bytesPerSync bytes accumulate.
InitEnv initializes a new virtual filesystem environment.
InitEnvFromStoreSpec constructs a new Env from a store spec.
InitEnvsFromStoreSpecs constructs Envs for all the provided store specs.
InMemory constructs a new in-memory environment.
MustInitPhysicalTestingEnv initializes an Env that reads/writees from the real physical filesystem in the provided directory, without encryption-at-rest.
NewStickyRegistry creates a new StickyRegistry.
ReadFile reads data from a file named by filename.
RecordTempDir records tempPath to the record file specified by recordPath to facilitate cleanup of the temporary directory on subsequent startups.
SafeWriteToFile writes the byte slice to the filename, contained in dir, using the given fs.
WriteFile writes data to a file named by filename.

# Constants

BackupReadCategory are reads for backups.
BatchEvalReadCategory includes evaluation of most BatchRequests.
CRDBLogWriteCategory are disk writes related to Cockroach logs.
EncryptionRegistryWriteCategory are disk writes related to the EAR registry.
IntentResolutionReadCategory are reads for intent resolution.
MVCCGCReadCategory are reads for MVCC GC.
PebbleIngestionWriteCategory are disk writes related to Pebble SSTable ingestion.
RaftSnapshotWriteCategory are disk writes related to Raft snapshots.
RangefeedReadCategory are reads for rangefeeds, including catchup scans.
RangeSnapshotReadCategory are reads for sending range snapshots.
ReadOnly indicates a filesystem is read-only.
ReadWrite indicates a filesystem may be both read from and written to.
ReplicationReadCategory are reads related to Raft replication.
ScanBackgroundBatchEvalReadCategory are BatchRequest (reverse) scans that have admission priority lower than NormalPri.
ScanRegularBatchEvalReadCategory are BatchRequest (reverse) scans that have admission priority NormalPri or higher.
SQLColumnSpillWriteCategory are disk writes related to disk spills caused SQL column spill.
UnknownReadCategory are requests that are not categorized.
UnspecifiedWriteCategory are disk writes that do not belong to any existing category.

# Variables

CanRegistryElideFunc is a function that returns true for entries that can be elided instead of being written to the registry.
DefaultNumOldFileRegistryFiles is the default number of old registry files kept for debugging.
MaxSyncDuration is the threshold above which an observed engine sync duration triggers either a warning or a fatal error.
MaxSyncDurationFatalOnExceeded governs whether disk stalls longer than MaxSyncDuration fatal the Cockroach process.
NewEncryptedEnvFunc creates an encrypted environment and returns the vfs.FS to use for reading and writing data.
UseStrictMemFS option instructs StickyRegistry to produce strict in-memory filesystems, i.e.

# Structs

EncryptionEnv describes the encryption-at-rest environment, providing access to a filesystem with on-the-fly encryption.
EncryptionRegistries contains the encryption-related registries: Both are serialized protobufs.
Env is an abstraction over the storage environment, including the virtual file system and related configuration.
EnvConfig provides additional configuration settings for Envs.
EnvStats is a set of RocksDB env stats, including encryption status.
FileRegistry keeps track of files for the data-FS and store-FS for encryption-at-rest (see encrypted_fs.go for high-level comment).

# Interfaces

EncryptionStatsHandler provides encryption related stats.
StickyRegistry manages the lifecycle of sticky in-memory filesystems.

# Type aliases

Envs holds a set of Env.
ReadCategory is used to export metrics and maps to a QoS understood by Pebble.
RWMode is an enum for whether a filesystem is read-write or read-only.
StickyOption is a config option for a sticky vfs registry that can be passed to NewStickyRegistry.