add initial stuff

This commit is contained in:
Kujtim Hoxha
2025-03-23 19:19:08 +01:00
parent 796bbf4d66
commit 8daa6e774a
36 changed files with 1779 additions and 143 deletions

View File

@@ -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