events

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSubNotifierInput added in v1.0.0

type PubSubNotifierInput struct {
	Logger           *zap.SugaredLogger
	ProjectID        string
	SubscriptionName string
}

PubSubNotifierInput defines all required fields to create a PubSubNotifier

type Subscription

type Subscription interface {
	// Receive sends outstanding pubsub messages to event channel. It blocks until ctx is done, or the pubsub returns a non-retryable error.
	Receive(ctx context.Context, event chan<- *gcppubsub.Message)
}

Subscription provides a wrapper around a specific pubsub subscription

func NewPubSubNotifier

func NewPubSubNotifier(ctx context.Context, input *PubSubNotifierInput) (Subscription, error)

NewPubSubNotifier returns a client that provides wrappers around the specified pubsub subscription

Jump to

Keyboard shortcuts

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