Documentation ¶
Overview ¶
Package bindings provides APIs to transform Kubernetes objects into Camel URIs equivalents
Index ¶
Constants ¶
const ( OrderFirst = 0 OrderStandard = 50 OrderLast = 100 )
Variables ¶
This section is empty.
Functions ¶
func RegisterBindingProvider ¶
func RegisterBindingProvider(bp BindingProvider)
Types ¶
type Binding ¶
type Binding struct { // URI is the Camel URI equivalent URI string // Traits is a partial trait specification that should be merged into the integration Traits map[string]v1.TraitSpec // ApplicationProperties contain properties that should be set on the integration for the binding to work ApplicationProperties map[string]string }
Binding represents how a Kubernetes object is represented in Camel K resources
func Translate ¶
func Translate(ctx BindingContext, endpointType v1alpha1.EndpointType, endpoint v1alpha1.Endpoint) (*Binding, error)
Translate execute all chained binding providers, returning the first success or the first error
type BindingContext ¶
type BindingProvider ¶
type BindingProvider interface { // ID returns the name of the binding provider ID() string // Translate does the actual mapping Translate(ctx BindingContext, endpointType v1alpha1.EndpointType, endpoint v1alpha1.Endpoint) (*Binding, error) // Order returns the relative order of execution of the binding provider Order() int }
BindingProvider maps a KameletBinding endpoint into Camel K resources
type CamelURIBindingProvider ¶
type CamelURIBindingProvider struct{}
CamelURIBindingProvider converts an explicit URI into a Camel endpoint. It's used as fallback if the URI scheme is not known by other providers.
func (CamelURIBindingProvider) ID ¶
func (k CamelURIBindingProvider) ID() string
func (CamelURIBindingProvider) Order ¶
func (k CamelURIBindingProvider) Order() int
func (CamelURIBindingProvider) Translate ¶
func (k CamelURIBindingProvider) Translate(ctx BindingContext, endpointType v1alpha1.EndpointType, e v1alpha1.Endpoint) (*Binding, error)
type KameletBindingProvider ¶
type KameletBindingProvider struct{}
KameletBindingProvider converts a reference to a Kamelet into a Camel URI
func (KameletBindingProvider) ID ¶
func (k KameletBindingProvider) ID() string
func (KameletBindingProvider) Order ¶
func (k KameletBindingProvider) Order() int
func (KameletBindingProvider) Translate ¶
func (k KameletBindingProvider) Translate(ctx BindingContext, endpointType v1alpha1.EndpointType, e v1alpha1.Endpoint) (*Binding, error)
type KnativeRefBindingProvider ¶
type KnativeRefBindingProvider struct{}
KnativeRefBindingProvider converts a reference to a Kubernetes object into a Camel URI. It's used as fallback if no other providers can decode the object reference.
func (KnativeRefBindingProvider) ID ¶
func (k KnativeRefBindingProvider) ID() string
func (KnativeRefBindingProvider) Order ¶
func (k KnativeRefBindingProvider) Order() int
func (KnativeRefBindingProvider) Translate ¶
func (k KnativeRefBindingProvider) Translate(ctx BindingContext, endpointType v1alpha1.EndpointType, e v1alpha1.Endpoint) (*Binding, error)
type KnativeURIBindingProvider ¶
type KnativeURIBindingProvider struct{}
KnativeURIBindingProvider converts a HTTP/HTTPS URI into a Camel Knative endpoint (to call it via CloudEvents).
func (KnativeURIBindingProvider) ID ¶
func (k KnativeURIBindingProvider) ID() string
func (KnativeURIBindingProvider) Order ¶
func (k KnativeURIBindingProvider) Order() int
func (KnativeURIBindingProvider) Translate ¶
func (k KnativeURIBindingProvider) Translate(ctx BindingContext, endpointType v1alpha1.EndpointType, e v1alpha1.Endpoint) (*Binding, error)