watcher

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessorInterface added in v0.0.6

type ProcessorInterface interface {
	IsPathBeingProcessed(path string) bool
}

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

func (w *Watcher) ClearQueue() error

ClearQueue removes all completed and failed items from the queue via queue

func (*Watcher) Close

func (w *Watcher) Close() error

Close does nothing for the simple watcher (queue is managed separately)

func (*Watcher) GetQueueItems added in v0.0.6

func (w *Watcher) GetQueueItems() ([]queue.QueueItem, error)

GetQueueItems returns queue items via the queue

func (*Watcher) GetQueueStats added in v0.0.6

func (w *Watcher) GetQueueStats() (map[string]interface{}, error)

GetQueueStats returns statistics about the queue via queue

func (*Watcher) RemoveFromQueue added in v0.0.6

func (w *Watcher) RemoveFromQueue(id string) error

RemoveFromQueue removes an item from the queue via queue

func (*Watcher) Start

func (w *Watcher) Start(ctx context.Context) error

func (*Watcher) TriggerScan added in v0.0.6

func (w *Watcher) TriggerScan(ctx context.Context)

TriggerScan triggers an immediate directory scan

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL