first commit

This commit is contained in:
Adrian Zuercher
2025-08-21 08:07:00 +02:00
commit 2446bb11a0
5 changed files with 309 additions and 0 deletions

10
interface.go Normal file
View File

@@ -0,0 +1,10 @@
package pubSub
// PubSub defines the public API for a publish/subscribe system.
type PubSub interface {
Subscribe(id, topic string, cb func(any))
Unsubscribe(id, topic string)
UnsubscribeAll(id string)
Publish(topic string, data any)
Close()
}