Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: compile and schema changes for pubsub (#1600)
- adds topics and subscriptions to schema - extract pubsub declarations from go modules, including which verbs consume from a subscription - scaffolds exported topics into `external_module.go` - this file also now needs to import ftl if there are exported topics as are included (they call `ftl.RegisterTopic(...)`) - `go mod tidy` needs to be called on external modules Other things of note: - Topic names must: - be idents: this allows us to generate external module files with the variable name as the topic name (with first letter uppercased, so it is visible to the module) - start with a lower case letter: this allows us to deterministically derive the topic name from the generated variable name. (We could remove this limitation with more work I think, but this was the easiest way I could derive external topic names) - Subscription names must be an ident - I don't think it'd be too hard to change this one if we want to.
- Loading branch information