app

package
v3.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	HideBanner bool
	// contains filtered or unexported fields
}

Application ...

func DefaultApp

func DefaultApp() *Application

DefaultApp ...

func New

func New(fns ...func() error) (*Application, error)

New create a new Application instance

func (*Application) Executor added in v3.2.29

func (app *Application) Executor(e executor.Executor)

Executor ...

func (*Application) GracefulStop

func (app *Application) GracefulStop(ctx context.Context) (err error)

GracefulStop application after necessary cleanup

func (*Application) Job

func (app *Application) Job(runner job.Runner) error

Job ..

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) Schedule

func (app *Application) Schedule(w worker.Worker) error

Schedule ..

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

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

func (*Application) WithOptions added in v3.2.29

func (a *Application) WithOptions(options ...Option)

type Disable added in v3.2.29

type Disable int
const (
	DisableParserFlag      Disable = 1
	DisableLoadConfig      Disable = 2
	DisableDefaultGovernor Disable = 3
)

type Option added in v3.2.29

type Option func(a *Application)

func WithDisable added in v3.2.29

func WithDisable(d Disable) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL