Commit graph

4 commits

Author SHA1 Message Date
Radek Simko
0fe906fa8c make copyrightfix 2026-02-17 13:56:34 +00:00
Martin Atkins
d1b0632e82 stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
Alisdair McDiarmid
54062a52cb stacks: More extensive in-progress plan events
Expand the existing hooks to emit events throughout the planning
process, providing enough information for the Terraform Cloud UI to
render a live-updating representation of the plan. We also sketch out
the equivalent hooks for the apply operation.
2023-11-15 12:38:54 -08:00
Martin Atkins
8af46fd38b stackruntime: An extensible "hooks" API
Following a similar model that we've previously used in other parts of
Terraform to expose UI-oriented progress events, here we define
stackruntime.Hooks as a collection of optional callbacks a caller can
use to subscribe to events, and the supporting utility code to help us
concisely and correctly call those hook functions from the main evaluation
code without adding too much extra noise to the code.

Although the primary focus of this API is driving realtime UI updates,
the API design also aims to accommodate distributed tracing use-cases by
allowing callers to propagate arbitrary values between related event
notifications and to inject additional values into the context.Context
used for downstream operations that might not be under the direct
supervision of stackruntime/stackeval.
2023-11-15 12:38:52 -08:00