github.com/caddyserver/caddy/v2/modules/caddyevents/eventsconfig
Package eventsconfig is for configuring caddyevents.App with the Caddyfile. This code can't be in the caddyevents package because the httpcaddyfile package imports caddyhttp, which imports caddyevents: hence, it creates an import cycle.
Package
Files: 1. Third party imports: 0. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Private functions
func init
init ()
References: httpcaddyfile.RegisterGlobalOption.
func parseApp
parseApp configures the "events" global option from Caddyfile to set up the events app. Syntax:
events {
on <event> <handler_module...>
}
If <event> is *, then it will bind to all events.
parseApp (d *caddyfile.Dispenser, _ any) (any, error)
References: caddyconfig.JSON, caddyconfig.JSONModuleObject, caddyevents.App, caddyevents.Subscription, caddyfile.UnmarshalModule, httpcaddyfile.App, json.RawMessage.