monitor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Path string
	Type EventType
}

type EventType

type EventType int
const (
	Updated EventType = iota
	Deleted
)

type File

type File struct {
	Path   string
	Modify time.Time
}

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func Init

func Init(evCh chan Event, rootPath string, logger *slog.Logger) (*Monitor, error)

func (*Monitor) EvCh

func (m *Monitor) EvCh() chan Event

func (*Monitor) InitialRead

func (m *Monitor) InitialRead(fileCh chan File) error

func (*Monitor) Run

func (m *Monitor) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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