gps

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package gps helps with Google Pubsub

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTopicRole added in v0.1.2

func CheckTopicRole(ctx context.Context, pubSubPulisherClient *pubsub.PublisherClient, topicName string, member string, role iam.RoleName) (err error)

CheckTopicRole check if a role exist on a topic

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

func SetTopicRole added in v0.0.35

func SetTopicRole(ctx context.Context, pubSubPulisherClient *pubsub.PublisherClient, topicName string, member string, role iam.RoleName) (err error)

SetTopicRole set a role on a topic

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

type TopicDeployment struct {
	Core     *deploy.Core
	Settings struct {
		TopicName string
	}
}

TopicDeployment struct

func NewTopicDeployment

func NewTopicDeployment() *TopicDeployment

NewTopicDeployment create deployment structure

func (*TopicDeployment) Deploy

func (topicDeployment *TopicDeployment) Deploy() (err error)

Deploy topic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL