Documentation ¶
Index ¶
- Variables
- func CreateSinkBinding(source corev1.ObjectReference, target corev1.ObjectReference) *sources.SinkBinding
- func CreateSubscription(channelReference corev1.ObjectReference, serviceName string, path string) *messaging.Subscription
- func CreateTrigger(brokerReference corev1.ObjectReference, serviceName string, eventType string, ...) *eventing.Trigger
- func ExtractEventType(uri string) string
- func ExtractObjectReference(uri string) (v1.ObjectReference, error)
- func FillMissingReferenceData(serviceType knativev1.CamelServiceType, ref v1.ObjectReference) []v1.ObjectReference
- func FilterURIs(uris []string, kind knativev1.CamelServiceType) []string
- func GetAddressableReference(ctx context.Context, c client.Client, ...) (*corev1.ObjectReference, error)
- func GetServiceType(ref v1.ObjectReference) (*knativev1.CamelServiceType, error)
- func GetSinkURL(ctx context.Context, c client.Client, sink *corev1.ObjectReference, ...) (*url.URL, error)
- func IsInstalled(c kubernetes.Interface) (bool, error)
- func NormalizeToURI(kind knativev1.CamelServiceType, uriOrString string) string
- type GroupVersionKindResource
Constants ¶
This section is empty.
Variables ¶
var ( // KnownChannelKinds are known channel kinds belonging to Knative. KnownChannelKinds = []GroupVersionKindResource{ { GroupVersionKind: schema.GroupVersionKind{ Kind: "Channel", Group: "messaging.knative.dev", Version: "v1", }, Resource: "channels", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "Channel", Group: "messaging.knative.dev", Version: "v1beta1", }, Resource: "channels", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "InMemoryChannel", Group: "messaging.knative.dev", Version: "v1", }, Resource: "inmemorychannels", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "InMemoryChannel", Group: "messaging.knative.dev", Version: "v1beta1", }, Resource: "inmemorychannels", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "KafkaChannel", Group: "messaging.knative.dev", Version: "v1beta1", }, Resource: "kafkachannels", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "KafkaChannel", Group: "messaging.knative.dev", Version: "v1alpha1", }, Resource: "kafkachannels", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "NatssChannel", Group: "messaging.knative.dev", Version: "v1alpha1", }, Resource: "natsschannels", }, } // KnownEndpointKinds are known endpoint kinds belonging to Knative. KnownEndpointKinds = []GroupVersionKindResource{ { GroupVersionKind: schema.GroupVersionKind{ Kind: "Service", Group: "serving.knative.dev", Version: "v1", }, Resource: "services", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "Service", Group: "serving.knative.dev", Version: "v1beta1", }, Resource: "services", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "Service", Group: "serving.knative.dev", Version: "v1alpha1", }, Resource: "services", }, } // KnownBrokerKinds are known broker kinds belonging to Knative. KnownBrokerKinds = []GroupVersionKindResource{ { GroupVersionKind: schema.GroupVersionKind{ Kind: "Broker", Group: "eventing.knative.dev", Version: "v1", }, Resource: "brokers", }, { GroupVersionKind: schema.GroupVersionKind{ Kind: "Broker", Group: "eventing.knative.dev", Version: "v1beta1", }, Resource: "brokers", }, } // RequiredKinds are Knative kinds used by Camel K for materializing integrations. // They must be present on the cluster. RequiredKinds = []GroupVersionKindResource{ { GroupVersionKind: schema.GroupVersionKind{ Kind: "Service", Group: "serving.knative.dev", Version: "v1", }, Resource: "services", }, } )
Functions ¶
func CreateSinkBinding ¶ added in v1.2.0
func CreateSinkBinding(source corev1.ObjectReference, target corev1.ObjectReference) *sources.SinkBinding
func CreateSubscription ¶
func CreateSubscription(channelReference corev1.ObjectReference, serviceName string, path string) *messaging.Subscription
func CreateTrigger ¶
func ExtractEventType ¶
ExtractEventType extract the eventType from a event URI.
func ExtractObjectReference ¶
func ExtractObjectReference(uri string) (v1.ObjectReference, error)
ExtractObjectReference returns a reference to the object described in the Knative URI.
func FillMissingReferenceData ¶
func FillMissingReferenceData(serviceType knativev1.CamelServiceType, ref v1.ObjectReference) []v1.ObjectReference
FillMissingReferenceData returns all possible combinations of ObjectReference that can be obtained by filling the missing fields with known data.
func FilterURIs ¶
func FilterURIs(uris []string, kind knativev1.CamelServiceType) []string
FilterURIs returns all Knative URIs of the given type from a slice.
func GetAddressableReference ¶
func GetAddressableReference(ctx context.Context, c client.Client, possibleReferences []corev1.ObjectReference, namespace string, name string) (*corev1.ObjectReference, error)
GetAddressableReference looks up the resource among all given types and returns an object reference to it.
func GetServiceType ¶ added in v1.2.0
func GetServiceType(ref v1.ObjectReference) (*knativev1.CamelServiceType, error)
func GetSinkURL ¶
func GetSinkURL(ctx context.Context, c client.Client, sink *corev1.ObjectReference, namespace string) (*url.URL, error)
GetSinkURL returns the sink as *url.URL.
func IsInstalled ¶
func IsInstalled(c kubernetes.Interface) (bool, error)
IsInstalled returns true if we are connected to a cluster with Knative installed.
func NormalizeToURI ¶
func NormalizeToURI(kind knativev1.CamelServiceType, uriOrString string) string
NormalizeToURI produces a Knative uri of the given service type if the argument is a plain string.
Types ¶
type GroupVersionKindResource ¶
type GroupVersionKindResource struct { schema.GroupVersionKind Resource string }
GroupVersionKindResource --.