fakepubsub

package
v0.0.0-...-ace5c41 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(projectID, pubsubEmulatorHost string) (*Client, error)

func (*Client) CreateSubscription

func (c *Client) CreateSubscription(ctx context.Context, projectID, topicID, subscriptionID string) error

CreateSubscription creates a Pub/Sub topic and a corresponding subscription.

func (*Client) PublishMessage

func (c *Client) PublishMessage(ctx context.Context, msg PubSubMessageForSub, topicID string) error

PublishMessage creates a Pub/Sub message that sub understands (to create a ProwJob). The podName parameter is used by the integration tests; specifically, each test case invocation generates a UUID which is used as the name of the ProwJob CR. Then when the test pod is created, it is also named with the same UUID. This makes checking for the creation of jobs and pods very easy in the tests.

type PubSubMessageForSub

type PubSubMessageForSub struct {
	Attributes map[string]string
	Data       subscriber.ProwJobEvent
}

Jump to

Keyboard shortcuts

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