feeder

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Path     string
	DirEntry fs.DirEntry
}

type Feeder

type Feeder struct {
	RootDir  string
	Interval time.Duration
	Feed     chan Entry
	Logger   *slog.Logger
}

A Feeder recursively scans a root directory. It looks for files that look like a video and sends those to the Feed channel.

func New

func New(rootDir string, interval time.Duration, logger *slog.Logger) *Feeder

func (Feeder) Run

func (f Feeder) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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