Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PullMsgs ¶
func PullMsgs(info PubSubInfo, channelMap *map[string](chan Notice))
PullMsgs pulls messages from a Google Cloud Pub/Sub subscription and sends them to the corresponding user's channel in the channelMap. It takes in a PubSubInfo struct containing the project ID and subscription ID, a pointer to a map containing user IDs and their corresponding channels, and a context for cancellation. It returns nothing.
Types ¶
type PubSubInfo ¶
type PubSubInfo struct { ProjectID string ChannelId string TopicID string SubID string Topic *pubsub.Topic Sub *pubsub.Subscription Client *pubsub.Client }
func (*PubSubInfo) Init ¶
func (info *PubSubInfo) Init(projectId string) error
func (*PubSubInfo) Release ¶
func (info *PubSubInfo) Release() error
Click to show internal directories.
Click to hide internal directories.