Documentation ¶
Index ¶
- type Application
- func (app *Application) GracefulStop(ctx context.Context) (err error)
- func (app *Application) Job(runner job.Runner) error
- func (app *Application) RegisterHooks(stage hooks.Stage, fns ...func())
- func (app *Application) Run(servers ...server.Server) error
- func (app *Application) Schedule(w worker.Worker) error
- func (app *Application) Serve(s ...server.Server) error
- func (app *Application) SetRegistry(reg registry.Registry)
- func (app *Application) Startup(fns ...func() error) error
- func (app *Application) Stop() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application ...
func New ¶
func New(fns ...func() error) (*Application, error)
New create a new Application instance
func (*Application) GracefulStop ¶
func (app *Application) GracefulStop(ctx context.Context) (err error)
GracefulStop application after necessary cleanup
func (*Application) RegisterHooks ¶
func (app *Application) RegisterHooks(stage hooks.Stage, fns ...func())
RegisterHooks register a stage Hook
func (*Application) Run ¶
func (app *Application) Run(servers ...server.Server) error
Run run application
func (*Application) Serve ¶
func (app *Application) Serve(s ...server.Server) error
Serve start server
func (*Application) SetRegistry ¶
func (app *Application) SetRegistry(reg registry.Registry)
SetRegistry set customize registry Deprecated, please use registry.DefaultRegisterer instead.
func (*Application) Startup ¶
func (app *Application) Startup(fns ...func() error) error
Startup ...
func (*Application) Stop ¶
func (app *Application) Stop() (err error)
Stop application immediately after necessary cleanup
Click to show internal directories.
Click to hide internal directories.