docs(worker): fix fictional launcher.Register/health.Register in doc examples #2
@@ -18,7 +18,7 @@
|
|||||||
import "code.nochebuena.dev/einherjar/worker"
|
import "code.nochebuena.dev/einherjar/worker"
|
||||||
|
|
||||||
w := worker.New(logger, worker.DefaultConfig())
|
w := worker.New(logger, worker.DefaultConfig())
|
||||||
launcher.Append(w) // OnInit starts pool; OnStop drains and stops
|
lc.Append(w) // OnInit starts pool; OnStop drains and stops
|
||||||
```
|
```
|
||||||
|
|
||||||
### Dispatching tasks
|
### Dispatching tasks
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Component adds lifecycle management to Provider.
|
// Component adds lifecycle management to Provider.
|
||||||
// Register with launcher.Register before starting.
|
// Append it to a launcher (lc.Append) before starting.
|
||||||
type Component interface {
|
type Component interface {
|
||||||
lifecycle.Component
|
lifecycle.Component
|
||||||
observability.Identifiable
|
observability.Identifiable
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
// ShutdownTimeout for all goroutines to finish. Returns nil regardless of
|
// ShutdownTimeout for all goroutines to finish. Returns nil regardless of
|
||||||
// whether the drain completed before the deadline.
|
// whether the drain completed before the deadline.
|
||||||
//
|
//
|
||||||
// Register with the launcher before starting:
|
// Append to a launcher before starting:
|
||||||
//
|
//
|
||||||
// pool := worker.New(logger, cfg)
|
// pool := worker.New(logger, cfg)
|
||||||
// launcher.Register(pool)
|
// lc.Append(pool)
|
||||||
//
|
//
|
||||||
// # Dispatching Tasks
|
// # Dispatching Tasks
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user