watcher

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpRLimitSoftToHardLimit

func BumpRLimitSoftToHardLimit()

BumpRLimitSoftToHardLimit bumps the soft limit of the rlimit to the hard limit.

To go higher the user will need to update their kernel settings which can be viewed:

sysctl -a | grep kern.maxfile

func IgnoreFolder

func IgnoreFolder(folder string) bool

IgnoreFolder returns true for folders we don't want to watch certain folders as they'll never impact an Encore app, and they cause an extreme amount of noise.

Types

type Event

type Event struct {
	EventType EventType
	Path      string
	Info      os.FileInfo
}

type EventType

type EventType = string
const (
	CREATED  EventType = "Created"
	MODIFIED EventType = "Modified"
	DELETED  EventType = "Deleted"
)

type Events

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

func (*Events) Events

func (e *Events) Events() []Event

type Watcher

type Watcher struct {
	EventsReady chan struct{}
	// contains filtered or unexported fields
}

func New

func New(appID string) (*Watcher, error)

func (*Watcher) Close

func (w *Watcher) Close() error

func (*Watcher) Done added in v1.29.4

func (w *Watcher) Done() <-chan struct{}

func (*Watcher) GetEventsBatch

func (w *Watcher) GetEventsBatch() *Events

func (*Watcher) RecursivelyWatch

func (w *Watcher) RecursivelyWatch(folder string) error

Jump to

Keyboard shortcuts

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