encore-go-pubsub
Installation
SKILL.md
Encore Go Pub/Sub
Instructions
Pub/Sub is for asynchronous messaging between services. Producers publish events to a Topic; consumers attach Subscriptions to react. Resources must be declared as package-level variables — never inside functions.
Topics
package events
import "encore.dev/pubsub"
type OrderCreatedEvent struct {
OrderID string `json:"order_id"`
UserID string `json:"user_id"`
Total int `json:"total"`
}