Documentation
¶
Index ¶
- func LoadConfig[C any]() func(*BootEvent) error
- func Options(options ...fx.Option) func(*BootEvent) error
- func Restart() error
- type App
- type BaseApp
- func (app *BaseApp) Boot(ctx context.Context) error
- func (app *BaseApp) LoadConfig(outs ...any) error
- func (app *BaseApp) Name() string
- func (app *BaseApp) OnBoot() *hook.Hook[*BootEvent]
- func (app *BaseApp) OnStart() *hook.Hook[*StartEvent]
- func (app *BaseApp) OnStop() *hook.Hook[*StopEvent]
- func (app *BaseApp) Restart(ctx context.Context) error
- func (app *BaseApp) Run(ctx context.Context) error
- func (app *BaseApp) Start(ctx context.Context) error
- func (app *BaseApp) StartTimeout() time.Duration
- func (app *BaseApp) Stop(ctx context.Context) error
- func (app *BaseApp) StopTimeout() time.Duration
- func (app *BaseApp) Version() string
- type BootEvent
- type Config
- type StartEvent
- type StopEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Types ¶
type App ¶
type App interface {
Name() string
Version() string
LoadConfig(outs ...any) error
OnBoot() *hook.Hook[*BootEvent]
Boot(ctx context.Context) error
StartTimeout() time.Duration
OnStart() *hook.Hook[*StartEvent]
Start(ctx context.Context) error
StopTimeout() time.Duration
OnStop() *hook.Hook[*StopEvent]
Stop(ctx context.Context) error
Restart(ctx context.Context) error
Run(ctx context.Context) error
}
type BaseApp ¶
type BaseApp struct {
// contains filtered or unexported fields
}
func NewBaseApp ¶
func (*BaseApp) LoadConfig ¶
func (*BaseApp) StartTimeout ¶
func (*BaseApp) StopTimeout ¶
Click to show internal directories.
Click to hide internal directories.