hooks

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 1 Imported by: 1

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