Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(ipt *iptables.IPTablesInstance, rulesFile string, continueOnHookFail bool) int
Start run fwdctl in daemon mode The flow has the following steps: - Open the rules file - Create all the defined forwards (running their on-create hooks) - Start listening on rules file changes - When file changes:
- Calculate the Diff between old and new ruleset
- Delete unwanted forwards (running their on-delete hooks)
- Create wanted forwards (running their on-create hooks)
- Listen for SIGTERM signals to gracefuly shutdown - When SIGTERM signal occurs:
- Delete all the applied forwards (running their on-delete hooks)
- Shutdown the daemon
When a hook fails and continueOnHookFail is false, the daemon logs the error, tears down its forwards and exits non-zero. When it is true, the failure is only logged and the daemon keeps running.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.