Versions in this module Expand all Collapse all v1 v1.0.3 May 3, 2020 v1.0.2 May 2, 2020 Changes in this version + const BufioReadSize + func DoUpload(uploadURL string, readerlen64 rio.ReaderLen64, checkFunc CheckFunc) + type BlockState struct + CheckSum string + ID int + Range transfer.Range + func SplitBlock(fileSize, blockSize int64) (blockList []*BlockState) + type CheckFunc func(resp *http.Response, uploadErr error) + type InstanceState struct + BlockList []*BlockState + type MultiError struct + Err error + Terminated bool + func (me *MultiError) Error() string + type MultiUpload interface + CreateSuperFile func(checksumList ...string) (cerr error) + Precreate func() (perr error) + TmpFile func(ctx context.Context, partseq int, partOffset int64, ...) (checksum string, terr error) + type MultiUploader struct + func NewMultiUploader(multiUpload MultiUpload, file rio.ReaderAtLen64, config *MultiUploaderConfig) *MultiUploader + func (muer *MultiUploader) Cancel() + func (muer *MultiUploader) Execute() + func (muer *MultiUploader) InstanceState() *InstanceState + func (muer *MultiUploader) OnCancel(onCancelEvent requester.Event) + func (muer *MultiUploader) OnError(onErrorEvent requester.EventOnError) + func (muer *MultiUploader) OnExecute(onExecuteEvent requester.Event) + func (muer *MultiUploader) OnFinish(onFinishEvent requester.Event) + func (muer *MultiUploader) OnSuccess(onSuccessEvent requester.Event) + func (muer *MultiUploader) OnUploadStatusEvent(f UploadStatusFunc) + func (muer *MultiUploader) SetInstanceState(is *InstanceState) + type MultiUploaderConfig struct + BlockSize int64 + MaxRate int64 + Parallel int + type Readed64 interface + Readed func() int64 + func NewReaded64(rl rio.ReaderLen64) Readed64 + type SplitUnit interface + Left func() int64 + Range func() transfer.Range + func NewBufioSplitUnit(readerAt io.ReaderAt, readRange transfer.Range, speedsStat *speeds.Speeds, ...) SplitUnit + type Status interface + SpeedsPerSecond func() int64 + TimeElapsed func() time.Duration + TotalSize func() int64 + Uploaded func() int64 + type UploadStatus struct + func (us *UploadStatus) SpeedsPerSecond() int64 + func (us *UploadStatus) TimeElapsed() time.Duration + func (us *UploadStatus) TotalSize() int64 + func (us *UploadStatus) Uploaded() int64 + type UploadStatusFunc func(status Status, updateChan <-chan struct{}) + type Uploader struct + func NewUploader(url string, readerlen64 rio.ReaderLen64) (uploader *Uploader) + func (u *Uploader) Execute() + func (u *Uploader) GetStatusChan() <-chan Status + func (u *Uploader) OnExecute(fn func()) + func (u *Uploader) OnFinish(fn func()) + func (u *Uploader) SetCheckFunc(checkFunc CheckFunc) + func (u *Uploader) SetClient(c *requester.HTTPClient) + func (u *Uploader) SetContentType(contentType string)