Versions in this module Expand all Collapse all v0 v0.1.0 Oct 21, 2024 Changes in this version + var ErrorMaxTransferLimitReached = errors.New("max transfer limit reached as set by --max-transfer") + var ErrorMaxTransferLimitReachedFatal = fserrors.FatalError(ErrorMaxTransferLimitReached) + var ErrorMaxTransferLimitReachedGraceful = fserrors.NoRetryError(ErrorMaxTransferLimitReached) + var MaxCompletedTransfers = 100 + var TokenBucket tokenBucket + func LimitTPS(ctx context.Context) + func Start(ctx context.Context) + func StartLimitTPS(ctx context.Context) + func StatsGroupFromContext(ctx context.Context) (string, bool) + func WithStatsGroup(parent context.Context, group string) context.Context + type Account struct + func UnWrapAccounting(in io.Reader) (unwrapped io.Reader, acc *Account) + func (acc *Account) Abandon() + func (acc *Account) AccountRead(n int) (err error) + func (acc *Account) Close() error + func (acc *Account) Done() + func (acc *Account) DryRun(n int64) + func (acc *Account) GetAsyncReader() *asyncreader.AsyncReader + func (acc *Account) GetReader() io.ReadCloser + func (acc *Account) HasBuffer() bool + func (acc *Account) OldStream() io.Reader + func (acc *Account) Read(p []byte) (n int, err error) + func (acc *Account) ServerSideCopyEnd(n int64) + func (acc *Account) ServerSideMoveEnd(n int64) + func (acc *Account) ServerSideTransferEnd(n int64) + func (acc *Account) ServerSideTransferStart() + func (acc *Account) SetStream(in io.Reader) + func (acc *Account) StopBuffering() + func (acc *Account) String() string + func (acc *Account) UpdateReader(ctx context.Context, in io.ReadCloser) + func (acc *Account) WithBuffer() *Account + func (acc *Account) WrapStream(in io.Reader) io.Reader + func (acc *Account) WriteTo(w io.Writer) (n int64, err error) + type Accounter interface + OldStream func() io.Reader + SetStream func(io.Reader) + WrapStream func(io.Reader) io.Reader + type RcloneCollector struct + func NewRcloneCollector(ctx context.Context) *RcloneCollector + func (c *RcloneCollector) Collect(ch chan<- prometheus.Metric) + func (c *RcloneCollector) Describe(ch chan<- *prometheus.Desc) + type StatsInfo struct + func GlobalStats() *StatsInfo + func NewStats(ctx context.Context) *StatsInfo + func NewStatsGroup(ctx context.Context, group string) *StatsInfo + func Stats(ctx context.Context) *StatsInfo + func StatsGroup(ctx context.Context, group string) *StatsInfo + func (s *StatsInfo) AddServerSideCopy(n int64) + func (s *StatsInfo) AddServerSideMove(n int64) + func (s *StatsInfo) AddTransfer(transfer *Transfer) + func (s *StatsInfo) Bytes(bytes int64) + func (s *StatsInfo) BytesNoNetwork(bytes int64) + func (s *StatsInfo) DeleteFile(ctx context.Context, size int64) error + func (s *StatsInfo) DeletedDirs(deletedDirs int64) int64 + func (s *StatsInfo) DoneChecking(remote string) + func (s *StatsInfo) DoneTransferring(remote string, ok bool) + func (s *StatsInfo) Error(err error) error + func (s *StatsInfo) Errored() bool + func (s *StatsInfo) Errors(errors int64) + func (s *StatsInfo) FatalError() + func (s *StatsInfo) GetBytes() int64 + func (s *StatsInfo) GetBytesWithPending() int64 + func (s *StatsInfo) GetChecks() int64 + func (s *StatsInfo) GetDeletes() int64 + func (s *StatsInfo) GetErrors() int64 + func (s *StatsInfo) GetLastError() error + func (s *StatsInfo) GetTransfers() int64 + func (s *StatsInfo) HadFatalError() bool + func (s *StatsInfo) HadRetryError() bool + func (s *StatsInfo) Log() + func (s *StatsInfo) NewCheckingTransfer(obj fs.DirEntry, what string) *Transfer + func (s *StatsInfo) NewTransfer(obj fs.DirEntry, dstFs fs.Fs) *Transfer + func (s *StatsInfo) NewTransferRemoteSize(remote string, size int64, srcFs, dstFs fs.Fs) *Transfer + func (s *StatsInfo) PruneTransfers() + func (s *StatsInfo) RemoteStats() (out rc.Params, err error) + func (s *StatsInfo) RemoveTransfer(transfer *Transfer) + func (s *StatsInfo) Renames(renames int64) int64 + func (s *StatsInfo) ResetCounters() + func (s *StatsInfo) ResetErrors() + func (s *StatsInfo) RetryAfter() time.Time + func (s *StatsInfo) RetryError() + func (s *StatsInfo) SetCheckQueue(n int, size int64) + func (s *StatsInfo) SetRenameQueue(n int, size int64) + func (s *StatsInfo) SetTransferQueue(n int, size int64) + func (s *StatsInfo) String() string + func (s *StatsInfo) Transferred() []TransferSnapshot + type TokenBucketSlot int + const TokenBucketSlotAccounting + const TokenBucketSlotTransportRx + const TokenBucketSlotTransportTx + const TokenBucketSlots + type Transfer struct + func (tr *Transfer) Account(ctx context.Context, in io.ReadCloser) *Account + func (tr *Transfer) Done(ctx context.Context, err error) + func (tr *Transfer) IsDone() bool + func (tr *Transfer) Reset(ctx context.Context) + func (tr *Transfer) Snapshot() TransferSnapshot + func (tr *Transfer) TimeRange() (time.Time, time.Time) + type TransferSnapshot struct + Bytes int64 + Checked bool + CompletedAt time.Time + DstFs string + Error error + Group string + Name string + Size int64 + SrcFs string + StartedAt time.Time + func (as TransferSnapshot) MarshalJSON() ([]byte, error) + type WrapFn func(io.Reader) io.Reader + func UnWrap(in io.Reader) (unwrapped io.Reader, wrap WrapFn)