-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdi.go
More file actions
26 lines (19 loc) · 744 Bytes
/
di.go
File metadata and controls
26 lines (19 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package forge
import (
"github.com/xraph/vessel"
)
// Container provides dependency injection with lifecycle management.
type Container = vessel.Vessel
// ProvideOption is an alias for vessel.ConstructorOption, used to configure options for constructing objects.
type ProvideOption = vessel.ConstructorOption
// DIScope represents a lifetime scope for scoped services in the DI container.
// Typically used for HTTP requests or other bounded operations.
type DIScope = vessel.Scope
// Factory creates a service instance.
type Factory = vessel.Factory
// ServiceInfo contains diagnostic information.
type ServiceInfo = vessel.ServiceInfo
// NewContainer creates a new DI container.
func NewContainer() Container {
return vessel.New()
}