emitEvent is a small convenience method so the caddy core can emit events, if the event app is configured.
(name string, data map[string]any)
| 288 | |
| 289 | // emitEvent is a small convenience method so the caddy core can emit events, if the event app is configured. |
| 290 | func (ctx Context) emitEvent(name string, data map[string]any) Event { |
| 291 | if ctx.cfg == nil || ctx.cfg.eventEmitter == nil { |
| 292 | return Event{} |
| 293 | } |
| 294 | return ctx.cfg.eventEmitter.Emit(ctx, name, data) |
| 295 | } |
| 296 | |
| 297 | // loadModulesFromSomeMap loads modules from val, which must be a type of map[string]any. |
| 298 | // Depending on inlineModuleKey, it will be interpreted as either a ModuleMap (key is the module |
no test coverage detected