Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the routing/v1alpha1 API group.
+k8s:deepcopy-gen=package +groupName=routing.triggermesh.io
Index ¶
- Constants
- Variables
- func EventType(service, eventType string) string
- func IsMultiTenant(r Router) bool
- func Kind(kind string) schema.GroupKind
- func NewRouterConditionSet(cts ...apis.ConditionType) apis.ConditionSet
- func Resource(resource string) schema.GroupResource
- func WithRouter(ctx context.Context, r Router) context.Context
- type CloudEventContext
- type Filter
- func (f *Filter) AsEventSource() string
- func (in *Filter) DeepCopy() *Filter
- func (in *Filter) DeepCopyInto(out *Filter)
- func (in *Filter) DeepCopyObject() runtime.Object
- func (f *Filter) GetConditionSet() apis.ConditionSet
- func (*Filter) GetEventTypes() []string
- func (*Filter) GetGroupVersionKind() schema.GroupVersionKind
- func (f *Filter) GetSink() *duckv1.Destination
- func (f *Filter) GetStatus() *duckv1.Status
- func (f *Filter) GetStatusManager() *RouterStatusManager
- func (*Filter) IsMultiTenant() bool
- func (f *Filter) SetDefaults(ctx context.Context)
- func (f *Filter) Validate(ctx context.Context) *apis.FieldError
- type FilterList
- type FilterSpec
- type Router
- type RouterStatus
- type RouterStatusManager
- type Splitter
- func (s *Splitter) AsEventSource() string
- func (in *Splitter) DeepCopy() *Splitter
- func (in *Splitter) DeepCopyInto(out *Splitter)
- func (in *Splitter) DeepCopyObject() runtime.Object
- func (s *Splitter) GetConditionSet() apis.ConditionSet
- func (*Splitter) GetEventTypes() []string
- func (*Splitter) GetGroupVersionKind() schema.GroupVersionKind
- func (s *Splitter) GetSink() *duckv1.Destination
- func (s *Splitter) GetStatus() *duckv1.Status
- func (s *Splitter) GetStatusManager() *RouterStatusManager
- func (*Splitter) IsMultiTenant() bool
- func (s *Splitter) SetDefaults(ctx context.Context)
- func (s *Splitter) Validate(ctx context.Context) *apis.FieldError
- type SplitterList
- type SplitterSpec
- type ValueFromField
Constants ¶
const ( // ConditionReady has status True when the router is ready to send events. ConditionReady = apis.ConditionReady // ConditionSinkProvided has status True when the router has been configured with a sink target. ConditionSinkProvided apis.ConditionType = "SinkProvided" // ConditionDeployed has status True when the router's adapter is up and running. ConditionDeployed apis.ConditionType = "Deployed" )
Status conditions
const ( // ReasonSinkNotFound is set on a SinkProvided condition when a sink does not exist. ReasonSinkNotFound = "SinkNotFound" // ReasonSinkEmpty is set on a SinkProvided condition when a sink URI is empty. ReasonSinkEmpty = "EmptySinkURI" // ReasonRBACNotBound is set on a Deployed condition when an adapter's // ServiceAccount cannot be bound. ReasonRBACNotBound = "RBACNotBound" ReasonUnavailable = "AdapterUnavailable" )
Reasons for status conditions
const (
FilterGenericEventType = "io.triggermesh.routing.filter"
)
Supported event types
const (
SplitterGenericEventType = "io.triggermesh.routing.splitter"
)
Supported event types
Variables ¶
var ( // SchemeBuilder creates a Scheme builder that is used to register types for this custom API. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme registers the types stored in SchemeBuilder. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: routing.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func EventType ¶
EventType returns an event type in a format suitable for usage as a CloudEvent type attribute.
func IsMultiTenant ¶
IsMultiTenant returns whether the given router type is multi-tenant.
func NewRouterConditionSet ¶
func NewRouterConditionSet(cts ...apis.ConditionType) apis.ConditionSet
NewRouterConditionSet returns a set of status conditions for routers. Default conditions can be augmented by passing condition types as function arguments.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type CloudEventContext ¶
type CloudEventContext struct { Type string `json:"type"` Source string `json:"source"` Extensions map[string]string `json:"extensions"` }
CloudEventContext declares context attributes that will be propagated to resulting events.
func (*CloudEventContext) DeepCopy ¶
func (in *CloudEventContext) DeepCopy() *CloudEventContext
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudEventContext.
func (*CloudEventContext) DeepCopyInto ¶
func (in *CloudEventContext) DeepCopyInto(out *CloudEventContext)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Filter ¶
type Filter struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the Filter (from the client). // +optional Spec FilterSpec `json:"spec,omitempty"` // Status communicates the observed state of the Filter (from the controller). // +optional Status RouterStatus `json:"status,omitempty"` }
Filter is an addressable object that filters incoming events according to provided Common Language Expression
func (*Filter) AsEventSource ¶
AsEventSource implements Router.
func (*Filter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (*Filter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Filter) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Filter) GetConditionSet ¶
func (f *Filter) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Filter) GetEventTypes ¶
GetEventTypes implements Router.
func (*Filter) GetGroupVersionKind ¶
func (*Filter) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements kmeta.OwnerRefable
func (*Filter) GetStatus ¶
GetStatus retrieves the status of the resource. Implements the KRShaped interface.
func (*Filter) GetStatusManager ¶
func (f *Filter) GetStatusManager() *RouterStatusManager
GetStatusManager implements Router.
func (*Filter) IsMultiTenant ¶
IsMultiTenant implements MultiTenant.
func (*Filter) SetDefaults ¶
SetDefaults implements apis.Defaultable
type FilterList ¶
type FilterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Filter `json:"items"` }
FilterList is a list of Filter resources
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*FilterList) DeepCopy ¶
func (in *FilterList) DeepCopy() *FilterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterList.
func (*FilterList) DeepCopyInto ¶
func (in *FilterList) DeepCopyInto(out *FilterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FilterList) DeepCopyObject ¶
func (in *FilterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FilterSpec ¶
type FilterSpec struct { Expression string `json:"expression"` // Sink is a reference to an object that will resolve to a domain name to use as the sink. Sink *duckv1.Destination `json:"sink"` }
FilterSpec contains CEL expression string and the destination sink
func (*FilterSpec) DeepCopy ¶
func (in *FilterSpec) DeepCopy() *FilterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterSpec.
func (*FilterSpec) DeepCopyInto ¶
func (in *FilterSpec) DeepCopyInto(out *FilterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FilterSpec) Validate ¶
func (fs *FilterSpec) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable
type Router ¶
type Router interface { metav1.Object runtime.Object // OwnerRefable is used to construct a generic reconciler for each // router type, and convert router objects to owner references. kmeta.OwnerRefable // KRShaped is used by generated reconcilers to perform pre and // post-reconcile status updates. duckv1.KRShaped // GetSink returns the router's event sink. GetSink() *duckv1.Destination // GetStatusManager returns a manager for the router's status. GetStatusManager() *RouterStatusManager // GetEventTypes returns the event types generated by the router. GetEventTypes() []string // AsEventSource returns a unique reference to the router suitable for // use as a CloudEvent source attribute. AsEventSource() string }
Router is implemented by all Routing types.
func RouterFromContext ¶
RouterFromContext returns the router stored in the context.
type RouterStatus ¶
type RouterStatus struct { duckv1.SourceStatus `json:",inline"` duckv1.AddressStatus `json:",inline"` }
RouterStatus defines the observed state of an event source.
func (*RouterStatus) DeepCopy ¶
func (in *RouterStatus) DeepCopy() *RouterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterStatus.
func (*RouterStatus) DeepCopyInto ¶
func (in *RouterStatus) DeepCopyInto(out *RouterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RouterStatusManager ¶
type RouterStatusManager struct { apis.ConditionSet *RouterStatus }
RouterStatusManager manages the status of routers.
+k8s:deepcopy-gen=false
func (*RouterStatusManager) MarkNoSink ¶
func (m *RouterStatusManager) MarkNoSink()
MarkNoSink sets the SinkProvided condition to False.
func (*RouterStatusManager) MarkRBACNotBound ¶
func (m *RouterStatusManager) MarkRBACNotBound()
MarkRBACNotBound sets the Deployed condition to False, indicating that the adapter's ServiceAccount couldn't be bound.
func (*RouterStatusManager) MarkSink ¶
func (m *RouterStatusManager) MarkSink(uri *apis.URL)
MarkSink sets the SinkProvided condition to True using the given URI.
func (*RouterStatusManager) PropagateServiceAvailability ¶
func (m *RouterStatusManager) PropagateServiceAvailability(ksvc *servingv1.Service)
PropagateServiceAvailability uses the readiness of the provided Service to determine whether the Deployed condition should be marked as True or False.
func (*RouterStatusManager) SetRoute ¶
func (m *RouterStatusManager) SetRoute(urlPath string)
SetRoute appends the given URL path to the current source's URL.
type Splitter ¶
type Splitter struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the Splitter (from the client). // +optional Spec SplitterSpec `json:"spec,omitempty"` // Status communicates the observed state of the Splitter (from the controller). // +optional Status RouterStatus `json:"status,omitempty"` }
Splitter is an addressable object that splits incoming events according to provided specification.
func (*Splitter) AsEventSource ¶
AsEventSource implements Router.
func (*Splitter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Splitter.
func (*Splitter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Splitter) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Splitter) GetConditionSet ¶
func (s *Splitter) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Splitter) GetEventTypes ¶
GetEventTypes implements Router.
func (*Splitter) GetGroupVersionKind ¶
func (*Splitter) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements kmeta.OwnerRefable
func (*Splitter) GetSink ¶
func (s *Splitter) GetSink() *duckv1.Destination
GetSink implements Router.
func (*Splitter) GetStatus ¶
GetStatus retrieves the status of the resource. Implements the KRShaped interface.
func (*Splitter) GetStatusManager ¶
func (s *Splitter) GetStatusManager() *RouterStatusManager
GetStatusManager implements Router.
func (*Splitter) IsMultiTenant ¶
IsMultiTenant implements MultiTenant.
func (*Splitter) SetDefaults ¶
SetDefaults implements apis.Defaultable
type SplitterList ¶
type SplitterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Splitter `json:"items"` }
SplitterList is a list of Splitter resources.
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*SplitterList) DeepCopy ¶
func (in *SplitterList) DeepCopy() *SplitterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SplitterList.
func (*SplitterList) DeepCopyInto ¶
func (in *SplitterList) DeepCopyInto(out *SplitterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SplitterList) DeepCopyObject ¶
func (in *SplitterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SplitterSpec ¶
type SplitterSpec struct { Path string `json:"path"` CEContext CloudEventContext `json:"ceContext"` Sink *duckv1.Destination `json:"sink"` }
SplitterSpec holds the desired state of the Splitter.
func (*SplitterSpec) DeepCopy ¶
func (in *SplitterSpec) DeepCopy() *SplitterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SplitterSpec.
func (*SplitterSpec) DeepCopyInto ¶
func (in *SplitterSpec) DeepCopyInto(out *SplitterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SplitterSpec) Validate ¶
func (ss *SplitterSpec) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable
type ValueFromField ¶
type ValueFromField struct { // Field value. // +optional Value string `json:"value,omitempty"` // Field value from a Kubernetes Secret. // +optional ValueFromSecret *corev1.SecretKeySelector `json:"valueFromSecret,omitempty"` }
ValueFromField is a struct field that can have its value either defined explicitly or sourced from another entity.
func (*ValueFromField) DeepCopy ¶
func (in *ValueFromField) DeepCopy() *ValueFromField
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueFromField.
func (*ValueFromField) DeepCopyInto ¶
func (in *ValueFromField) DeepCopyInto(out *ValueFromField)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.