Documentation
¶
Index ¶
- Constants
- func BuildFileKey(hash, schema, path string) string
- type HistoryExistsHook
- type Watchdog
- func (instance *Watchdog) HasHistoryHook() bool
- func (instance *Watchdog) History() *WatchdogHistory
- func (instance *Watchdog) Join()
- func (instance *Watchdog) Map() (response map[string]interface{})
- func (instance *Watchdog) OnFile(callback func(event *gg_events.Event)) *Watchdog
- func (instance *Watchdog) OnNewFile(callback func(event *gg_events.Event)) *Watchdog
- func (instance *Watchdog) Reset() *Watchdog
- func (instance *Watchdog) SetHistoryFileName(value string) *Watchdog
- func (instance *Watchdog) SetHistoryHook(f HistoryExistsHook) *Watchdog
- func (instance *Watchdog) Start() (err error)
- func (instance *Watchdog) Stop()
- func (instance *Watchdog) String() (response string)
- type WatchdogEventData
- func (instance *WatchdogEventData) Base64() (response string)
- func (instance *WatchdogEventData) Content() (response []byte)
- func (instance *WatchdogEventData) Dir() (response string)
- func (instance *WatchdogEventData) Ext() (response string)
- func (instance *WatchdogEventData) Filename() (response string)
- func (instance *WatchdogEventData) Map() (response map[string]interface{})
- func (instance *WatchdogEventData) Name() (response string)
- func (instance *WatchdogEventData) Path() (response string)
- func (instance *WatchdogEventData) Schema() (response string)
- func (instance *WatchdogEventData) Size() (response int64)
- func (instance *WatchdogEventData) Tags() (response []string)
- func (instance *WatchdogEventData) Text() (response string)
- type WatchdogHistory
- func (instance *WatchdogHistory) Add(key string) (success bool)
- func (instance *WatchdogHistory) Assert() (response bool)
- func (instance *WatchdogHistory) Clear()
- func (instance *WatchdogHistory) Delete(key string)
- func (instance *WatchdogHistory) Exists(key string) bool
- func (instance *WatchdogHistory) Get(key string) interface{}
- func (instance *WatchdogHistory) Items() (response map[string]interface{})
- func (instance *WatchdogHistory) Keys() []string
- func (instance *WatchdogHistory) Len() int
- func (instance *WatchdogHistory) Reload() (err error)
- func (instance *WatchdogHistory) Save() (err error)
- func (instance *WatchdogHistory) SetFileName(value string)
- func (instance *WatchdogHistory) Values() []interface{}
- type WatchdogTask
Constants ¶
View Source
const EventOnFile = "on_file"
View Source
const EventOnNewFile = "on_new_file"
Variables ¶
This section is empty.
Functions ¶
func BuildFileKey ¶
Types ¶
type HistoryExistsHook ¶
type Watchdog ¶
type Watchdog struct {
// contains filtered or unexported fields
}
The Watchdog represents a monitoring utility designed to observe and respond to specific system or application conditions. EVENTS: The Watchdog emits 2 events: - on_new_file: each time a NEW file is read from internal daemon - on_file: each time a file is read from internal daemon
func (*Watchdog) HasHistoryHook ¶ added in v0.3.71
func (*Watchdog) History ¶
func (instance *Watchdog) History() *WatchdogHistory
func (*Watchdog) SetHistoryFileName ¶
SetHistoryFileName sets the filename for the internal history management of the Watchdog instance.
func (*Watchdog) SetHistoryHook ¶
func (instance *Watchdog) SetHistoryHook(f HistoryExistsHook) *Watchdog
SetHistoryHook sets a custom function as a hook to validate file unique keys and disables internal history management.
type WatchdogEventData ¶
type WatchdogEventData struct {
Key string
VFS vfscommons.IVfs
VFSUid string
FsElem *gg_vfs.VfsFile
Payload map[string]interface{}
}
func (*WatchdogEventData) Base64 ¶
func (instance *WatchdogEventData) Base64() (response string)
func (*WatchdogEventData) Content ¶
func (instance *WatchdogEventData) Content() (response []byte)
func (*WatchdogEventData) Dir ¶
func (instance *WatchdogEventData) Dir() (response string)
func (*WatchdogEventData) Ext ¶
func (instance *WatchdogEventData) Ext() (response string)
func (*WatchdogEventData) Filename ¶
func (instance *WatchdogEventData) Filename() (response string)
func (*WatchdogEventData) Map ¶
func (instance *WatchdogEventData) Map() (response map[string]interface{})
func (*WatchdogEventData) Name ¶
func (instance *WatchdogEventData) Name() (response string)
func (*WatchdogEventData) Path ¶
func (instance *WatchdogEventData) Path() (response string)
func (*WatchdogEventData) Schema ¶
func (instance *WatchdogEventData) Schema() (response string)
func (*WatchdogEventData) Size ¶
func (instance *WatchdogEventData) Size() (response int64)
func (*WatchdogEventData) Tags ¶
func (instance *WatchdogEventData) Tags() (response []string)
func (*WatchdogEventData) Text ¶
func (instance *WatchdogEventData) Text() (response string)
type WatchdogHistory ¶
type WatchdogHistory struct {
// contains filtered or unexported fields
}
func NewWatchdogHistory ¶
func NewWatchdogHistory(dir string) (instance *WatchdogHistory, err error)
func (*WatchdogHistory) Add ¶
func (instance *WatchdogHistory) Add(key string) (success bool)
func (*WatchdogHistory) Assert ¶
func (instance *WatchdogHistory) Assert() (response bool)
func (*WatchdogHistory) Clear ¶
func (instance *WatchdogHistory) Clear()
func (*WatchdogHistory) Delete ¶
func (instance *WatchdogHistory) Delete(key string)
func (*WatchdogHistory) Exists ¶
func (instance *WatchdogHistory) Exists(key string) bool
func (*WatchdogHistory) Get ¶
func (instance *WatchdogHistory) Get(key string) interface{}
func (*WatchdogHistory) Items ¶
func (instance *WatchdogHistory) Items() (response map[string]interface{})
func (*WatchdogHistory) Keys ¶
func (instance *WatchdogHistory) Keys() []string
func (*WatchdogHistory) Len ¶
func (instance *WatchdogHistory) Len() int
func (*WatchdogHistory) Reload ¶
func (instance *WatchdogHistory) Reload() (err error)
func (*WatchdogHistory) Save ¶
func (instance *WatchdogHistory) Save() (err error)
func (*WatchdogHistory) SetFileName ¶
func (instance *WatchdogHistory) SetFileName(value string)
func (*WatchdogHistory) Values ¶
func (instance *WatchdogHistory) Values() []interface{}
type WatchdogTask ¶
type WatchdogTask struct {
// contains filtered or unexported fields
}
func NewWatchdogTask ¶
func NewWatchdogTask(args ...any) (instance *WatchdogTask, err error)
func (*WatchdogTask) Payload ¶
func (instance *WatchdogTask) Payload() (response map[string]interface{})
func (*WatchdogTask) Start ¶
func (instance *WatchdogTask) Start()
func (*WatchdogTask) Stop ¶
func (instance *WatchdogTask) Stop()
func (*WatchdogTask) String ¶
func (instance *WatchdogTask) String() (response string)
func (*WatchdogTask) Uid ¶
func (instance *WatchdogTask) Uid() (response string)
Click to show internal directories.
Click to hide internal directories.