v1

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: 13 Imported by: 0

Documentation

Overview

package v1 defines the custom Broker and Trigger types in eventing.knative.dev/v1 used for the Google Cloud Broker. +k8s:deepcopy-gen=package +groupName=eventing.knative.dev

Index

Constants

View Source
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"
)
View Source
const (
	TriggerConditionTopic        apis.ConditionType = "TopicReady"
	TriggerConditionSubscription apis.ConditionType = "SubscriptionReady"
)
View Source
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"
)
View Source
const (
	// BrokerClass is the annotation value to use when creating a
	// Google Cloud Broker object.
	BrokerClass = "googlecloud"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: broker.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

View Source
var TestHelper = testHelper{}

TestHelper contains helpers for unit tests.

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func ValidateDeadLetterSink

func ValidateDeadLetterSink(ctx context.Context, sink *duckv1.Destination) *apis.FieldError

func ValidateDeliverySpec

func ValidateDeliverySpec(ctx context.Context, spec *eventingduckv1.DeliverySpec) *apis.FieldError

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 eventingv1.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

func (in *Broker) DeepCopy() *Broker

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Broker.

func (*Broker) DeepCopyInto

func (in *Broker) DeepCopyInto(out *Broker)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Broker) DeepCopyObject

func (in *Broker) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Broker) GetConditionSet

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

func (b *Broker) GetStatus() *duckv1.Status

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

func (b *Broker) SetDefaults(ctx context.Context)

SetDefaults sets the default field values for a Broker.

func (*Broker) Validate

func (b *Broker) Validate(ctx context.Context) *apis.FieldError

Validate verifies that the Broker is valid.

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.
	eventingv1.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) MarkBrokerCellFailed

func (bs *BrokerStatus) MarkBrokerCellFailed(reason, format string, args ...interface{})

func (*BrokerStatus) MarkBrokerCellReady

func (bs *BrokerStatus) MarkBrokerCellReady()

func (*BrokerStatus) MarkBrokerCellUnknown

func (bs *BrokerStatus) MarkBrokerCellUnknown(reason, format string, args ...interface{})

func (*BrokerStatus) MarkSubscriptionFailed

func (bs *BrokerStatus) MarkSubscriptionFailed(reason, format string, args ...interface{})

func (*BrokerStatus) MarkSubscriptionReady

func (bs *BrokerStatus) MarkSubscriptionReady(_ string)

func (*BrokerStatus) MarkSubscriptionUnknown

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

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 eventingv1.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

func (in *Trigger) DeepCopy() *Trigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trigger.

func (*Trigger) DeepCopyInto

func (in *Trigger) DeepCopyInto(out *Trigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Trigger) DeepCopyObject

func (in *Trigger) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Trigger) GetConditionSet

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

func (t *Trigger) GetStatus() *duckv1.Status

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

func (t *Trigger) SetDefaults(ctx context.Context)

SetDefaults sets the default field values for a Trigger.

func (*Trigger) Validate

func (t *Trigger) Validate(ctx context.Context) *apis.FieldError

Validate the 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 {
	eventingv1.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(_ string)

func (*TriggerStatus) MarkSubscriptionUnknown

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

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(src *duckv1.Source)

Jump to

Keyboard shortcuts

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