Documentation
¶
Index ¶
- func DefaultContext() context.Context
- func DefaultInjector() do.Injector
- func Invoke[T any](app *App) (T, error)
- func InvokeDefault[T any]() (T, error)
- func MustInvoke[T any](app *App) T
- func MustInvokeDefault[T any]() T
- func Provide[T any](app *App, constructor func(*App) (T, error))
- func ProvideDefault[T any](constructor func(*App) (T, error))
- func ProvideDefaultValue[T any](value T)
- func ProvideValue[T any](app *App, value T)
- func Run(ctx context.Context) error
- type App
- func (app *App) App() any
- func (app *App) AppPath(paths ...string) string
- func (app *App) BasePath(paths ...string) string
- func (app *App) Command(commands ...runacommand.Command) *App
- func (app *App) ConfigPath(paths ...string) string
- func (app *App) Context() context.Context
- func (app *App) DataPath(paths ...string) string
- func (app *App) Env() string
- func (app *App) Execute(ctx context.Context, args []string) error
- func (app *App) Freeze(ctx context.Context) error
- func (app *App) Host(units ...host.Unit) *App
- func (app *App) HostInfo() []host.Info
- func (app *App) HostStatus(name string) host.Status
- func (app *App) Injector() do.Injector
- func (app *App) Inspect() InspectInfo
- func (app *App) Install(providers ...runaprovider.Provider) *App
- func (app *App) Module(modules ...Module) *App
- func (app *App) ModuleInfo() []ModuleInfo
- func (app *App) PublicPath(paths ...string) string
- func (app *App) RegisterCommand(commands ...runacommand.Command) error
- func (app *App) RegisterHost(units ...host.Unit) error
- func (app *App) RegisterModule(modules ...any) error
- func (app *App) RegisterRouteService(services ...any) error
- func (app *App) RegisterService(services ...any) error
- func (app *App) Run(ctx context.Context) error
- func (app *App) Service(services ...Service) *App
- func (app *App) SetContext(ctx context.Context) *App
- func (app *App) Shutdown(ctx context.Context) error
- func (app *App) Timezone() string
- type InspectInfo
- type Module
- type ModuleBase
- type ModuleDepends
- type ModuleInfo
- type Option
- type Service
- type ServiceBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultContext ¶
DefaultContext returns Runa's fallback root context.
func DefaultInjector ¶
DefaultInjector returns the default application DI container.
func InvokeDefault ¶
InvokeDefault returns a dependency from the default container.
func MustInvokeDefault ¶
func MustInvokeDefault[T any]() T
MustInvokeDefault returns a dependency from the default container or panics.
func ProvideDefault ¶
ProvideDefault registers a lazy dependency constructor on the default container.
func ProvideDefaultValue ¶
func ProvideDefaultValue[T any](value T)
ProvideDefaultValue registers an eager dependency value on the default container.
func ProvideValue ¶
ProvideValue registers an eager dependency value.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the Runa application runtime facade.
func SetDefault ¶
SetDefault sets the process-wide default application.
func (*App) Command ¶
func (app *App) Command(commands ...runacommand.Command) *App
Command registers application commands.
func (*App) ConfigPath ¶
ConfigPath returns the application config path joined with optional segments.
func (*App) HostStatus ¶
HostStatus returns a host unit status by name.
func (*App) Inspect ¶
func (app *App) Inspect() InspectInfo
func (*App) Install ¶
func (app *App) Install(providers ...runaprovider.Provider) *App
Install installs providers.
func (*App) ModuleInfo ¶
func (app *App) ModuleInfo() []ModuleInfo
ModuleInfo returns module registration information.
func (*App) PublicPath ¶
PublicPath returns the application public path joined with optional segments.
func (*App) RegisterCommand ¶
func (app *App) RegisterCommand(commands ...runacommand.Command) error
RegisterCommand registers commands from provider implementations.
func (*App) RegisterHost ¶
RegisterHost registers host units from provider implementations.
func (*App) RegisterModule ¶
RegisterModule registers modules from provider implementations.
func (*App) RegisterRouteService ¶
RegisterRouteService broadcasts app-scoped services to transport providers that opt into route-style service binding.
func (*App) RegisterService ¶
RegisterService registers services from provider implementations.
func (*App) SetContext ¶
SetContext sets the application runtime context.
type InspectInfo ¶
type ModuleBase ¶
type ModuleBase = runaprovider.ModuleBase
ModuleBase provides no-op lifecycle methods for modules.
type ModuleDepends ¶
type ModuleDepends = runaprovider.ModuleDepends
ModuleDepends lets a module declare hard dependencies by module name.
type ModuleInfo ¶
ModuleInfo stores module registration status.
type Service ¶
type Service = runaprovider.Service
Service is a framework or infrastructure capability with lifecycle hooks.
type ServiceBase ¶
type ServiceBase = runaprovider.ServiceBase
ServiceBase provides no-op lifecycle methods for services.