Documentation ¶
Overview ¶
Package broker implements the Broker controller and reconciler reconciling Brokers and Triggers.
Index ¶
- Variables
- func TargetFromSubscriberSpec(channel *v1beta1.Channel, subscribeSpec eventingduckv1.SubscriberSpec) (Target, *SubscriberStatus)
- func TargetFromSubscriberStatus(channel *v1beta1.Channel, subscriberStatus eventingduckv1.SubscriberStatus) (Target, *SubscriberStatus)
- type Reconciler
- type Statusable
- type SubscriberStatus
- func (s *SubscriberStatus) MarkSubscriptionFailed(_, format string, args ...interface{})
- func (s *SubscriberStatus) MarkSubscriptionReady(_ string)
- func (s *SubscriberStatus) MarkSubscriptionUnknown(_, format string, args ...interface{})
- func (s *SubscriberStatus) MarkTopicFailed(_, format string, args ...interface{})
- func (s *SubscriberStatus) MarkTopicReady()
- func (s *SubscriberStatus) MarkTopicUnknown(_, format string, args ...interface{})
- func (s *SubscriberStatus) Message() string
- func (s *SubscriberStatus) Ready() corev1.ConditionStatus
- type Target
- type TargetReconciler
Constants ¶
This section is empty.
Variables ¶
var CreatePubsubClientFn reconcilerutilspubsub.CreateFn = pubsub.NewClient
CreatePubsubClientFn is a function for pubsub client creation. Changed in testing only. TODO Stop exporting this once unit tests are migrated from the Broker and Trigger reconcilers to the CellTenant and Target reconcilers.
Functions ¶
func TargetFromSubscriberSpec ¶
func TargetFromSubscriberSpec(channel *v1beta1.Channel, subscribeSpec eventingduckv1.SubscriberSpec) (Target, *SubscriberStatus)
func TargetFromSubscriberStatus ¶
func TargetFromSubscriberStatus(channel *v1beta1.Channel, subscriberStatus eventingduckv1.SubscriberStatus) (Target, *SubscriberStatus)
Types ¶
type Reconciler ¶
type Reconciler struct { *reconciler.Base // listers index properties about resources BrokerCellLister inteventslisters.BrokerCellLister ProjectID string // pubsubClient is used as the Pubsub client when present. PubsubClient *pubsub.Client DataresidencyStore *dataresidency.Store // clusterRegion is the region where GKE is running. ClusterRegion string }
Reconciler implements controller.Reconciler for CellTenants.
func (*Reconciler) FinalizeGCPCellTenant ¶
func (r *Reconciler) FinalizeGCPCellTenant(ctx context.Context, b Statusable) error
func (*Reconciler) ReconcileGCPCellTenant ¶
func (r *Reconciler) ReconcileGCPCellTenant(ctx context.Context, b Statusable) error
type Statusable ¶
type Statusable interface { Key() *config.CellTenantKey MarkBrokerCellReady() MarkBrokerCellUnknown(reason, format string, args ...interface{}) MarkBrokerCellFailed(reason, format string, args ...interface{}) SetAddress(*apis.URL) Object() runtime.Object StatusUpdater() reconcilerutilspubsub.StatusUpdater GetLabels() map[string]string GetTopicID() string GetSubscriptionName() string }
Statusable is the interface used by the Reconciler.
func StatusableFromBroker ¶
func StatusableFromBroker(b *brokerv1.Broker) Statusable
func StatusableFromChannel ¶
func StatusableFromChannel(c *v1beta1.Channel) Statusable
type SubscriberStatus ¶
type SubscriberStatus struct {
// contains filtered or unexported fields
}
func (*SubscriberStatus) MarkSubscriptionFailed ¶
func (s *SubscriberStatus) MarkSubscriptionFailed(_, format string, args ...interface{})
func (*SubscriberStatus) MarkSubscriptionReady ¶
func (s *SubscriberStatus) MarkSubscriptionReady(_ string)
func (*SubscriberStatus) MarkSubscriptionUnknown ¶
func (s *SubscriberStatus) MarkSubscriptionUnknown(_, format string, args ...interface{})
func (*SubscriberStatus) MarkTopicFailed ¶
func (s *SubscriberStatus) MarkTopicFailed(_, format string, args ...interface{})
func (*SubscriberStatus) MarkTopicReady ¶
func (s *SubscriberStatus) MarkTopicReady()
func (*SubscriberStatus) MarkTopicUnknown ¶
func (s *SubscriberStatus) MarkTopicUnknown(_, format string, args ...interface{})
func (*SubscriberStatus) Message ¶
func (s *SubscriberStatus) Message() string
func (*SubscriberStatus) Ready ¶
func (s *SubscriberStatus) Ready() corev1.ConditionStatus
type Target ¶
type Target interface { Object() runtime.Object StatusUpdater() reconcilerutilspubsub.StatusUpdater GetTopicID() string GetSubscriptionName() string GetLabels() map[string]string DeliverySpec() *eventingduckv1.DeliverySpec SetStatusProjectID(projectID string) }
Target is the interface that the TargetReconciler uses for reconciliation.
func TargetFromTrigger ¶
func TargetFromTrigger(t *brokerv1.Trigger, deliverySpec *eventingduckv1.DeliverySpec) Target
TargetFromTrigger creates a Target for the given Trigger and associated Broker's deliverySpec.
type TargetReconciler ¶
type TargetReconciler struct { ProjectID string // pubsubClient is used as the Pubsub client when present. PubsubClient *pubsub.Client DataresidencyStore *dataresidency.Store // ClusterRegion is the region where GKE is running. ClusterRegion string }
TargetReconciler implements controller.Reconciler for CellTenant Targets.
func (*TargetReconciler) DeleteRetryTopicAndSubscription ¶
func (r *TargetReconciler) DeleteRetryTopicAndSubscription(ctx context.Context, recorder record.EventRecorder, t Target) error
func (*TargetReconciler) ReconcileRetryTopicAndSubscription ¶
func (r *TargetReconciler) ReconcileRetryTopicAndSubscription(ctx context.Context, recorder record.EventRecorder, t Target) error