Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DownloadManager ¶
type DownloadManager struct { ToDownload chan transmit.Serializable // desc.RemoteFragmentDesc Completed chan transmit.Serializable // desc.LocalFragmentDesc Minio minio.Config // contains filtered or unexported fields }
DownloadManager is the structure that consumes RemoteFragmentDesc structures and downloads them
func NewDownloadManager ¶
func NewDownloadManager(minio minio.Config, toDownload, completed chan transmit.Serializable) DownloadManager
NewDownloadManager creates a new downloadmanager and initiates a client of the Minio service
func (DownloadManager) Start ¶
func (dm DownloadManager) Start(wg *sync.WaitGroup)
Start asychronously calls StartBlocking via a Goroutine
func (DownloadManager) StartBlocking ¶
func (dm DownloadManager) StartBlocking()
StartBlocking enters an endless loop consuming RemoteFragmentDescs and downloading the associated data
func (DownloadManager) Stop ¶ added in v0.1.10
func (dm DownloadManager) Stop()
Stop finishes up and notifies the user of its progress
type Downloader ¶
type Downloader struct { Completed map[string]string // maps the name to the LocalPath, "" means undownloaded NotifyComplete chan desc.LocalFileDesc // Channel to notify downloader of individual file completion NotifyManager chan transmit.Serializable // Channel to notify download_manager of fragment completion DownloadDescriptor desc.RemoteFragmentDesc Minio minio.Config Folder string }
Downloader is a struct responsible for downloading a single fragment to local disk
func NewDownloader ¶
func NewDownloader(msg desc.RemoteFragmentDesc, minio minio.Config, manager chan transmit.Serializable, targetFolder string) Downloader
NewDownloader creates a new Downloader instance that will download teh pass fragment description
func (Downloader) IsComplete ¶
func (d Downloader) IsComplete() bool
IsComplete checks whether all downloads have completed
func (Downloader) Start ¶
func (d Downloader) Start(wg *sync.WaitGroup)
Start asychronously calls StartBlocking via a Goroutine
func (Downloader) StartBlocking ¶ added in v0.1.12
func (d Downloader) StartBlocking()
StartBlocking starts a tracker and the downloading process of each of the files
type UploadManager ¶
type UploadManager struct { ToUpload chan transmit.Serializable // desc.LocalFragmentDesc Completed chan transmit.Serializable // desc.RemoteFragmentDesc Minio minio.Config // contains filtered or unexported fields }
UploadManager is the structure that consumes LocalFragmentDesc structures and uploads them to minio
func NewUploadManager ¶
func NewUploadManager(minio minio.Config, toUpload, completed chan transmit.Serializable) UploadManager
NewUploadManager creates a new upload manager and initiates a client of the Minio service
func (UploadManager) Start ¶
func (um UploadManager) Start(wg *sync.WaitGroup)
Start asychronously calls StartBlocking via a Goroutine
func (UploadManager) StartBlocking ¶
func (um UploadManager) StartBlocking()
StartBlocking enters an endless loop consuming LocalFragmentDesc and uploading the associated data
func (UploadManager) Stop ¶ added in v0.1.10
func (um UploadManager) Stop()
Stop finishes up and notifies the user of its progress
type Uploader ¶
type Uploader struct { Completed map[string]string // maps the name to the LocalPath, "" means unuploaded NotifyComplete chan desc.RemoteFileDesc // Channel to notify uploader of individual file completion NotifyManager chan transmit.Serializable // Channel to notify upload_manager of fragment completion UploadDescriptor desc.LocalFragmentDesc Minio minio.Config }
Uploader is a struct responsible for uploading a single fragment to the minio client
func NewUploader ¶
func NewUploader(msg desc.LocalFragmentDesc, minio minio.Config, manager chan transmit.Serializable) Uploader
NewUploader creates a new Uploader instance that will upload the passed fragment description
func (Uploader) IsComplete ¶
IsComplete checks whether all uploads have completed
func (Uploader) StartBlocking ¶ added in v0.1.12
func (u Uploader) StartBlocking()
StartBlocking starts a tracker and the uploading process of each of the files