Documentation
¶
Index ¶
- type App
- 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) 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) 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
- 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) 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) RegisterHTTP ¶
RegisterHTTP registers a struct-tagged HTTP handler.
Click to show internal directories.
Click to hide internal directories.