pubsub

package
v0.0.0-...-ebb33e4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGCPPubSub

func NewGCPPubSub(logger logger.Logger) pubsub.PubSub

NewGCPPubSub returns a new GCPPubSub instance.

Types

type GCPAuthJSON

type GCPAuthJSON struct {
	ProjectID           string `json:"project_id"`
	PrivateKeyID        string `json:"private_key_id"`
	PrivateKey          string `json:"private_key"`
	ClientEmail         string `json:"client_email"`
	ClientID            string `json:"client_id"`
	AuthURI             string `json:"auth_uri"`
	TokenURI            string `json:"token_uri"`
	AuthProviderCertURL string `json:"auth_provider_x509_cert_url"`
	ClientCertURL       string `json:"client_x509_cert_url"`
	Type                string `json:"type"`
}

type GCPPubSub

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

GCPPubSub type.

func (*GCPPubSub) Close

func (g *GCPPubSub) Close() error

func (*GCPPubSub) Features

func (g *GCPPubSub) Features() []pubsub.Feature

func (*GCPPubSub) GetComponentMetadata

func (g *GCPPubSub) GetComponentMetadata() map[string]string

GetComponentMetadata returns the metadata of the component.

func (*GCPPubSub) Init

func (g *GCPPubSub) Init(ctx context.Context, meta pubsub.Metadata) error

Init parses metadata and creates a new Pub Sub client.

func (*GCPPubSub) Publish

func (g *GCPPubSub) Publish(ctx context.Context, req *pubsub.PublishRequest) error

Publish the topic to GCP Pubsub.

func (*GCPPubSub) Subscribe

func (g *GCPPubSub) Subscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error

Subscribe to the GCP Pubsub topic.

type WhatNow

type WhatNow struct {
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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