service backend
This commit is contained in:
12
api/pkg/messaging/broker/broker.go
Normal file
12
api/pkg/messaging/broker/broker.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package messaging
|
||||
|
||||
import (
|
||||
me "github.com/tech/sendico/pkg/messaging/envelope"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
)
|
||||
|
||||
type Broker interface {
|
||||
Publish(envelope me.Envelope) error
|
||||
Subscribe(event model.NotificationEvent) (<-chan me.Envelope, error)
|
||||
Unsubscribe(event model.NotificationEvent, subChan <-chan me.Envelope) error
|
||||
}
|
||||
Reference in New Issue
Block a user