Documentation
¶
Overview ¶
Package worker provides the goroutine-lifecycle boilerplate shared by every background process in the app (the orders outbox relay, the notifier consume loop). It is deliberately tiny: the value is having the error-prone concurrency plumbing — a single goroutine, context cancellation, WaitGroup join, idempotent stop — written and tested once.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner supervises one background goroutine. Embed it in a service and drive it with Start/Stop; the loop function receives a context that is cancelled when Stop is called, and Stop blocks until the goroutine has returned.
Click to show internal directories.
Click to hide internal directories.