pubsub

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package pubsub handles interactions with PubSub framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher interface {
	Publish(request *data.ScorecardBatchRequest) error
	Close() error
}

Publisher interface is used to publish cron job requests to PubSub.

func CreatePublisher

func CreatePublisher(ctx context.Context, topicURL string) (Publisher, error)

CreatePublisher returns an implementation of the Publisher interface.

type Subscriber

type Subscriber interface {
	SynchronousPull() (*data.ScorecardBatchRequest, error)
	Ack()
	Nack()
	Close() error
}

Subscriber interface is used pull messages from PubSub.

func CreateSubscriber

func CreateSubscriber(ctx context.Context, subscriptionURL string) (Subscriber, error)

CreateSubscriber returns an implementation of Subscriber interface. Currently returns an instance of gcsSubscriber.

Jump to

Keyboard shortcuts

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