v1datatransfer

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, conf DownloadConfig) error

Download downloads a dataset or fails if it is still being uploaded

func GetLocalDatasetSize

func GetLocalDatasetSize(ctx context.Context, dataPath string) (int64, error)

GetLocalDatasetSize calculates the total size in bytes of the archived version of a directory on disk

func GetRemoteDatasetSize

func GetRemoteDatasetSize(ctx context.Context, batchClient *v1batch.Client, dataOps v1data.DataOps, projectID, datasetID string) (int64, error)

GetRemoteDatasetSize gets the size of a dataset from the metadata object

func Upload

Upload uploads a dataset

Types

type DownloadConfig

type DownloadConfig struct {
	BatchClient v1batch.ClientInterface
	DataOps     v1data.DataOps
	LocalDir    string
	ProjectID   string
	DatasetID   string
	Concurrency int
	ProgressCh  chan<- int64
}

DownloadConfig is the config for Download operations

type UploadConfig

type UploadConfig struct {
	BatchClient *v1batch.Client
	DataOps     v1data.DataOps
	LocalDir    string
	ProjectID   string
	Concurrency int
	ProgressCh  chan<- int64
}

UploadConfig is the config for Upload operations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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