Skip to content

v2.1.1

  • v2.1.1
  • 3a81e1f
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • v2.1.1
  • 3a81e1f
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ognick ognick tagged this 24 Nov 20:32
Add Register() helper function for fluent component registration
Add Run() helper function for simplified lifecycle execution
Enhance lifecycle management with improved error handling
Add comprehensive test coverage for new functionality
Update example application with new API usage
Improve component dependency management and startup order
Add support for graceful shutdown hooks with WithShutdownHook()
Enhance lifecycle status transitions and error propagation
BREAKING CHANGES:

Lifecycle.Run() method signature changed:
OLD: Run(ctx context.Context, readinessProbe func(err error)) func() error
NEW: Run(ctx context.Context, readinessProbe func(err error)) error
Lifecycle is now a Component without casting
Added blocking Run() helper method with callback support
Lifecycle no longer shuts down on signals by default (use WithShutdownHook() option)
Migration guide:

Replace: waitFn := lc.Run(ctx, probe); err := waitFn()
With: err := lc.Run(ctx, probe)
Use goscade.Run() helper for blocking execution with callback
Add WithShutdownHook() option if signal handling is needed
Assets 2
Loading