MCPcopy
hub / github.com/caddyserver/caddy / App

Struct App

modules/caddyevents/app.go:72–83  ·  view source on GitHub ↗

App implements a global eventing system within Caddy. Modules can emit and subscribe to events, providing hooks into deep parts of the code base that aren't otherwise accessible. Events provide information about what and when things are happening, and this facility allows handlers to take action whe

Source from the content-addressed store, hash-verified

70// The entirety of this app module is EXPERIMENTAL and
71// subject to change. Pay attention to release notes.
72type App struct {
73 // Subscriptions bind handlers to one or more events
74 // either globally or scoped to specific modules or module
75 // namespaces.
76 Subscriptions []*Subscription `json:"subscriptions,omitempty"`
77
78 // Map of event name to map of module ID/namespace to handlers
79 subscriptions map[string]map[caddy.ModuleID][]Handler
80
81 logger *zap.Logger
82 started bool
83}
84
85// Subscription represents binding of one or more handlers to
86// one or more events.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected