docs(core): fix logz.Options -> logz.Config in doc examples; bump to v1.1.0
Coordinated framework release. Documentation-only code change plus the shared
version bump.
- core/launcher/doc.go, core/logz/doc.go: logz.New(logz.Options{...}) ->
logz.Config (Options was retired per ADR-003; the constructor takes Config).
- go.mod: contracts -> v1.1.0 (via go get + go mod tidy).
Verified by compiling the example patterns against the real API. Badge -> v1.1.0.
Reviewed-on: #1
Co-authored-by: Rene Nochebuena Guerrero <rene@nochebuena.dev>
Co-committed-by: Rene Nochebuena Guerrero <rene@nochebuena.dev>
28 lines
858 B
Go
28 lines
858 B
Go
// Package launcher orchestrates the application lifecycle.
|
|
//
|
|
// A Launcher manages infrastructure components through three ordered phases:
|
|
//
|
|
// 1. OnInit — all components initialize in registration order
|
|
// 2. BeforeStart hooks — dependency injection wiring runs
|
|
// 3. OnStart — all components start in registration order
|
|
//
|
|
// On shutdown (OS signal or programmatic Shutdown call), OnStop is called for
|
|
// every component in reverse registration order, ensuring dependents stop
|
|
// before their dependencies.
|
|
//
|
|
// Usage:
|
|
//
|
|
// logger := logz.New(logz.Config{JSON: true})
|
|
// lc := launcher.New(logger)
|
|
//
|
|
// lc.Append(db, cache, server)
|
|
// lc.BeforeStart(func() error {
|
|
// return server.RegisterRoutes(db, cache)
|
|
// })
|
|
//
|
|
// if err := lc.Run(); err != nil {
|
|
// logger.Error("launcher failed", err)
|
|
// os.Exit(1)
|
|
// }
|
|
package launcher
|