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 ¶
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.
Click to show internal directories.
Click to hide internal directories.