notification

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyFilter added in v0.4.0

func AnyFilter(filters []FilterEvent, event fsnotify.Event) bool

AnyFilter is a cumulative filter which returns true (hence passes) only ifat least one of the provided filters pass.

func FilterEverything

func FilterEverything(_ fsnotify.Event) bool

func FilterNothing

func FilterNothing(_ fsnotify.Event) bool

Types

type Event added in v0.4.0

type Event struct {
	Timestamp     time.Time
	TimerInterval time.Duration
}

func (Event) IsTimer added in v0.6.1

func (ev Event) IsTimer() bool

type EventSource added in v0.4.0

type EventSource interface {
	Events() <-chan Event
	Close()
	Wait()
	Stop()
	Run()
}

type FilterEvent

type FilterEvent func(event fsnotify.Event) bool

FilterEvent returns true if the given event is relevant and should be handled

type UnlimitedEventSource added in v0.4.1

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

func NewUnlimitedEventSource added in v0.4.0

func NewUnlimitedEventSource() (*UnlimitedEventSource, error)

func (*UnlimitedEventSource) AddFile added in v0.4.1

func (es *UnlimitedEventSource) AddFile(notifyFilePath string) error

func (*UnlimitedEventSource) Close added in v0.4.1

func (es *UnlimitedEventSource) Close()

func (*UnlimitedEventSource) Events added in v0.4.1

func (es *UnlimitedEventSource) Events() <-chan Event

func (*UnlimitedEventSource) Run added in v0.4.1

func (es *UnlimitedEventSource) Run()

func (*UnlimitedEventSource) SetInterval added in v0.10.0

func (es *UnlimitedEventSource) SetInterval(interval time.Duration) error

func (*UnlimitedEventSource) Stop added in v0.4.1

func (es *UnlimitedEventSource) Stop()

func (*UnlimitedEventSource) Wait added in v0.4.1

func (es *UnlimitedEventSource) Wait()

Wait stops the caller until the EventSource is exhausted

Jump to

Keyboard shortcuts

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