first commit
This commit is contained in:
10
interface.go
Normal file
10
interface.go
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user