Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector int
Detector is used to specify how changes to the file should be detected.
const ( // DetectorInvalid indicates an invalid UpdateType. DetectorInvalid Detector = iota // DetectorFSNotify uses filesystem events to wait for changes to the file. DetectorFSNotify // DetectorPoll will re-read the file on an interval to detect changes. DetectorPoll // DetectorDefault holds the default UpdateType. DetectorDefault = DetectorFSNotify )
func (Detector) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Detector) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type FSNotify ¶
type FSNotify struct {
// contains filtered or unexported fields
}
func NewFSNotify ¶
func NewFSNotify(opts FSNotifyOptions) (*FSNotify, error)
newFSNotify creates a new fsnotify detector which uses filesystem events to detect that a file has changed.
type FSNotifyOptions ¶
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
func NewPoller ¶
func NewPoller(opts PollerOptions) *Poller
newPoller creates a new poll-based file update detector.
type PollerOptions ¶
Click to show internal directories.
Click to hide internal directories.