pubsub

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pubsub contains tools for interacting with GCP pub/sub

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Messenger

type Messenger interface {
	Send(ctx context.Context, msg []byte, attrs map[string]string) error
}

Messenger defines the interface for sending messages to a relay destination.

func NewPubSubMessenger

func NewPubSubMessenger(ctx context.Context, projectID, topicID string, opts ...option.ClientOption) (Messenger, error)

NewPubSubMessenger creates a new instance of the PubSubMessenger.

type PubSubMessenger

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

PubSubMessenger implements the Messenger interface for Google Cloud pubsub.

func (*PubSubMessenger) Send

func (p *PubSubMessenger) Send(ctx context.Context, msg []byte, attrs map[string]string) error

Send sends a message to a Google Cloud pubsub topic.

Jump to

Keyboard shortcuts

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