Documentation ¶
Index ¶
- Variables
- type EventsReporter
- type File
- type Job
- func (r *Job) Add(report ToStatusFile)
- func (r *Job) All(t ...Status) bool
- func (r *Job) Any(t ...Status) (b bool)
- func (r *Job) Cancel()
- func (r *Job) ClearCalled()
- func (r *Job) ClearStatuses() Job
- func (r *Job) Count(t ...Status) int
- func (r *Job) ETA(t ...Status) time.Duration
- func (r *Job) ElapsedTime() time.Duration
- func (r *Job) EndScan()
- func (r *Job) Events(event Status, callback Reporter)
- func (r *Job) Files() []filesSDK.File
- func (r *Job) Find(t Status) (ToStatusFile, bool)
- func (r *Job) Finish()
- func (r *Job) Idle(t ...Status) bool
- func (r Job) Init() *Job
- func (r *Job) Job() *Job
- func (r *Job) Percentage(t ...Status) int
- func (r *Job) RemainingBytes(t ...Status) int64
- func (r *Job) Reset()
- func (r *Job) Scan()
- func (r *Job) SetEventsReporter(e EventsReporter)
- func (r *Job) SetManager(m *manager.Manager)
- func (r *Job) Start(ignoreCodeStart ...bool)
- func (r *Job) StatusFromError(s ToStatusFile, err error)
- func (r *Job) Sub(t ...Status) *Job
- func (r *Job) SubscribeAll() Subscriptions
- func (r *Job) TotalBytes(t ...Status) int64
- func (r *Job) TransferBytes(t ...Status) int64
- func (r *Job) TransferRate(t ...Status) int64
- func (r *Job) UpdateStatus(status Status, file ToStatusFile, err error)
- func (r *Job) WithContext(ctx context.Context) context.Context
- type Reporter
- type Signal
- type Status
- type Subscriptions
- type ToStatusFile
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Null = Status{"", -1} Indexed = Status{"indexed", 0} Retrying = Status{"retrying", 0} Queued = Status{"queued", 1} Downloading = Status{"downloading", 2} Uploading = Status{"uploading", 2} Skipped = Status{"skipped", 3} Ignored = Status{"ignored", 3} Complete = Status{"complete", 4} Canceled = Status{"canceled", 5} Errored = Status{"errored", 5} Included = []Status{Indexed, Queued, Retrying, Downloading, Uploading, Complete, Canceled, Errored} Excluded = []Status{Skipped, Ignored} Valid = []Status{Indexed, Queued, Retrying, Downloading, Uploading, Complete} Invalid = []Status{Null, Canceled, Errored, Skipped, Ignored} Running = []Status{Downloading, Uploading} Ended = []Status{Complete, Canceled, Errored} )
Functions ¶
This section is empty.
Types ¶
type EventsReporter ¶
type File ¶
type File struct { filesSDK.File *Job Status TransferBytes int64 LocalPath string RemotePath string Id string LastByte time.Time Err error }
func (*File) ToStatusFile ¶
type Job ¶
type Job struct { Id string *timer.Timer Statuses []ToStatusFile Direction direction.Type LocalPath string RemotePath string Sync bool CodeStart func() context.CancelFunc Wait func() Params interface{} Client interface{} EventsReporter directory.Type *manager.Manager RetryPolicy string *ignore.GitIgnore Started *Signal Finished *Signal Canceled *Signal Scanning *Signal EndScanning *Signal // contains filtered or unexported fields }
func (*Job) Add ¶
func (r *Job) Add(report ToStatusFile)
func (*Job) ClearCalled ¶
func (r *Job) ClearCalled()
func (*Job) ClearStatuses ¶
func (*Job) ElapsedTime ¶
func (*Job) Percentage ¶
func (*Job) RemainingBytes ¶
func (*Job) SetEventsReporter ¶
func (r *Job) SetEventsReporter(e EventsReporter)
func (*Job) SetManager ¶
func (*Job) StatusFromError ¶
func (r *Job) StatusFromError(s ToStatusFile, err error)
func (*Job) SubscribeAll ¶
func (r *Job) SubscribeAll() Subscriptions
func (*Job) TotalBytes ¶
func (*Job) TransferBytes ¶
func (*Job) TransferRate ¶
func (*Job) UpdateStatus ¶
func (r *Job) UpdateStatus(status Status, file ToStatusFile, err error)
type Subscriptions ¶
type ToStatusFile ¶
Click to show internal directories.
Click to hide internal directories.