-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: inject topics/subscriptions in go #3394
Conversation
e747065
to
2d24683
Compare
31ba8b6
to
0f01e0c
Compare
10b9386
to
366f26b
Compare
8e1ee84
to
65f6b88
Compare
@@ -565,7 +567,8 @@ func testErrorReporting(t *testing.T) { | |||
`146:6-45: enum discriminator "TypeEnum3" cannot contain exported methods`, | |||
`149:6-35: enum discriminator "NoMethodsTypeEnum" must define at least one method`, | |||
`161:3-14: unexpected token "d"`, | |||
`168:2-62: can not publish directly to topics in other modules`, | |||
// todo: do we want this? why do we support exporting topics if so? | |||
//`168:2-62: can not publish directly to topics in other modules`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this check be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah we still want this limitation. We export topics so that subscriptions in other modules can subscribe to them. But we don't want to let anyone publish to topics directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok cool, i'll restrict that via the generated external module so there's no Publish
method at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually that won't work. will keep the static check
cc3d236
to
29f4e24
Compare
@@ -438,67 +438,6 @@ func getDSNFromSecret(ftl internal.FTL, module, name string) (string, error) { | |||
return dsn, nil | |||
} | |||
|
|||
// WithSubscriber adds a subscriber during a test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be reimplementing test helpers with a different strategy separately
97232ae
to
b446f7e
Compare
45afd0b
to
26ea38c
Compare
99f183e
to
c094dc2
Compare
24e9479
to
8ca7ac7
Compare
c551c75
to
d3effd0
Compare
go:
type MyTopic = ftl.TopicHandle[MyEvent]
schema:
topic myTopic foo.MyEvent
go:
type MySubscription = ftl.SubscriptionHandle[MyTopic, MySinkClient, MyEvent]
schema:
subscription mySubscription foo.MyEvent