package
1.1.4
Repository: https://github.com/cockroachdb/pebble.git
Documentation: pkg.go.dev

# Functions

OnIndex constructs an injector that returns an error on the (n+1)-th invocation of its MaybeError function.
WithProbability returns a function that returns an error with the provided probability when passed op.
Wrap wraps an existing vfs.FS implementation, returning a new vfs.FS implementation that shadows operations to the provided FS.
WrapFile wraps an existing vfs.File, returning a new vfs.File that shadows operations to the provided vfs.File.

# Constants

OpCreate describes a create file operation.
OpFileClose describes a close file operation.
OpFileFlush describes a file flush operation.
OpFilePreallocate describes a file preallocate operation.
OpFileRead describes a file read operation.
OpFileReadAt describes a file seek read operation.
OpFileStat describes a file stat operation.
OpFileSync describes a file sync operation.
OpFileWrite describes a file write operation.
OpFileWriteAt describes a file seek write operation.
OpGetDiskUsage describes a disk usage operation.
OpKindRead describes read operations.
OpKindWrite describes write operations.
OpLink describes a hardlink operation.
OpList describes a list directory operation.
OpLock describes a lock file operation.
OpMkdirAll describes a make directory including parents operation.
OpOpen describes a file open operation.
OpOpenDir describes a directory open operation.
OpRemove describes a remove file operation.
OpRemoveAll describes a recursive remove operation.
OpRename describes a rename operation.
OpReuseForRewrite describes a reuse for rewriting operation.
OpStat describes a path-based stat operation.

# Variables

ErrInjected is an error artificially injected for testing fs error paths.

# Structs

FS implements vfs.FS, injecting errors into its operations.
InjectIndex implements Injector, injecting an error at a specific index.

# Interfaces

Injector injects errors into FS operations.

# Type aliases

InjectorFunc implements the Injector interface for a function with MaybeError's signature.
Op is an enum describing the type of operation.
OpKind is an enum describing whether an operation is a read or write operation.