Documentation ¶
Index ¶
- Constants
- func EnsureNoSubscription(ctx context.Context, cli *pubsub.Client) error
- func EnsureSubscription(ctx context.Context, cli *pubsub.Client) error
- func MakeAppEnv(o *v1alpha1.GoogleCloudPubSubSource) []corev1.EnvVar
- func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
- type Reconciler
- func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)
- func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha1.GoogleCloudPubSubSource) reconciler.Event
- func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.GoogleCloudPubSubSource) reconciler.Event
Constants ¶
const ( // ReasonSubscribed indicates that a source subscribed to a Pub/Sub topic. ReasonSubscribed = "Subscribed" // ReasonUnsubscribed indicates that a source unsubscribed from a Pub/Sub topic. ReasonUnsubscribed = "Unsubscribed" // ReasonFailedSubscribe indicates a failure while synchronizing a Pub/Sub subscription. ReasonFailedSubscribe = "FailedSubscribe" // ReasonFailedUnsubscribe indicates a failure while deleting a Pub/Sub subscription. ReasonFailedUnsubscribe = "FailedUnsubscribe" )
Variables ¶
This section is empty.
Functions ¶
func EnsureNoSubscription ¶ added in v1.22.0
EnsureNoSubscription ensures that the Pub/Sub subscription created for receiving messages from the desired topic is deleted. Required permissions: - pubsub.subscriptions.get - pubsub.subscriptions.delete
func EnsureSubscription ¶ added in v1.22.0
EnsureSubscription ensures the existence of a Pub/Sub subscription for receiving messages from the desired topic. Required permissions: - pubsub.subscriptions.get - pubsub.subscriptions.create - pubsub.topics.attachSubscription
func MakeAppEnv ¶ added in v1.21.0
func MakeAppEnv(o *v1alpha1.GoogleCloudPubSubSource) []corev1.EnvVar
MakeAppEnv extracts environment variables from the object. Exported to be used in external tools for local test environments.
func NewController ¶
NewController creates a Reconciler for the event source and returns the result of NewImpl.
Types ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler implements controller.Reconciler for the event source type.
func (*Reconciler) BuildAdapter ¶
func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)
BuildAdapter implements common.AdapterBuilder.
func (*Reconciler) FinalizeKind ¶
func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha1.GoogleCloudPubSubSource) reconciler.Event
FinalizeKind is called when the resource is deleted.
func (*Reconciler) ReconcileKind ¶
func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.GoogleCloudPubSubSource) reconciler.Event
ReconcileKind implements Interface.ReconcileKind.