Documentation
¶
Overview ¶
Package handler provides the base Handler pattern for NATS message-driven services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Settings *config.Settings
NATS *natsutil.Client
Telemetry *telemetry.Provider
Subject string
QueueGroup string
// contains filtered or unexported fields
}
Handler is the base service runner that wires NATS, health, and telemetry.
func (*Handler) OnTeardown ¶
func (h *Handler) OnTeardown(fn TeardownFunc)
OnTeardown registers the teardown callback.
func (*Handler) OnTypedMessage ¶
func (h *Handler) OnTypedMessage(fn TypedMessageHandler)
OnTypedMessage registers the message handler callback.
type TeardownFunc ¶
TeardownFunc is called during graceful shutdown.
Click to show internal directories.
Click to hide internal directories.