Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPanic is an error thrown when a panic is received. ErrPanic = xerrors.New("global panic") // ErrUnknownPanic is an error thrown when a panic of an unknown type is received. ErrUnknownPanic = ErrPanic.WithMessage("unknown panic") )
Functions ¶
func ErrorRecoveryOnStop ¶
ErrorRecoveryOnStop returns an error after panic recovery.
Types ¶
type Driver ¶
type Driver interface {
// RunApplication launches the application.
RunApplication(ctx context.Context, app componego.Application, appMode componego.ApplicationMode) (int, error)
// CreateEnvironment creates a new environment for the application.
CreateEnvironment(ctx context.Context, app componego.Application, appMode componego.ApplicationMode) (componego.Environment, error)
}
Driver is an interface that describes the driver for starting and controlling the application.
type Options ¶
type Options struct {
ConfigProviderFactory func() (componego.ConfigProvider, initializer)
ComponentProviderFactory func() (componego.ComponentProvider, initializer)
DependencyInvokerFactory func() (componego.DependencyInvoker, initializer)
EnvironmentFactory func(
context context.Context,
application componego.Application,
applicationIO componego.ApplicationIO,
applicationMode componego.ApplicationMode,
configProvider componego.ConfigProvider,
componentProvider componego.ComponentProvider,
dependencyInvoker componego.DependencyInvoker,
) componego.Environment
AppIO componego.ApplicationIO
Additional any
}
Click to show internal directories.
Click to hide internal directories.