pfssync

package
v2.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDownloader

func WithDownloader(pachClient *CacheClient, cb func(Downloader) error) (retErr error)

WithDownloader provides a scoped environment for a Downloader.

Types

type CacheClient

type CacheClient struct {
	*client.APIClient
	// contains filtered or unexported fields
}

func NewCacheClient

func NewCacheClient(pachClient *client.APIClient, renewer *renew.StringSet) *CacheClient

TODO: Expose configuration for cache size? TODO: Dedupe work?

func (*CacheClient) GetFileTAR

func (cc *CacheClient) GetFileTAR(commit *pfs.Commit, path string) (io.ReadCloser, error)

func (*CacheClient) WithCreateFileSetClient

func (cc *CacheClient) WithCreateFileSetClient(cb func(client.ModifyFile) error) (*pfs.CreateFileSetResponse, error)

type DownloadOption

type DownloadOption func(*downloadConfig)

DownloadOption configures a download call.

func WithEmpty

func WithEmpty() DownloadOption

WithEmpty configures the download call to just download the file info.

func WithHeaderCallback

func WithHeaderCallback(cb func(*tar.Header) error) DownloadOption

WithHeaderCallback configures the download call to execute the callback for each tar file downloaded.

func WithLazy

func WithLazy() DownloadOption

WithLazy configures the download call to lazily download files.

type Downloader

type Downloader interface {
	// Download a PFS file to a location on the local filesystem.
	Download(storageRoot string, file *pfs.File, opts ...DownloadOption) error
}

Downloader is the standard interface for a PFS downloader.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL