pulumi/pkg/backend/httpstate
Fraser Waters 6f21cac6f3
Make `engine.NewEvent` type safe (#14590)
<!--- 
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.
2023-11-16 16:54:03 +00:00
..
client Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
testdata [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
backend.go Make `engine.NewEvent` type safe (#14590) 2023-11-16 16:54:03 +00:00
backend_test.go `pulumi new -s 'org/project/stack'` checks the proper organization for project existence rather than backend.currentUser()'s org. 2023-07-03 09:28:52 -07:00
console.go Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410) 2020-04-17 11:50:00 -07:00
console_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
diffs.go Add a strict opinionated promise library (#14552) 2023-11-15 14:53:12 +00:00
diffs_post_1.20.go Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
diffs_pre_1.20.go [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
environments.go [cli] Add support for environments (#14140) 2023-10-10 01:35:39 +00:00
policypack.go Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
snapshot.go Move SecretsManager from SnapshotPersister to SnapshotManager (#13976) 2023-09-19 18:31:56 +00:00
snapshot_test.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
stack.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
state.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
token_source.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
token_source_test.go Use context.Background in tests (#14029) 2023-09-25 12:25:26 +00:00