Documentation ¶
Index ¶
- func AnyFilter(filters []FilterEvent, event fsnotify.Event) bool
- func FilterEverything(_ fsnotify.Event) bool
- func FilterNothing(_ fsnotify.Event) bool
- type Event
- type EventSource
- type FilterEvent
- type UnlimitedEventSource
- func (es *UnlimitedEventSource) AddFile(notifyFilePath string) error
- func (es *UnlimitedEventSource) Close()
- func (es *UnlimitedEventSource) Events() <-chan Event
- func (es *UnlimitedEventSource) Run()
- func (es *UnlimitedEventSource) SetInterval(interval time.Duration) error
- func (es *UnlimitedEventSource) Stop()
- func (es *UnlimitedEventSource) Wait()
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 FilterNothing ¶
Types ¶
type EventSource ¶ added in v0.4.0
type EventSource interface { Events() <-chan Event Close() Wait() Stop() Run() }
type FilterEvent ¶
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
Click to show internal directories.
Click to hide internal directories.