store

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadManager

type DownloadManager struct {
	ToDownload   chan transmit.Serializable // desc.RemoteFragmentDesc
	Completed    chan transmit.Serializable // desc.LocalFragmentDesc
	Minio        minio.Config
	TargetFolder string
	// contains filtered or unexported fields
}

DownloadManager is the structure that consumes RemoteFragmentDesc structures and downloads them

func NewDownloadManager

func NewDownloadManager(folder string, toDownload, downloaded chan transmit.Serializable) DownloadManager

NewDownloadManager creates a new downloadmanager and initiates a client of the Minio service

func (DownloadManager) Start

func (dmanager DownloadManager) Start(wg *sync.WaitGroup)

Start asychronously calls StartBlocking via a Goroutine

func (DownloadManager) StartBlocking

func (dmanager DownloadManager) StartBlocking()

StartBlocking enters an endless loop consuming RemoteFragmentDescs and downloading the associated data

func (DownloadManager) Stop added in v0.1.10

func (dmanager 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(toUpload, uploaded chan transmit.Serializable,
	sidecarConfig *config.Config, collector garbage.FragmentCollector) UploadManager

NewUploadManager creates a new upload manager and initiates a client of the Minio service

func (UploadManager) Start

func (umanager UploadManager) Start(wg *sync.WaitGroup)

Start asychronously calls StartBlocking via a Goroutine

func (UploadManager) StartBlocking

func (umanager UploadManager) StartBlocking()

StartBlocking enters an endless loop consuming LocalFragmentDesc and uploading the associated data

func (UploadManager) Stop added in v0.1.10

func (umanager 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
	// contains filtered or unexported fields
}

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, sidecarConf *config.Config,
	collector garbage.FragmentCollector) Uploader

NewUploader creates a new Uploader instance that will upload the passed fragment description

func (Uploader) IsComplete

func (u Uploader) IsComplete() bool

IsComplete checks whether all uploads have completed

func (*Uploader) Start

func (u *Uploader) Start(wg *sync.WaitGroup)

Start asychronously calls StartBlocking via a Goroutine

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

Jump to

Keyboard shortcuts

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