An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/aretw0/lifecycle

Package lifecycle provides a robust control plane for modern Go applications. It unifies Death Management (Signals, Shutdown) with Life Management (Supervision, Events). The library is built around three pillars: Signal Context (The Foundation): Manages the application's lifecycle, handling OS signals (SIGINT/SIGTERM) and propagating cancellation via context.Context. ctx := lifecycle.NewSignalContext(context.Background()) <-ctx.Done() Supervisor (The Bridge): Manages a tree of Workers (Processes, Containers, Goroutines), ensuring they adhere to the parent's lifecycle. It supports restart strategies (OneForOne, OneForAll), persistent identity (Handover), and state introspection via Workers(). sup := lifecycle.NewSupervisor("root", lifecycle.SupervisorStrategyOneForOne) sup.Add(spec) states := sup.Workers() Control Plane (The Orchestrator): Decouples "Events" (Triggers) from "Handlers" (Reactions) via a Router. This allows the application to react to external stimuli (Input, Webhooks) dynamically. router := lifecycle.NewRouter() router.Handle("signal/interrupt", handler) For convenience, this package exposes the most commonly used types and constructors from the internal `pkg/` structure, grouped by functionality: For CLI tools, use the Interactive Router preset to wire up signals and input automatically: Configuration is done via Functional Options (SignalOption) and Struct Specs (SupervisorSpec). We adopt the "Stdlib Pattern": providing a `DefaultRouter` for convenience ("Managed Global State") while allowing explicit `NewRouter` for strict isolation.

Ecosystem
proxy.golang.org
Latest Release
v1.7.2
13 days ago
Versions
21
v1.7.2
Published: 13 days ago
Registry - Documentation - Download
v1.7.1
Published: 17 days ago
Registry - Documentation - Download
v1.7.0
Published: 18 days ago
Registry - Documentation - Download
v1.6.5
Published: 19 days ago
Registry - Documentation - Download
v1.6.4
Published: 21 days ago
Registry - Documentation - Download
v1.6.3
Published: 21 days ago
Registry - Documentation - Download
v1.6.2
Published: 22 days ago
Registry - Documentation - Download
v1.6.1
Published: 22 days ago
Registry - Documentation - Download
v1.6.0
Published: 23 days ago
Registry - Documentation - Download
v1.5.2
Published: 23 days ago
Registry - Documentation - Download
v1.5.1
Published: 24 days ago
Registry - Documentation - Download
v1.5.0
Published: 24 days ago
Registry - Documentation - Download
v1.4.1
Published: about 1 month ago
Registry - Documentation - Download
v1.4.0
Published: about 1 month ago
Registry - Documentation - Download
v1.3.1
Published: about 1 month ago
Registry - Documentation - Download
v1.3.0
Published: about 1 month ago
Registry - Documentation - Download
v1.2.0
Published: about 1 month ago
Registry - Documentation - Download
v1.1.0
Published: about 1 month ago
Registry - Documentation - Download
v1.0.0
Published: about 1 month ago
Registry - Documentation - Download
v0.1.1
Published: about 1 month ago
Registry - Documentation - Download
v0.1.0
Published: about 1 month ago
Registry - Documentation - Download
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/aretw0/lifecycle
spec
License AGPL-3.0
Namespace github.com/aretw0
First Release about 1 month ago
Last Synced about 11 hours ago
Repository
Stars 1 on GitHub
Forks 0 on GitHub
Rankings on proxy.golang.org
Overall Top 1.0%