Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventEmitter ¶
type EventEmitter func(eventType string, data interface{})
EventEmitter is a function type for emitting events to the frontend
type JobProgress ¶
type JobProgress interface {
AddProgress(id uuid.UUID, name string, pType ProgressType, total int64) Progress
FinishProgress(id uuid.UUID)
GetProgress(id uuid.UUID) Progress
GetAllProgress() map[uuid.UUID]Progress
GetAllProgressState() []ProgressState
GetJobID() string
Close()
SetAllPaused(paused bool)
}
func NewProgressJob ¶
func NewProgressJob(jobID string) JobProgress
type Progress ¶
type Progress interface {
UpdateProgress(processed int64)
Finish()
GetState() ProgressState
GetID() uuid.UUID
GetName() string
GetType() ProgressType
GetCurrent() int64
GetTotal() int64
GetPercentage() float64
IsComplete() bool
GetStartTime() time.Time
GetElapsedTime() time.Duration
SetPaused(paused bool)
IsPaused() bool
}
Progress represents an individual progress indicator
type ProgressState ¶
type ProgressType ¶
type ProgressType string
const ( ProgressTypeUploading ProgressType = "uploading" ProgressTypePar2Generation ProgressType = "par2_generation" ProgressTypeChecking ProgressType = "checking" )
Click to show internal directories.
Click to hide internal directories.