hooks

package
v3.25.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	/* Run this before getLinuxConfig() in case this is a script
	 * that's responsible for creating the interface */
	BEFORE_IF_READ = "BEFORE_IF_READ" // InitScriptTemplate
	/* Bash script template run just after getting config
	   from $CALICOVPP_INTERFACE & before starting VPP */
	BEFORE_VPP_RUN = "BEFORE_VPP_RUN" // InitPostIfScriptTemplate
	/* Bash script template run after VPP has started */
	VPP_RUNNING = "VPP_RUNNING" // FinalizeScriptTemplate
	/* Bash script template run when VPP stops gracefully */
	VPP_DONE_OK = "VPP_DONE_OK"
	/* Bash script template run when VPP stops with an error */
	VPP_ERRORED = "VPP_ERRORED"
)

Variables

View Source
var (
	AllHooks = []string{BEFORE_IF_READ, BEFORE_VPP_RUN, VPP_RUNNING, VPP_DONE_OK, VPP_ERRORED}

	//go:embed network_restart.sh
	DEFAULT_RESTART_SCRIPT string
)

Functions

func HookCount

func HookCount(name string) int

func RegisterBashHook

func RegisterBashHook(name string, bashTemplate string)

func RegisterHook

func RegisterHook(name string, hook func(params *config.VppManagerParams, conf []*config.LinuxInterfaceState) error)

func RunHook

func RunHook(name string, params *config.VppManagerParams, conf []*config.LinuxInterfaceState)

Types

This section is empty.

Jump to

Keyboard shortcuts

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