pollo/lib/pubsub/interface.go
Atridad Lahiji 3d719132f1
Init
2024-02-15 09:07:09 -07:00

16 lines
305 B
Go

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
}