mirror of https://github.com/pulumi/pulumi.git
6f21cac6f3
<!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Small refactor I noticed while writing a test with engine events. We always had to call `NewEvent` with the tag and payload value for an event and these _had_ to match up else the engine panics. But we can just pass the payload and type switch to work out the tag. Means one less parameter to pass to `NewEvent` and pretty much no chance of it going wrong. To ensure there's really no chance I've added a generic union type so you can only pass payload types to this method now. Cancel had to be handled separately because it doesn't have a payload type, it's just nil. |
||
---|---|---|
.. | ||
display | ||
filestate | ||
httpstate | ||
state | ||
apply.go | ||
apply_test.go | ||
backend.go | ||
backend_test.go | ||
cancellation_scope.go | ||
doc.go | ||
errors.go | ||
mock.go | ||
policypack.go | ||
query.go | ||
snapshot.go | ||
snapshot_test.go | ||
stack.go | ||
updates.go | ||
watch.go |