summaryrefslogtreecommitdiffhomepage
path: root/internal/pubsub
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pubsub')
-rw-r--r--internal/pubsub/events.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/pubsub/events.go b/internal/pubsub/events.go
index c560f6925..2fb0a7413 100644
--- a/internal/pubsub/events.go
+++ b/internal/pubsub/events.go
@@ -1,11 +1,17 @@
package pubsub
+import "context"
+
const (
CreatedEvent EventType = "created"
UpdatedEvent EventType = "updated"
DeletedEvent EventType = "deleted"
)
+type Suscriber[T any] interface {
+ Subscribe(context.Context) <-chan Event[T]
+}
+
type (
// EventType identifies the type of event
EventType string