Documentation
¶
Index ¶
- type App
- func (a *App) Actions() []string
- func (a *App) Build() (*di.Container, error)
- func (a *App) Configure(fn func(*srv.Server)) *App
- func (a *App) Dispatch(ctx context.Context, name string, payload ...any) (any, error)
- func (a *App) DispatchKey(ctx context.Context, key string, payload ...any) (any, error)
- func (a *App) KeyBindings() map[string]string
- func (a *App) Listen(addr string) error
- func (a *App) Log(logger *slog.Logger) *App
- func (a *App) Provide(name string, instance any) *App
- func (a *App) RegisterAction(name string, handler func(ctx context.Context, payload ...any) (any, error)) *App
- func (a *App) RegisterActionHandler(h actions.Handler) *App
- func (a *App) RegisterHTTP(h Handler) *App
- func (a *App) Schedule(name, cronExpr string, handler func(ctx context.Context) error) *App
- func (a *App) Use(mw srv.Middleware) *App
- func (a *App) UseActionEvents(bus *events.Bus) *App
- func (a *App) UseAsyncActionEvents(bus *events.Bus) *App
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App orchestrates DI, HTTP, dispatching, and scheduling into a single entrypoint.
func (*App) DispatchKey ¶ added in v1.2.0
DispatchKey calls a struct-tagged action handler by key binding.
func (*App) KeyBindings ¶ added in v1.2.0
KeyBindings returns struct-tagged action key bindings.
func (*App) RegisterAction ¶
func (a *App) RegisterAction(name string, handler func(ctx context.Context, payload ...any) (any, error)) *App
RegisterAction registers a named action handler for dispatch.
func (*App) RegisterActionHandler ¶ added in v1.2.0
RegisterActionHandler registers a struct-tagged action handler.
func (*App) RegisterHTTP ¶
RegisterHTTP registers a struct-tagged HTTP handler.
func (*App) UseActionEvents ¶ added in v1.2.0
UseActionEvents emits action instances after dispatch.
Click to show internal directories.
Click to hide internal directories.