pubsub

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFn added in v0.19.0

type CreateFn func(ctx context.Context, projectID string, opts ...option.ClientOption) (*pubsub.Client, error)

CreateFn is a factory function to create a Pub/Sub client. It is copied from gclient/pubsub to avoid unnecessary dependency on gpubsub.

type Reconciler

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

func NewReconciler

func NewReconciler(client *pubsub.Client, recorder record.EventRecorder) *Reconciler

func (*Reconciler) DeleteSubscription

func (r *Reconciler) DeleteSubscription(ctx context.Context, id string, obj runtime.Object, updater StatusUpdater) error

func (*Reconciler) DeleteTopic

func (r *Reconciler) DeleteTopic(ctx context.Context, id string, obj runtime.Object, updater StatusUpdater) error

func (*Reconciler) ReconcileSubscription

func (r *Reconciler) ReconcileSubscription(ctx context.Context, id string, subConfig pubsub.SubscriptionConfig, obj runtime.Object, updater StatusUpdater) (*pubsub.Subscription, error)

func (*Reconciler) ReconcileTopic

func (r *Reconciler) ReconcileTopic(ctx context.Context, id string, topicConfig *pubsub.TopicConfig, obj runtime.Object, updater StatusUpdater) (*pubsub.Topic, error)

type StatusUpdater

type StatusUpdater interface {
	MarkTopicFailed(reason, format string, args ...interface{})
	MarkTopicUnknown(reason, format string, args ...interface{})
	MarkTopicReady()
	MarkSubscriptionFailed(reason, format string, args ...interface{})
	MarkSubscriptionUnknown(reason, format string, args ...interface{})
	MarkSubscriptionReady(subscriptionID string)
}

StatusUpdater is an interface which updates resource status based on pubsub reconciliation results.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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