Documentation
¶
Overview ¶
Package embark provides a lightweight dependency injection framework for Go applications. It simplifies managing dependencies, offering a straightforward API and flexibility for various use cases from simple to complex scenarios.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container holds the dependency injection container's state and provides methods to register and resolve dependencies.
func Done ¶
Done is expected to be called after registration of dependency injected components during program startup. OnInit and OnPostInit callbacks of registered components will be invoked as a result. Once the Init and PostInit phase is completed, Done will return with any resulting errors.
func (*Container) HealthCheck ¶
type Filter ¶
Filter can be provided in query functions to filter out multiple components that match the type query.
type HealthCheckHandler ¶
type HealthCheckHandler interface {
HealthCheck() error
}
type OnInitHandler ¶
type PostInitHandler ¶
type Query ¶
type Query[T any] struct { // contains filtered or unexported fields }
Query is used to query the Container for components.
type ShutdownFunc ¶
type ShutdownHandler ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
|
|
|
lifecycle
command
|
|
|
named-components
command
|
|
|
query-all
command
|
|
|
query-filters
command
|
|
|
simple-service
command
|
|
|
values
command
|