Template
1
0
Fork 0
goth.stack/lib/pubsub.go
2024-02-06 11:03:53 -07:00

16 lines
302 B
Go

package lib
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
}