Documentation
¶
Index ¶
- func MapToKedaTrigger(rawURI string, props map[string]string) (*traitv1.KedaTrigger, error)
- func MapToKedaTriggerWithAutoMetadata(rawURI string, props map[string]string, ...) (*traitv1.KedaTrigger, error)
- func ParseComponentURI(rawURI string) (string, string, map[string]string, error)
- func Register(m ScaleMapper)
- type AutoMetadataScaleMapper
- type ScaleMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapToKedaTrigger ¶
func MapToKedaTriggerWithAutoMetadata ¶ added in v2.12.0
func MapToKedaTriggerWithAutoMetadata(rawURI string, props map[string]string, autoMetadata map[string]map[string]string) (*traitv1.KedaTrigger, error)
MapToKedaTriggerWithAutoMetadata maps a Camel consumer URI to a KEDA trigger. autoMetadata is passed only to mappers implementing AutoMetadataScaleMapper.
func ParseComponentURI ¶
ParseComponentURI extracts the component scheme, path value, and query parameters from a Camel URI.
func Register ¶
func Register(m ScaleMapper)
Types ¶
type AutoMetadataScaleMapper ¶ added in v2.12.0
type AutoMetadataScaleMapper interface {
ScaleMapper
MapWithAutoMetadata(pathValue string, params map[string]string, props map[string]string, autoMetadata map[string]map[string]string) (kedaType string, metadata map[string]string)
}
AutoMetadataScaleMapper is an optional extension for mappers that need KEDA autoMetadata to decide whether a generic Camel component can be mapped. Existing ScaleMapper implementations do not need to implement this interface.
type ScaleMapper ¶
type ScaleMapper interface {
Component() string
Map(pathValue string, params map[string]string, props map[string]string) (kedaType string, metadata map[string]string)
}
ScaleMapper defines the interface for mapping Camel component URIs to KEDA triggers. Map returns an empty scaler type when the endpoint has nothing a KEDA scaler can measure.
func GetMapper ¶
func GetMapper(component string) (ScaleMapper, bool)