gcp

package
v0.0.0-...-e8dd6d2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSubClient

type PubSubClient struct {
	// contains filtered or unexported fields
}

func NewPubSubClient

func NewPubSubClient(ctx context.Context, config PubSubConfig) (PubSubClient, error)

NewPubSubClient creates a new client instance and if required creates Topic and subscription

func (PubSubClient) Client

func (ps PubSubClient) Client() *pubsub.Client

func (PubSubClient) Shutdown

func (ps PubSubClient) Shutdown(ctx context.Context) error

func (PubSubClient) Subscription

func (ps PubSubClient) Subscription() *pubsub.Subscription

func (PubSubClient) Topic

func (ps PubSubClient) Topic() *pubsub.Topic

type PubSubConfig

type PubSubConfig struct {
	// contains filtered or unexported fields
}

func NewPubSubConfig

func NewPubSubConfig() (PubSubConfig, error)

NewPubSubConfig creates a new PubSubConfig from the environment variables

func (PubSubConfig) Credentials

func (c PubSubConfig) Credentials() string

Credentials returns the GCP credential file location

func (PubSubConfig) DataTopicID

func (c PubSubConfig) DataTopicID() string

DataTopicID returns the GCP pubsub topic

func (PubSubConfig) ProjectID

func (c PubSubConfig) ProjectID() string

ProjectID returns the GCP Project ID

func (PubSubConfig) Subscription

func (c PubSubConfig) Subscription() string

DataTopicID returns the GCP pubsub topic

Jump to

Keyboard shortcuts

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