Documentation
¶
Index ¶
- Constants
- func ConfigurationSchema() (spiceconfig.Schema, error)
- func Main(arguments []string) int
- func RunCommand(options CommandOptions) int
- type Application
- func (application *Application) Components() Components
- func (application *Application) RegisterObserver(observer spicelifecycle.Observer) error
- func (application *Application) Run(ctx context.Context, shutdown spicelifecycle.ContextFactory) error
- func (application *Application) ShutdownTimeout() time.Duration
- func (application *Application) Start(ctx context.Context) error
- func (application *Application) State() spicelifecycle.State
- func (application *Application) Stop(ctx context.Context) error
- type ApplicationOptions
- type BeanOverrideLayer
- type BeanOverrides
- type CommandOptions
- type Components
- type ShutdownContextFactory
Constants ¶
View Source
const ( ExitSuccess = 0 ExitFailure = 1 ExitUsage = 2 )
View Source
const TargetID = spiceComposition.ApplicationTargetExtensionProof_7fb4b565
Variables ¶
This section is empty.
Functions ¶
func ConfigurationSchema ¶
func ConfigurationSchema() (spiceconfig.Schema, error)
func RunCommand ¶
func RunCommand(options CommandOptions) int
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(ctx context.Context, observers ...spicelifecycle.Observer) (*Application, error)
func NewApplicationWithOptions ¶
func NewApplicationWithOptions(ctx context.Context, options ApplicationOptions) (*Application, error)
func (*Application) Components ¶
func (application *Application) Components() Components
Components returns a typed snapshot of constructed singleton beans.
func (*Application) RegisterObserver ¶
func (application *Application) RegisterObserver(observer spicelifecycle.Observer) error
func (*Application) Run ¶
func (application *Application) Run(ctx context.Context, shutdown spicelifecycle.ContextFactory) error
func (*Application) ShutdownTimeout ¶
func (application *Application) ShutdownTimeout() time.Duration
func (*Application) State ¶
func (application *Application) State() spicelifecycle.State
type ApplicationOptions ¶
type ApplicationOptions struct {
Overrides BeanOverrides
Profiles []string
Sources []spiceconfig.Source
AllowUnknownConfiguration bool
Observers []spicelifecycle.Observer
}
type BeanOverrideLayer ¶
type BeanOverrideLayer struct {
Name string
Overrides BeanOverrides
}
BeanOverrideLayer is one named immutable override composition layer. Layers are applied in order; a later layer deliberately replaces an earlier value.
type BeanOverrides ¶
type BeanOverrides struct {
// Provider0 replaces bean "integer.stats".
Provider0 spicebean.Override[tool.Tool]
// Proof replaces bean "proof".
Proof spicebean.Override[*composition.Proof]
}
BeanOverrides provides compile-time-typed singleton replacements. Replacements use the normal generated cleanup and rollback path.
func ComposeBeanOverrides ¶
func ComposeBeanOverrides(layers ...BeanOverrideLayer) (BeanOverrides, error)
ComposeBeanOverrides validates and deterministically composes named layers. It never mutates a running application or performs runtime bean lookup.
type CommandOptions ¶
type Components ¶
type Components struct {
// Provider0 is bean "integer.stats".
Provider0 tool.Tool
// Proof is bean "proof".
Proof *composition.Proof
}
Components is a typed snapshot of constructed singleton beans. It performs no reflection or string-based lookup.
type ShutdownContextFactory ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.