Documentation
¶
Overview ¶
Package hooks runs the optional commands associated with a rule's create/delete lifecycle events. Commands are executed through "sh -c", so they support arguments, pipes and shell expansion. The rule's fields are injected as FWDCTL_* environment variables on top of fwdctl's own environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run executes command through "sh -c", inheriting fwdctl's stdout/stderr. The given env entries (KEY=VALUE) are appended to fwdctl's environment. An empty command is a no-op and returns nil. A non-nil error is returned only when the command was run and exited non-zero.
func RunOnCreate ¶
RunOnCreate runs the rule's on-create hook, if any.
func RunOnDelete ¶
RunOnDelete runs the rule's on-delete hook, if any.
Types ¶
This section is empty.