pollo/lib/pubsub/interface.go

17 lines
305 B
Go
Raw Normal View History

2023-05-18 20:04:55 -06:00
package pubsub
import "context"
type Message struct {
Payload string
}
type PubSubMessage interface {
ReceiveMessage(ctx context.Context) (*Message, error)
}
type PubSub interface {
SubscribeToChannel(channel string) (PubSubMessage, error)
PublishToChannel(channel string, message string) error
}