hooks

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: GPL-3.0 Imports: 1 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHook

func AddHook(eventName Event, f func())

AddHook installs the hook to be executed when certain event occurs.

func RunHooks

func RunHooks(eventName Event)

RunHooks runs the hooks installed for the specified eventName in the reverse order.

Types

type Event

type Event int
const (
	// EventShutdown is triggered when the server process is about to stop.
	EventShutdown Event = iota

	// EventReload is triggered when the server process receives the SIGUSR2
	// signal (on POSIX platforms) and indicates the request to reload the
	// server configuration from persistent storage.
	//
	// Since it is by design problematic to reload the modules configuration,
	// this event only applies to secondary files such as aliases mapping and
	// TLS certificates.
	EventReload

	// EventLogRotate is triggered when the server process receives the SIGUSR1
	// signal (on POSIX platforms) and indicates the request to reopen used log
	// files since they might have rotated.
	EventLogRotate
)

Jump to

Keyboard shortcuts

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