implement broker
This commit is contained in:
8
internal/pkg/broker/broker.go
Normal file
8
internal/pkg/broker/broker.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package broker
|
||||
|
||||
import "context"
|
||||
|
||||
type Broker interface {
|
||||
Publish(ctx context.Context, topic string, message []byte) error
|
||||
Subscribe(ctx context.Context, durable string, fn func(topic string, message []byte) error) error
|
||||
}
|
||||
Reference in New Issue
Block a user