Documentation
¶
Index ¶
- type ProcessorInterface
- type Watcher
- func (w *Watcher) ClearQueue() error
- func (w *Watcher) Close() error
- func (w *Watcher) GetNextRunTime() time.Time
- func (w *Watcher) GetQueueItems(params queue.PaginationParams) (*queue.PaginatedResult, error)
- func (w *Watcher) GetQueueStats() (map[string]interface{}, error)
- func (w *Watcher) GetWatcherStatus() WatcherStatusInfo
- func (w *Watcher) RemoveFromQueue(id string) error
- func (w *Watcher) Start(ctx context.Context) error
- func (w *Watcher) TriggerScan(ctx context.Context)
- type WatcherScheduleInfo
- type WatcherStatusInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessorInterface ¶ added in v0.0.6
ProcessorInterface defines the interface for checking running jobs
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func New ¶
func New( cfg config.WatcherConfig, q queue.QueueInterface, processor ProcessorInterface, watchFolder string, ) *Watcher
func (*Watcher) ClearQueue ¶ added in v0.0.6
ClearQueue removes all completed and failed items from the queue via queue
func (*Watcher) GetNextRunTime ¶ added in v0.0.24
GetNextRunTime returns the next scheduled run time
func (*Watcher) GetQueueItems ¶ added in v0.0.6
func (w *Watcher) GetQueueItems(params queue.PaginationParams) (*queue.PaginatedResult, error)
GetQueueItems returns queue items via the queue
func (*Watcher) GetQueueStats ¶ added in v0.0.6
GetQueueStats returns statistics about the queue via queue
func (*Watcher) GetWatcherStatus ¶ added in v0.0.24
func (w *Watcher) GetWatcherStatus() WatcherStatusInfo
GetWatcherStatus returns comprehensive watcher status information
func (*Watcher) RemoveFromQueue ¶ added in v0.0.6
RemoveFromQueue removes an item from the queue via queue
func (*Watcher) TriggerScan ¶ added in v0.0.6
TriggerScan triggers an immediate directory scan
type WatcherScheduleInfo ¶ added in v0.0.24
type WatcherScheduleInfo struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
}
WatcherScheduleInfo represents the schedule configuration
type WatcherStatusInfo ¶ added in v0.0.24
type WatcherStatusInfo struct {
Enabled bool `json:"enabled"`
Initialized bool `json:"initialized"`
WatchDirectory string `json:"watch_directory"`
CheckInterval string `json:"check_interval"`
NextRun string `json:"next_run,omitempty"`
IsWithinSchedule bool `json:"is_within_schedule"`
Schedule *WatcherScheduleInfo `json:"schedule,omitempty"`
Error string `json:"error,omitempty"`
}
WatcherStatusInfo represents the watcher status information
Click to show internal directories.
Click to hide internal directories.