Documentation ¶
Overview ¶
Package bindings provides APIs to transform Kubernetes objects into Camel URIs equivalents
Package bindings provides APIs to transform Kubernetes objects into Camel URIs equivalents ¶
Package bindings provides APIs to transform Kubernetes objects into Camel URIs equivalents
Index ¶
- Constants
- func RegisterBindingProvider(bp BindingProvider)
- func V1alpha1RegisterBindingProvider(bp V1alpha1BindingProvider)
- type Binding
- type BindingContext
- type BindingConverter
- func (k BindingConverter) DataTypeStep(e v1.Endpoint, id string, typeSlot v1.TypeSlot, dataTypeActionKamelet string) (map[string]interface{}, map[string]string)
- func (k BindingConverter) ID() string
- func (k BindingConverter) Order() int
- func (k BindingConverter) Translate(ctx BindingContext, endpointCtx EndpointContext, e v1.Endpoint) (*Binding, error)
- type BindingProvider
- type CamelURIBindingProvider
- type EndpointContext
- type KnativeRefBindingProvider
- type KnativeURIBindingProvider
- type StrimziBindingProvider
- type V1alpha1BindingContext
- type V1alpha1BindingConverter
- func (k V1alpha1BindingConverter) DataTypeStep(e v1alpha1.Endpoint, id string, typeSlot v1alpha1.TypeSlot, ...) (map[string]interface{}, map[string]string)
- func (k V1alpha1BindingConverter) ID() string
- func (k V1alpha1BindingConverter) Order() int
- func (k V1alpha1BindingConverter) Translate(ctx V1alpha1BindingContext, endpointCtx V1alpha1EndpointContext, ...) (*Binding, error)
- type V1alpha1BindingProvider
- type V1alpha1CamelURIBindingProvider
- type V1alpha1EndpointContext
- type V1alpha1KnativeRefBindingProvider
- type V1alpha1KnativeURIBindingProvider
- type V1alpha1StrimziBindingProvider
Constants ¶
const ( OrderFirst = 0 OrderStandard = 50 OrderLast = 100 )
Variables ¶
This section is empty.
Functions ¶
func RegisterBindingProvider ¶
func RegisterBindingProvider(bp BindingProvider)
RegisterBindingProvider --.
func V1alpha1RegisterBindingProvider ¶
func V1alpha1RegisterBindingProvider(bp V1alpha1BindingProvider)
V1alpha1RegisterBindingProvider -- Deprecated.
Types ¶
type Binding ¶
type Binding struct { // URI is the Camel URI equivalent URI string // Step is to support complex mapping such as Camel's EIPs Step map[string]interface{} // Traits is a partial trait specification that should be merged into the integration Traits v1.Traits // 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, endpointCtx EndpointContext, endpoint v1.Endpoint) (*Binding, error)
Translate execute all chained binding providers, returning the first success or the first error.
func TranslateV1alpha1 ¶
func TranslateV1alpha1(ctx V1alpha1BindingContext, endpointCtx V1alpha1EndpointContext, endpoint v1alpha1.Endpoint) (*Binding, error)
TranslateV1alpha1 execute all chained binding providers, returning the first success or the first error. Deprecated.
type BindingContext ¶
type BindingConverter ¶
type BindingConverter struct{}
BindingConverter converts a reference to a Kamelet into a Camel URI.
func (BindingConverter) DataTypeStep ¶
func (k BindingConverter) DataTypeStep(e v1.Endpoint, id string, typeSlot v1.TypeSlot, dataTypeActionKamelet string) (map[string]interface{}, map[string]string)
DataTypeStep --.
func (BindingConverter) Translate ¶
func (k BindingConverter) Translate(ctx BindingContext, endpointCtx EndpointContext, e v1.Endpoint) (*Binding, error)
Translate --.
type BindingProvider ¶
type BindingProvider interface { // ID returns the name of the binding provider ID() string // Translate does the actual mapping Translate(ctx BindingContext, endpointContext EndpointContext, endpoint v1.Endpoint) (*Binding, error) // Order returns the relative order of execution of the binding provider Order() int }
BindingProvider maps a Binding 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) Translate ¶
func (k CamelURIBindingProvider) Translate(ctx BindingContext, endpointCtx EndpointContext, e v1.Endpoint) (*Binding, error)
Translate --.
type EndpointContext ¶
type EndpointContext struct { Type v1.EndpointType Position *int }
func (EndpointContext) GenerateID ¶
func (c EndpointContext) GenerateID() string
GenerateID generates an identifier based on the context type and its optional position.
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) Translate ¶
func (k KnativeRefBindingProvider) Translate(ctx BindingContext, endpointCtx EndpointContext, e v1.Endpoint) (*Binding, error)
Translate --.
type KnativeURIBindingProvider ¶
type KnativeURIBindingProvider struct{}
KnativeURIBindingProvider converts a HTTP/HTTPS URI into a Camel Knative endpoint (to call it via CloudEvents).
func (KnativeURIBindingProvider) Translate ¶
func (k KnativeURIBindingProvider) Translate(ctx BindingContext, endpointCtx EndpointContext, e v1.Endpoint) (*Binding, error)
Translate --.
type StrimziBindingProvider ¶ added in v2.5.0
type StrimziBindingProvider struct {
Client internalclientset.Interface
}
BindingProvider allows to connect to a Kafka topic via Binding.
func (StrimziBindingProvider) ID ¶ added in v2.5.0
func (s StrimziBindingProvider) ID() string
func (StrimziBindingProvider) Order ¶ added in v2.5.0
func (s StrimziBindingProvider) Order() int
Order --.
func (StrimziBindingProvider) Translate ¶ added in v2.5.0
func (s StrimziBindingProvider) Translate(ctx BindingContext, _ EndpointContext, endpoint camelv1.Endpoint) (*Binding, error)
type V1alpha1BindingContext ¶
type V1alpha1BindingContext struct { Ctx context.Context Client client.Client Namespace string Profile v1.TraitProfile Metadata map[string]string }
V1alpha1BindingContext -- Deprecated.
type V1alpha1BindingConverter ¶
type V1alpha1BindingConverter struct{}
V1alpha1BindingConverter converts a reference to a Kamelet into a Camel URI. Deprecated.
func (V1alpha1BindingConverter) DataTypeStep ¶
func (k V1alpha1BindingConverter) DataTypeStep(e v1alpha1.Endpoint, id string, typeSlot v1alpha1.TypeSlot, dataTypeActionKamelet string) (map[string]interface{}, map[string]string)
DataTypeStep -- . Deprecated.
func (V1alpha1BindingConverter) ID ¶
func (k V1alpha1BindingConverter) ID() string
ID -- . Deprecated.
func (V1alpha1BindingConverter) Order ¶
func (k V1alpha1BindingConverter) Order() int
Order -- . Deprecated.
func (V1alpha1BindingConverter) Translate ¶
func (k V1alpha1BindingConverter) Translate(ctx V1alpha1BindingContext, endpointCtx V1alpha1EndpointContext, e v1alpha1.Endpoint) (*Binding, error)
Translate -- . Deprecated.
type V1alpha1BindingProvider ¶
type V1alpha1BindingProvider interface { // ID returns the name of the binding provider ID() string // Translate does the actual mapping Translate(ctx V1alpha1BindingContext, endpointContext V1alpha1EndpointContext, endpoint v1alpha1.Endpoint) (*Binding, error) // Order returns the relative order of execution of the binding provider Order() int }
V1alpha1BindingProvider maps a Binding endpoint into Camel K resources. Deprecated.
type V1alpha1CamelURIBindingProvider ¶
type V1alpha1CamelURIBindingProvider struct{}
V1alpha1CamelURIBindingProvider --. Deprecated .
func (V1alpha1CamelURIBindingProvider) ID ¶
func (k V1alpha1CamelURIBindingProvider) ID() string
ID --. Deprecated .
func (V1alpha1CamelURIBindingProvider) Order ¶
func (k V1alpha1CamelURIBindingProvider) Order() int
Order -- Deprecated .
func (V1alpha1CamelURIBindingProvider) Translate ¶
func (k V1alpha1CamelURIBindingProvider) Translate(ctx V1alpha1BindingContext, endpointCtx V1alpha1EndpointContext, e v1alpha1.Endpoint) (*Binding, error)
Translate --. Deprecated .
type V1alpha1EndpointContext ¶
type V1alpha1EndpointContext struct { Type v1alpha1.EndpointType Position *int }
V1alpha1EndpointContext -- Deprecated.
func (V1alpha1EndpointContext) GenerateID ¶
func (c V1alpha1EndpointContext) GenerateID() string
GenerateID generates an identifier based on the context type and its optional position. Deprecated.
type V1alpha1KnativeRefBindingProvider ¶
type V1alpha1KnativeRefBindingProvider struct{}
V1alpha1KnativeRefBindingProvider 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. Deprecated.
func (V1alpha1KnativeRefBindingProvider) ID ¶
func (k V1alpha1KnativeRefBindingProvider) ID() string
ID --. Deprecated.
func (V1alpha1KnativeRefBindingProvider) Order ¶
func (k V1alpha1KnativeRefBindingProvider) Order() int
Order --. Deprecated.
func (V1alpha1KnativeRefBindingProvider) Translate ¶
func (k V1alpha1KnativeRefBindingProvider) Translate(ctx V1alpha1BindingContext, endpointCtx V1alpha1EndpointContext, e v1alpha1.Endpoint) (*Binding, error)
Translate --. Deprecated.
type V1alpha1KnativeURIBindingProvider ¶
type V1alpha1KnativeURIBindingProvider struct{}
V1alpha1KnativeURIBindingProvider converts a HTTP/HTTPS URI into a Camel Knative endpoint (to call it via CloudEvents).
func (V1alpha1KnativeURIBindingProvider) ID ¶
func (k V1alpha1KnativeURIBindingProvider) ID() string
ID --. Deprecated.
func (V1alpha1KnativeURIBindingProvider) Order ¶
func (k V1alpha1KnativeURIBindingProvider) Order() int
Order --. Deprecated.
func (V1alpha1KnativeURIBindingProvider) Translate ¶
func (k V1alpha1KnativeURIBindingProvider) Translate(ctx V1alpha1BindingContext, endpointCtx V1alpha1EndpointContext, e v1alpha1.Endpoint) (*Binding, error)
Translate --. Deprecated.
type V1alpha1StrimziBindingProvider ¶ added in v2.5.0
type V1alpha1StrimziBindingProvider struct {
Client internalclientset.Interface
}
V1alpha1BindingProvider allows to connect to a Kafka topic via Binding. Deprecated.
func (V1alpha1StrimziBindingProvider) ID ¶ added in v2.5.0
func (s V1alpha1StrimziBindingProvider) ID() string
ID --. Deprecated.
func (V1alpha1StrimziBindingProvider) Order ¶ added in v2.5.0
func (s V1alpha1StrimziBindingProvider) Order() int
Order --. Deprecated.
func (V1alpha1StrimziBindingProvider) Translate ¶ added in v2.5.0
func (s V1alpha1StrimziBindingProvider) Translate(ctx V1alpha1BindingContext, _ V1alpha1EndpointContext, endpoint camelv1alpha1.Endpoint) (*Binding, error)
Translate --. Deprecated.