add Module.Lifecycle getter method
This commit is contained in:
@@ -53,6 +53,12 @@ func NewModule(name string, opts ModuleOpts) *Module {
|
||||
}
|
||||
}
|
||||
|
||||
// Lifecycle returns the lifecycle this module belongs to. If the module is not
|
||||
// part of a lifecycle, it will return nil.
|
||||
func (s *Module) Lifecycle() *Lifecycle {
|
||||
return s.lifecycle
|
||||
}
|
||||
|
||||
// Logger returns the logger for the module. Uses the lifecycle's logger unless
|
||||
// a specific logger has been set during module load.
|
||||
func (s *Module) Logger() *slog.Logger {
|
||||
|
||||
Reference in New Issue
Block a user