{"modulePath":"github.com/foxcpp/maddy","version":"v0.9.8","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package hooks\n\n## Functions\n\n```go\nfunc AddHook(eventName Event, f func())\n```\nAddHook installs the hook to be executed when certain event occurs.\n\n```go\nfunc RunHooks(eventName Event)\n```\nRunHooks runs the hooks installed for the specified eventName in the reverse order.\n\n## Types\n\n```go\ntype Event int\n```\n\n```go\nconst (\n\t// EventShutdown is triggered when the server process is about to stop.\n\tEventShutdown Event = iota\n\n\t// EventReload is triggered when the server process receives the SIGUSR2\n\t// signal (on POSIX platforms) and indicates the request to reload the\n\t// server configuration from persistent storage.\n\t//\n\t// Since it is by design problematic to reload the modules configuration,\n\t// this event only applies to secondary files such as aliases mapping and\n\t// TLS certificates.\n\tEventReload\n\n\t// EventLogRotate is triggered when the server process receives the SIGUSR1\n\t// signal (on POSIX platforms) and indicates the request to reopen used log\n\t// files since they might have rotated.\n\tEventLogRotate\n)\n```\n\n","path":"github.com/foxcpp/maddy/framework/hooks","name":"hooks","synopsis":"","isRedistributable":true}
