v1datatransfer

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Upload(ctx context.Context, conf UploadConfig) (string, error)

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
	Tag         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