feat(01-02): dispatch typed events with request context
- App-owned festival bus with Fire, Collect and UntilHandled - Recover listener panics with owner plugin IDs; isolate buses per app - towel context accessors and hello command demo of all three modes
This commit is contained in:
@@ -5,12 +5,14 @@ import (
|
||||
"sync"
|
||||
|
||||
"git.golem15.com/golem15/summercms/compass"
|
||||
"git.golem15.com/golem15/summercms/festival"
|
||||
)
|
||||
|
||||
// App is the per-instance application container. It must not import party.
|
||||
type App struct {
|
||||
Config *compass.Config
|
||||
Services *Registry
|
||||
Events *festival.Bus
|
||||
|
||||
mu sync.RWMutex
|
||||
plugins map[string]struct{}
|
||||
@@ -21,6 +23,7 @@ func New(cfg *compass.Config) *App {
|
||||
return &App{
|
||||
Config: cfg,
|
||||
Services: NewRegistry(),
|
||||
Events: festival.New(),
|
||||
plugins: make(map[string]struct{}),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user