Documentation ¶
Index ¶
- Constants
- Variables
- type FileMonitor
- type FileMonitorSettings
- type TickStatus
- type TickStatusOptions
- type Ticker
- func (instance *Ticker) IsPaused() bool
- func (instance *Ticker) IsRunning() bool
- func (instance *Ticker) Join()
- func (instance *Ticker) Lock()
- func (instance *Ticker) Pause()
- func (instance *Ticker) Resume()
- func (instance *Ticker) Start()
- func (instance *Ticker) Stop()
- func (instance *Ticker) Unlock()
- type TickerCallback
Constants ¶
View Source
const FileMonitorErrorEventName = "on_file_match_error"
View Source
const FileMonitorEventName = "on_file_match"
Variables ¶
View Source
var TickStatusRegistry *tickStatusRegistry
Functions ¶
This section is empty.
Types ¶
type FileMonitor ¶
type FileMonitor struct {
// contains filtered or unexported fields
}
func NewFileMonitor ¶
func NewFileMonitor(settings *FileMonitorSettings, events *gg_events.Emitter) *FileMonitor
func (*FileMonitor) Events ¶
func (instance *FileMonitor) Events() *gg_events.Emitter
func (*FileMonitor) Start ¶
func (instance *FileMonitor) Start()
func (*FileMonitor) Stop ¶
func (instance *FileMonitor) Stop()
type FileMonitorSettings ¶
type FileMonitorSettings struct { Dirs []string `json:"dirs"` // directories to monitor for file IncludeSubFolders bool `json:"include_sub_folders"` FilePattern string `json:"pattern"` // file name or file pattern i.e. "*.xml" TriggerEventName string `json:"trigger-event-name"` TriggerErrorEventName string `json:"trigger-error-event-name"` CheckIntervalMs int `json:"check-interval-ms"` DeleteAfterMatch bool `json:"delete-after-match"` MoveAfterMatchDir string `json:"move-after-match-dir"` }
type TickStatus ¶ added in v0.2.72
type TickStatus struct { RegistryKey string // contains filtered or unexported fields }
TickStatus write info file every x time Useful to write a file to notify that application is alive
func NewTickStatus ¶ added in v0.2.72
func NewTickStatus(args ...interface{}) (instance *TickStatus, err error)
func (*TickStatus) Options ¶ added in v0.2.72
func (instance *TickStatus) Options() *TickStatusOptions
func (*TickStatus) Start ¶ added in v0.2.72
func (instance *TickStatus) Start()
func (*TickStatus) Stop ¶ added in v0.2.72
func (instance *TickStatus) Stop()
func (*TickStatus) Write ¶ added in v0.2.72
func (instance *TickStatus) Write(args ...interface{})
Write a string or a map into file
type TickStatusOptions ¶ added in v0.2.72
type TickStatusOptions struct { Uid string `json:"uid"` Enabled bool `json:"enabled"` Dir string `json:"dir-root"` FileName string `json:"filename"` // name of info file IntervalSeconds int `json:"interval-seconds"` AddToRegistry bool `json:"add-to-registry"` CleanOnStart bool `json:"clean-on-start"` }
func (*TickStatusOptions) String ¶ added in v0.2.72
func (instance *TickStatusOptions) String() string
type Ticker ¶
type Ticker struct {
// contains filtered or unexported fields
}
type TickerCallback ¶
type TickerCallback func(*Ticker)
Click to show internal directories.
Click to hide internal directories.