Documentation ¶
Index ¶
Constants ¶
View Source
const ( Create = 1 Modify = 2 Remove = 3 Rename = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirEvent ¶
Dir event leaves the consumer with rescanning given directories for the actual changes, cross platform changes on the file level cannot be guaranteed
type Error ¶
A Generic interface that represents a significant named error in time with a human readable description
type GenericError ¶
type GenericError struct {
// contains filtered or unexported fields
}
Unspecified generic error
func (*GenericError) Describe ¶
func (e *GenericError) Describe() string
func (*GenericError) Error ¶
func (e *GenericError) Error() error
type MonitorError ¶
type MonitorError struct {
// contains filtered or unexported fields
}
Errors emitted by the monitor concrete implementation
func NewMonitorError ¶
func NewMonitorError(err error, ctx string) *MonitorError
func (*MonitorError) Describe ¶
func (e *MonitorError) Describe() string
func (*MonitorError) Error ¶
func (e *MonitorError) Error() error
func (*MonitorError) Time ¶
func (e *MonitorError) Time() time.Time
type MonitorEvent ¶
type MonitorEvent struct {
// contains filtered or unexported fields
}
Events emitted by the monitor concrete implementation
func NewMonitorEvent ¶
func NewMonitorEvent(root, dir, file string, ops []int) *MonitorEvent
func (*MonitorEvent) Describe ¶
func (e *MonitorEvent) Describe() string
func (*MonitorEvent) Directory ¶
func (e *MonitorEvent) Directory() string
func (*MonitorEvent) Name ¶
func (e *MonitorEvent) Name() string
func (*MonitorEvent) Operations ¶
func (e *MonitorEvent) Operations() []int
func (*MonitorEvent) Time ¶
func (e *MonitorEvent) Time() time.Time
type Watcher ¶
type Watcher interface { Events() chan DirEvent Errors() chan Error // // Start watching the provided directory // Start() error // // return the (root) directory we are watching // Directory() string // // Stop watching the directory // Stop() error }
Watcher interface specifies an watcher that returns a channel of watching events when started
Click to show internal directories.
Click to hide internal directories.