daemon

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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.

func Stop

func Stop()

Stop send a SIGTERM signal to the daemon process

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL