Documentation
¶
Overview ¶
Package v1beta1 defines the custom Broker and Trigger types in eventing.knative.dev/v1beta1 used for the Google Cloud Broker. +k8s:deepcopy-gen=package +groupName=eventing.knative.dev
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Broker
- func (in *Broker) DeepCopy() *Broker
- func (in *Broker) DeepCopyInto(out *Broker)
- func (in *Broker) DeepCopyObject() runtime.Object
- func (*Broker) GetConditionSet() apis.ConditionSet
- func (b *Broker) GetGroupVersionKind() schema.GroupVersionKind
- func (b *Broker) GetStatus() *duckv1.Status
- func (b *Broker) GetUntypedSpec() interface{}
- func (b *Broker) SetDefaults(ctx context.Context)
- func (b *Broker) Validate(ctx context.Context) *apis.FieldError
- type BrokerList
- type BrokerStatus
- func (in *BrokerStatus) DeepCopy() *BrokerStatus
- func (in *BrokerStatus) DeepCopyInto(out *BrokerStatus)
- func (bs *BrokerStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (bs *BrokerStatus) GetTopLevelCondition() *apis.Condition
- func (bs *BrokerStatus) InitializeConditions()
- func (bs *BrokerStatus) IsReady() bool
- func (bs *BrokerStatus) MarkBrokerCellReady()
- func (bs *BrokerStatus) MarkBrokerCelllFailed(reason, format string, args ...interface{})
- func (bs *BrokerStatus) MarkBrokerCelllUnknown(reason, format string, args ...interface{})
- func (bs *BrokerStatus) MarkSubscriptionFailed(reason, format string, args ...interface{})
- func (bs *BrokerStatus) MarkSubscriptionReady()
- func (bs *BrokerStatus) MarkSubscriptionUnknown(reason, format string, args ...interface{})
- func (bs *BrokerStatus) MarkTopicFailed(reason, format string, args ...interface{})
- func (bs *BrokerStatus) MarkTopicReady()
- func (bs *BrokerStatus) MarkTopicUnknown(reason, format string, args ...interface{})
- func (bs *BrokerStatus) SetAddress(url *apis.URL)
- type Trigger
- func (in *Trigger) DeepCopy() *Trigger
- func (in *Trigger) DeepCopyInto(out *Trigger)
- func (in *Trigger) DeepCopyObject() runtime.Object
- func (*Trigger) GetConditionSet() apis.ConditionSet
- func (t *Trigger) GetGroupVersionKind() schema.GroupVersionKind
- func (t *Trigger) GetStatus() *duckv1.Status
- func (t *Trigger) GetUntypedSpec() interface{}
- func (t *Trigger) SetDefaults(ctx context.Context)
- func (t *Trigger) Validate(ctx context.Context) *apis.FieldError
- type TriggerList
- type TriggerStatus
- func (in *TriggerStatus) DeepCopy() *TriggerStatus
- func (in *TriggerStatus) DeepCopyInto(out *TriggerStatus)
- func (ts *TriggerStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (ts *TriggerStatus) GetTopLevelCondition() *apis.Condition
- func (ts *TriggerStatus) InitializeConditions()
- func (ts *TriggerStatus) IsReady() bool
- func (ts *TriggerStatus) MarkBrokerFailed(reason, messageFormat string, messageA ...interface{})
- func (ts *TriggerStatus) MarkBrokerNotConfigured()
- func (ts *TriggerStatus) MarkBrokerUnknown(reason, messageFormat string, messageA ...interface{})
- func (ts *TriggerStatus) MarkDependencyFailed(reason, messageFormat string, messageA ...interface{})
- func (ts *TriggerStatus) MarkDependencyNotConfigured()
- func (ts *TriggerStatus) MarkDependencySucceeded()
- func (ts *TriggerStatus) MarkDependencyUnknown(reason, messageFormat string, messageA ...interface{})
- func (ts *TriggerStatus) MarkSubscriberResolvedFailed(reason, messageFormat string, messageA ...interface{})
- func (ts *TriggerStatus) MarkSubscriberResolvedSucceeded()
- func (ts *TriggerStatus) MarkSubscriberResolvedUnknown(reason, messageFormat string, messageA ...interface{})
- func (bs *TriggerStatus) MarkSubscriptionFailed(reason, format string, args ...interface{})
- func (bs *TriggerStatus) MarkSubscriptionReady()
- func (bs *TriggerStatus) MarkSubscriptionUnknown(reason, format string, args ...interface{})
- func (bs *TriggerStatus) MarkTopicFailed(reason, format string, args ...interface{})
- func (bs *TriggerStatus) MarkTopicReady()
- func (bs *TriggerStatus) MarkTopicUnknown(reason, format string, args ...interface{})
- func (ts *TriggerStatus) PropagateBrokerStatus(bs *BrokerStatus)
- func (ts *TriggerStatus) PropagateDependencyStatus(ks *duckv1.KResource)
Constants ¶
const ( // BrokerConditionBrokerCell reports the availability of the Broker's BrokerCell. BrokerConditionBrokerCell apis.ConditionType = "BrokerCellReady" // BrokerConditionTopic reports the status of the Broker's PubSub topic. // THis condition is specific to the Google Cloud Broker. BrokerConditionTopic apis.ConditionType = "TopicReady" // BrokerConditionSubscription reports the status of the Broker's PubSub // subscription. This condition is specific to the Google Cloud Broker. BrokerConditionSubscription apis.ConditionType = "SubscriptionReady" )
const ( TriggerConditionTopic apis.ConditionType = "TopicReady" TriggerConditionSubscription apis.ConditionType = "SubscriptionReady" )
const ( // DependencyAnnotation is the annotation key used to mark the sources that the Trigger depends on. // This will be used when the kn client creates a source and trigger pair for the user such that the trigger only receives events produced by the paired source. DependencyAnnotation = "knative.dev/dependency" // InjectionAnnotation is the annotation key used to enable knative eventing injection for a namespace and automatically create a default broker. // This will be used when the client creates a trigger paired with default broker and the default broker doesn't exist in the namespace InjectionAnnotation = "knative-eventing-injection" )
const ( // BrokerClass is the annotation value to use when creating a // Google Cloud Broker object. BrokerClass = "googlecloud" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: broker.GroupName, Version: "v1beta1"}
SchemeGroupVersion is group version used to register these objects
var TestHelper = testHelper{}
TestHelper contains helpers for unit tests.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Broker ¶
type Broker struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the Broker. Spec eventingv1beta1.BrokerSpec `json:"spec,omitempty"` // Status represents the current state of the Broker. This data may be out of // date. // +optional Status BrokerStatus `json:"status,omitempty"` }
Broker collects a pool of events that are consumable using Triggers. Brokers provide a well-known endpoint for event delivery that senders can use with minimal knowledge of the event routing strategy. Receivers use Triggers to request delivery of events from a Broker's pool to a specific URL or Addressable endpoint.
func (*Broker) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Broker.
func (*Broker) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Broker) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Broker) GetConditionSet ¶ added in v0.16.0
func (*Broker) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Broker) GetGroupVersionKind ¶
func (b *Broker) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns GroupVersionKind for Brokers
func (*Broker) GetStatus ¶ added in v0.16.0
GetStatus retrieves the status of the Broker. Implements the KRShaped interface.
func (*Broker) GetUntypedSpec ¶
func (b *Broker) GetUntypedSpec() interface{}
GetUntypedSpec returns the spec of the Broker.
func (*Broker) SetDefaults ¶
SetDefaults sets the default field values for a Broker.
type BrokerList ¶
type BrokerList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []Broker `json:"items"` }
BrokerList is a collection of Brokers.
func (*BrokerList) DeepCopy ¶
func (in *BrokerList) DeepCopy() *BrokerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerList.
func (*BrokerList) DeepCopyInto ¶
func (in *BrokerList) DeepCopyInto(out *BrokerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BrokerList) DeepCopyObject ¶
func (in *BrokerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BrokerStatus ¶
type BrokerStatus struct { // Inherits core eventing BrokerStatus. // even with this change, the webhook seems to drop unknown fields. May need to alter the mutating webhook. eventingv1beta1.BrokerStatus `json:",inline"` }
BrokerStatus represents the current state of a Broker.
func (*BrokerStatus) DeepCopy ¶
func (in *BrokerStatus) DeepCopy() *BrokerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerStatus.
func (*BrokerStatus) DeepCopyInto ¶
func (in *BrokerStatus) DeepCopyInto(out *BrokerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BrokerStatus) GetCondition ¶
func (bs *BrokerStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition currently associated with the given type, or nil.
func (*BrokerStatus) GetTopLevelCondition ¶
func (bs *BrokerStatus) GetTopLevelCondition() *apis.Condition
GetTopLevelCondition returns the top level Condition.
func (*BrokerStatus) InitializeConditions ¶
func (bs *BrokerStatus) InitializeConditions()
InitializeConditions sets relevant unset conditions to Unknown state.
func (*BrokerStatus) IsReady ¶
func (bs *BrokerStatus) IsReady() bool
IsReady returns true if the resource is ready overall.
func (*BrokerStatus) MarkBrokerCellReady ¶ added in v0.16.0
func (bs *BrokerStatus) MarkBrokerCellReady()
func (*BrokerStatus) MarkBrokerCelllFailed ¶ added in v0.16.0
func (bs *BrokerStatus) MarkBrokerCelllFailed(reason, format string, args ...interface{})
func (*BrokerStatus) MarkBrokerCelllUnknown ¶ added in v0.16.0
func (bs *BrokerStatus) MarkBrokerCelllUnknown(reason, format string, args ...interface{})
func (*BrokerStatus) MarkSubscriptionFailed ¶
func (bs *BrokerStatus) MarkSubscriptionFailed(reason, format string, args ...interface{})
func (*BrokerStatus) MarkSubscriptionReady ¶
func (bs *BrokerStatus) MarkSubscriptionReady()
func (*BrokerStatus) MarkSubscriptionUnknown ¶ added in v0.16.0
func (bs *BrokerStatus) MarkSubscriptionUnknown(reason, format string, args ...interface{})
func (*BrokerStatus) MarkTopicFailed ¶
func (bs *BrokerStatus) MarkTopicFailed(reason, format string, args ...interface{})
func (*BrokerStatus) MarkTopicReady ¶
func (bs *BrokerStatus) MarkTopicReady()
func (*BrokerStatus) MarkTopicUnknown ¶ added in v0.16.0
func (bs *BrokerStatus) MarkTopicUnknown(reason, format string, args ...interface{})
func (*BrokerStatus) SetAddress ¶
func (bs *BrokerStatus) SetAddress(url *apis.URL)
SetAddress makes this Broker addressable by setting the hostname. It also sets the BrokerConditionAddressable to true.
type Trigger ¶
type Trigger struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the Trigger. Spec eventingv1beta1.TriggerSpec `json:"spec,omitempty"` // Status represents the current state of the Trigger. This data may be out of // date. // +optional Status TriggerStatus `json:"status,omitempty"` }
Trigger represents a request to have events delivered to a consumer from a Broker's event pool.
func (*Trigger) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trigger.
func (*Trigger) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Trigger) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Trigger) GetConditionSet ¶ added in v0.16.0
func (*Trigger) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Trigger) GetGroupVersionKind ¶
func (t *Trigger) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns GroupVersionKind for Triggers.
func (*Trigger) GetStatus ¶ added in v0.16.0
GetStatus retrieves the status of the Trigger. Implements the KRShaped interface.
func (*Trigger) GetUntypedSpec ¶
func (t *Trigger) GetUntypedSpec() interface{}
GetUntypedSpec returns the spec of the Trigger.
func (*Trigger) SetDefaults ¶
SetDefaults sets the default field values for a Trigger.
type TriggerList ¶
type TriggerList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []Trigger `json:"items"` }
TriggerList is a collection of Triggers.
func (*TriggerList) DeepCopy ¶
func (in *TriggerList) DeepCopy() *TriggerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerList.
func (*TriggerList) DeepCopyInto ¶
func (in *TriggerList) DeepCopyInto(out *TriggerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TriggerList) DeepCopyObject ¶
func (in *TriggerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TriggerStatus ¶
type TriggerStatus struct {
eventingv1beta1.TriggerStatus `json:",inline"`
}
TriggerStatus represents the current state of a Trigger.
func (*TriggerStatus) DeepCopy ¶
func (in *TriggerStatus) DeepCopy() *TriggerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerStatus.
func (*TriggerStatus) DeepCopyInto ¶
func (in *TriggerStatus) DeepCopyInto(out *TriggerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TriggerStatus) GetCondition ¶
func (ts *TriggerStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition currently associated with the given type, or nil.
func (*TriggerStatus) GetTopLevelCondition ¶
func (ts *TriggerStatus) GetTopLevelCondition() *apis.Condition
GetTopLevelCondition returns the top level Condition.
func (*TriggerStatus) InitializeConditions ¶
func (ts *TriggerStatus) InitializeConditions()
InitializeConditions sets relevant unset conditions to Unknown state.
func (*TriggerStatus) IsReady ¶
func (ts *TriggerStatus) IsReady() bool
IsReady returns true if the resource is ready overall.
func (*TriggerStatus) MarkBrokerFailed ¶
func (ts *TriggerStatus) MarkBrokerFailed(reason, messageFormat string, messageA ...interface{})
func (*TriggerStatus) MarkBrokerNotConfigured ¶
func (ts *TriggerStatus) MarkBrokerNotConfigured()
func (*TriggerStatus) MarkBrokerUnknown ¶
func (ts *TriggerStatus) MarkBrokerUnknown(reason, messageFormat string, messageA ...interface{})
func (*TriggerStatus) MarkDependencyFailed ¶
func (ts *TriggerStatus) MarkDependencyFailed(reason, messageFormat string, messageA ...interface{})
func (*TriggerStatus) MarkDependencyNotConfigured ¶
func (ts *TriggerStatus) MarkDependencyNotConfigured()
func (*TriggerStatus) MarkDependencySucceeded ¶
func (ts *TriggerStatus) MarkDependencySucceeded()
func (*TriggerStatus) MarkDependencyUnknown ¶
func (ts *TriggerStatus) MarkDependencyUnknown(reason, messageFormat string, messageA ...interface{})
func (*TriggerStatus) MarkSubscriberResolvedFailed ¶
func (ts *TriggerStatus) MarkSubscriberResolvedFailed(reason, messageFormat string, messageA ...interface{})
func (*TriggerStatus) MarkSubscriberResolvedSucceeded ¶
func (ts *TriggerStatus) MarkSubscriberResolvedSucceeded()
func (*TriggerStatus) MarkSubscriberResolvedUnknown ¶
func (ts *TriggerStatus) MarkSubscriberResolvedUnknown(reason, messageFormat string, messageA ...interface{})
func (*TriggerStatus) MarkSubscriptionFailed ¶
func (bs *TriggerStatus) MarkSubscriptionFailed(reason, format string, args ...interface{})
func (*TriggerStatus) MarkSubscriptionReady ¶
func (bs *TriggerStatus) MarkSubscriptionReady()
func (*TriggerStatus) MarkSubscriptionUnknown ¶ added in v0.16.0
func (bs *TriggerStatus) MarkSubscriptionUnknown(reason, format string, args ...interface{})
func (*TriggerStatus) MarkTopicFailed ¶
func (bs *TriggerStatus) MarkTopicFailed(reason, format string, args ...interface{})
func (*TriggerStatus) MarkTopicReady ¶
func (bs *TriggerStatus) MarkTopicReady()
func (*TriggerStatus) MarkTopicUnknown ¶ added in v0.16.0
func (bs *TriggerStatus) MarkTopicUnknown(reason, format string, args ...interface{})
func (*TriggerStatus) PropagateBrokerStatus ¶
func (ts *TriggerStatus) PropagateBrokerStatus(bs *BrokerStatus)
func (*TriggerStatus) PropagateDependencyStatus ¶
func (ts *TriggerStatus) PropagateDependencyStatus(ks *duckv1.KResource)