listener

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package listener provides an interface to an inotify-based system for watching a directory and its subdirectories for file close and file move events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

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

Listener contains all member variables required for the state of a running file listener.

func Create

func Create(directory filename.System, fileChannel chan<- filename.System) (*Listener, error)

Create and set up an inotify watcher on the directory and its subdirectories. File events will be converted into `tarcache.LocalDataFile` structs and pointers to those structs will sent to the passed-in channel.

func (*Listener) ListenForever

func (l *Listener) ListenForever(ctx context.Context)

ListenForever listens for listen for FS events and sends them along the fileChannel until Stop is called.

Jump to

Keyboard shortcuts

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