Documentation ¶
Overview ¶
Package gps helps with Google Pubsub
Index ¶
- func CreateTopic(ctx context.Context, pubSubPulisherClient *pubsub.PublisherClient, ...) error
- func GetPublishCallResult(ctx context.Context, publishResult *pubsub.PublishResult, ...)
- func GetTopicList(ctx context.Context, pubSubPulisherClient *pubsub.PublisherClient, ...) error
- func SetTopicRole(ctx context.Context, pubSubPulisherClient *pubsub.PublisherClient, ...) (err error)
- type PubSubMessage
- type TopicDeployment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTopic ¶
func CreateTopic(ctx context.Context, pubSubPulisherClient *pubsub.PublisherClient, topicListPointer *[]string, topicName string, projectID string) error
CreateTopic check if a topic already exist, if not create it
func GetPublishCallResult ¶ added in v0.1.0
func GetPublishCallResult(ctx context.Context, publishResult *pubsub.PublishResult, waitgroup *sync.WaitGroup, msgInfo string, pubSubErrNumber *uint64, pubSubMsgNumber *uint64, logEventEveryXPubSubMsg uint64)
GetPublishCallResult func to be used in go routine to scale pubsub event publish
func GetTopicList ¶
func GetTopicList(ctx context.Context, pubSubPulisherClient *pubsub.PublisherClient, projectID string, topicListPointer *[]string) error
GetTopicList retreive the list of existing pubsub topics
Types ¶
type PubSubMessage ¶ added in v0.1.0
type PubSubMessage struct {
Data []byte `json:"data"`
}
PubSubMessage is the payload of a Pub/Sub event.
type TopicDeployment ¶
TopicDeployment struct
func NewTopicDeployment ¶
func NewTopicDeployment() *TopicDeployment
NewTopicDeployment create deployment structure
func (*TopicDeployment) Deploy ¶
func (topicDeployment *TopicDeployment) Deploy() (err error)
Deploy topic
Click to show internal directories.
Click to hide internal directories.