Documentation
¶
Overview ¶
Package worker defines the port a service's interface layer uses to declare named worker subscriptions. concrete/worker implements it; the worker composition activates a selected subset.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry interface {
// Add registers a named subscription; apply runs its route registrations when the subscription activates.
Add(name string, apply func())
}
Registry collects named subscriptions during wiring. Each subscription's apply callback registers its subject→handler routes; the worker activates a selected subset (`work --subscriptions=a,b`) at startup, so grouping lets each consumer be deployed and scaled as its own worker.
Click to show internal directories.
Click to hide internal directories.