add module loaded state
This commit is contained in:
@@ -13,6 +13,7 @@ type Module struct {
|
||||
setup setupFn
|
||||
teardown teardownFn
|
||||
depends []string
|
||||
loaded bool // loaded indicates if the module has been set up
|
||||
}
|
||||
|
||||
// ModuleOpts contains user-exposed options when defining a module.
|
||||
@@ -48,3 +49,8 @@ func (s *Module) Logger() *slog.Logger {
|
||||
func (s *Module) Name() string {
|
||||
return s.name
|
||||
}
|
||||
|
||||
// Loaded returns whether the module has been set up.
|
||||
func (s *Module) Loaded() bool {
|
||||
return s.loaded
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user