Documentation
¶
Overview ¶
Package cause provides a context key for threading automation correlation information through call chains. It is intentionally minimal to avoid import cycles: both internal/automation/action and internal/carport can import it without either depending on the other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCorrelation ¶
func WithCorrelation(ctx context.Context, c Correlation) context.Context
WithCorrelation attaches an automation Correlation to ctx.
Types ¶
type Correlation ¶
Correlation carries the automation identity of the call that triggered a downstream dispatch. Downstream consumers (e.g. carport.Host.Dispatch) read it via FromCorrelation to stamp the Source field on CommandIssued events.
func FromCorrelation ¶
func FromCorrelation(ctx context.Context) (Correlation, bool)
FromCorrelation returns the Correlation attached to ctx, if any.
Click to show internal directories.
Click to hide internal directories.