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

# Packages

Package impl is a stub package that imports all of the concrete implementations of the various cloud storage providers to trigger their initialization-time registration with the cloud storage provider registry.

# Functions

BackgroundPipe is a helper for providing a Writer that is backed by a pipe that has a background process reading from it.
CheckHTTPContentRangeHeader parses Content-Range header and ensures that range start offset is the same as the expected 'pos'.
CheckNoKMSAccess verifies that trying to encrypt with the given kmsURI gives a permission error.
DelayedRetry runs fn and re-runs it a limited number of times if it fails.
EarlyBootExternalStorageConfFromURI generates an cloudpb.ExternalStorage config from a URI string.
EarlyBootExternalStorageFromURI returns an ExternalStorage for the given URI.
ExternalStorageConfFromURI generates an ExternalStorage config from a URI string.
ExternalStorageFromURI returns an ExternalStorage for the given URI.
GetPrefixBeforeWildcard gets the prefix of a path that does not contain glob- style matchers, up to the last path segment before the first one which has a glob character.
IsResumableHTTPError returns true if we can resume download after receiving an error 'err'.
JoinPathPreservingTrailingSlash wraps path.Join but preserves the trailing slash if there was one in the suffix.
KMSEncryptDecrypt is the method used to test if the given KMS can correctly encrypt and decrypt a string.
KMSFromURI is the method used to create a KMS instance from the provided URI.
MakeEarlyBootExternalStorage creates an ExternalStorage from the given config.
MakeExternalStorage creates an ExternalStorage from the given config.
MakeHTTPClient makes an http client configured with the common settings used for interacting with cloud storage (timeouts, retries, CA certs, etc).
MakeHTTPClientForTransport creates a new http.Client with the given transport.
MakeLimiters makes limiters for all registered ExternalStorageProviders and sets them up to be updated when settings change.
MakeMetrics returns a new instance of Metrics.
MakeTransport makes an http transport configured with the common settings used for interacting with cloud storage (timeouts, retries, CA certs, etc).
NewEarlyBootExternalStorageAccessor creates an EarlyBootExternalStorageAccessor.
NewResumingReader returns a ResumingReader instance.
ParseRoleProvidersString parses a comma separated list of role provider strings.
ParseRoleString parses a comma separated string of roles into a list of intermediate delegate roles and the final assumed role.
RedactedParams is a helper for making a set of param names to redact in URIs.
RedactKMSURI redacts the Master Key ID and the ExternalStorage secret credentials.
RegisterExternalStorageProvider registers an external storage provider for a given URI scheme and provider type.
RegisterKMSFromURIFactory is used by every concrete KMS implementation to register its factory method.
ReplaceProviderForTesting replaces an existing registered provider with the given alternate implementation.
ResumingReaderRetryOnErrFnForSettings returns a function that can be passed as a RetryOnErrFn to NewResumingReader.
SanitizeExternalStorageURI returns the external storage URI with with some secrets redacted, for use when showing these URIs in the UI, to provide some protection from shoulder-surfing.
SchemeSupportsEarlyBoot returns an error if the scheme of the provided URL has a provider that can't be used during early boot.
WithClientName sets the "client" label on network metrics.
WithIOAccountingInterceptor sets the ReadWriterInterceptor that is used for IO Accounting.
WriteFile is a helper for writing the content of a Reader to the given path of an ExternalStorage.

# Constants

AuthParam is the query parameter for the cluster settings named key in a URI.
AuthParamImplicit is the query parameter for the implicit authentication mode in a URI.
AuthParamSpecified is the query parameter for the specified authentication mode in a URI.
LocalityURLParam is the parameter name used when specifying a locality tag in a locality aware backup/restore.
MaxDelayedRetryAttempts is the number of times the delayedRetry method will re-run the provided function.

# Variables

ErrFileDoesNotExist is a sentinel error for indicating that a specified bucket/object/key/file (depending on storage terminology) does not exist.
ErrListingDone is a marker for indicating listing is done.
ErrListingUnsupported is a marker for indicating listing is unsupported.
HTTPRetryOptions defines the tunable settings which control the retry of HTTP operations.
NilMetrics represents a nil metrics object.
Timeout is a cluster setting used for cloud storage interactions.
WriteChunkSize is used to control the size of each chunk that is buffered and uploaded by the cloud storage client.

# Structs

ConsumeURL is a helper struct which for "consuming" URL query parameters from the underlying URL.
EarlyBootExternalStorageAccessor provides access to external storage providers that can be accessed from the very start of node startup.
ExternalStorageContext contains the dependencies passed to external storage implementations during creation.
ExternalStorageContext contains the dependencies passed to external storage implementations during creation.
ExternalStorageOptions holds dependencies and values that can be overridden by callers of an ExternalStorageFactory via a passed ExternalStorageOption.
ExternalStorageURIContext contains arguments needed to parse external storage URIs.
Metrics encapsulates the metrics tracking interactions with cloud storage providers.
ResumingReader is a reader which retries reads in case of a transient errors.
TestKMSEnv holds the KMS configuration and the cluster settings.

# Interfaces

ExternalStorage provides an API to read and write files in some storage, namely various cloud storage providers, for example to store backups.
KMS provides an API to interact with a KMS service.
KMSEnv is the environment in which a KMS is configured and used.
A ReadWriterInterceptor providers methods that construct Readers and Writers from given Readers and Writers.
SQLConnI encapsulates the interfaces which will be implemented by the network backed SQLConn which is used to interact with the userfile tables.

# Type aliases

ExternalStorageFromURIFactory describes a factory function for ExternalStorage given a URI.
ExternalStorageConstructor is a function registered to create instances of a given external storage implementation.
ExternalStorageFactory describes a factory function for ExternalStorage.
ExternalStorageFromURIFactory describes a factory function for ExternalStorage given a URI.
ExternalStorageOption is an option passed during the construction of an external storage.
ExternalStorageURIParser functions parses a URL into a structured ExternalStorage configuration.
KMSFromURIFactory describes a factory function for KMS given a URI.
Limiters represents a collection of rate limiters for a given server to use when interacting with the providers in the collection.
ListingFn describes functions passed to ExternalStorage.ListFiles.
ReaderOpenerAt describes a function that opens a ReadCloser at the passed offset.