24 Commits

Author SHA1 Message Date
end 58e5e33e18 docs: add doc.go and expand README for V1
Document lifecycle concepts, companion packages, and API reference.
Add gitignore for coverage artifacts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:58:06 -07:00
end a07d9d06ed refactor: consolidate Require API and split lifecycle files
Add RequireOpts, RequireWithOpts, and GetModule. Move helpers to
lifecycle_internal.go and errors to errors.go. Remove unused GenericModule.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:58:05 -07:00
end 4cd218f658 fix: correct lifecycle setup and teardown semantics
Guard against double setup when autoload runs dependencies early, tear down
in reverse setup order, roll back on partial failure, and detect circular
Depends chains.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 17:58:00 -07:00
end b7adafed67 add example to README 2026-01-27 15:03:05 -08:00
end 8c52d0c80d add BSD 3-Clause license 2026-01-27 15:02:55 -08:00
end 816de185e3 expose ModuleFn type 2025-06-11 18:39:29 -07:00
end c54a13c40b Revert "always add module name to log entries"
This reverts commit 6e7acc758e.
2025-06-04 17:27:20 -07:00
end 1cb207964c improve context ux, prevent duplicate setup & teardown 2025-06-04 17:26:12 -07:00
end 6e7acc758e always add module name to log entries 2025-06-04 15:14:02 -07:00
end 220ae47d5c add Module.Lifecycle getter method 2025-06-04 14:24:19 -07:00
end 76d6216a9c fix unit tests and error messages 2025-06-04 14:03:53 -07:00
end c3c8a2cafc context helpers, rework logging to support ongoing inheritance
Leaves module logger property as purely an override, pulling logger
information directly from the lifecycle instead.
2025-06-04 13:37:13 -07:00
end 6f9e3731ac add Lifecycle.RequireUnique methods for load-once deps 2025-06-03 16:58:59 -07:00
end b290bc0f7e add additional logging to Module.RequireLoaded 2025-06-03 16:58:33 -07:00
end 08ef7a5c51 fix Module.RequireLoaded failure with nil module 2025-06-03 15:03:45 -07:00
end ed8137647d full unit testing and fixes
- mapToString is ordered according to setup
- setupSingle & teardownSingle no longer return "ok" states
- teardown functions support errors
- setup and teardown functions receive module
2025-06-03 14:49:00 -07:00
end 5378c53537 add Module.RequireLoaded helper 2025-05-30 16:50:12 -07:00
end 891035cf93 add module loaded state 2025-05-30 16:40:31 -07:00
end fc41a6ee5b load dependencies by name instead of reference 2025-05-30 16:18:21 -07:00
end 8d8c1e5672 add ModuleList convenience function 2025-05-30 16:13:59 -07:00
end b760b035b4 rename Subsystem -> Module, add NewLifecycleL 2025-05-30 15:41:40 -07:00
end 231561c926 customizable subsystem loggers 2025-05-30 11:15:59 -07:00
end 2f702cccd4 split into separate files 2025-05-30 11:03:44 -07:00
end f439247631 initial commit 2025-05-30 10:47:33 -07:00