Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventHandler ¶
type EventHandler struct {
Notify bool `mapstructure:"notify"`
Actions []ExecuteAction `mapstructure:"actions"`
}
func (EventHandler) Validate ¶
func (e EventHandler) Validate() error
type Events ¶
type Events struct {
// OnChange event handler, information about what to do when the address updates
OnChange *EventHandler `mapstructure:"on_change"` // ! nil if it does not exist
// OnMatch event handler, information about what to do when the address matches the previous
OnMatch *EventHandler `mapstructure:"on_match"`
// OnError event handler, information about what to do when an error occurs
OnError *EventHandler `mapstructure:"on_error"`
}
type ExecuteAction ¶
type ExecuteAction struct {
Type string `mapstructure:"type"`
Bin string `mapstructure:"bin"`
Args string `mapstructure:"args"`
TTL int `mapstructure:"ttl"`
}
func (ExecuteAction) CheckInstalled ¶
func (s ExecuteAction) CheckInstalled() bool
func (ExecuteAction) Command ¶
func (s ExecuteAction) Command(ttl time.Duration) (*exec.Cmd, context.Context, context.CancelFunc)
func (ExecuteAction) String ¶
func (s ExecuteAction) String() string
func (ExecuteAction) Validate ¶
func (s ExecuteAction) Validate() error
Click to show internal directories.
Click to hide internal directories.