Documentation
¶
Overview ¶
Package remote provides an interface for interacting with various remote file systems such as S3, GCS, and distributed file systems for backup/restore operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS interface {
// Upload writes a file to the remote file system at the specified path.
// The path should include the snapshot directory (e.g. "snapshot123/file.data").
// Implementations must handle both new file creation and overwrite scenarios.
Upload(ctx context.Context, path string, data io.Reader) error
// Download retrieves a file from the remote file system at the specified path.
// Returns a ReadCloser that must be closed by the caller after consumption.
Download(ctx context.Context, path string) (io.ReadCloser, error)
// List returns all file paths under a given prefix (typically a snapshot directory).
// Used to check existing files during backup/restore operations.
List(ctx context.Context, prefix string) ([]string, error)
// Delete removes a specific file from the remote file system.
// Path must include the snapshot directory and file name.
Delete(ctx context.Context, path string) error
// Close releases any resources or connections associated with the remote FS.
// Must be called when the client is no longer needed.
Close() error
}
FS defines the interface for interacting with various remote file systems such as S3, GCS, and distributed file systems for backup/restore operations.
Click to show internal directories.
Click to hide internal directories.