Class: AWSCDK::LambdaEventSources::SelfManagedKafkaEventSource
- Inherits:
-
StreamEventSource
- Object
- StreamEventSource
- AWSCDK::LambdaEventSources::SelfManagedKafkaEventSource
- Defined in:
- lambda_event_sources/self_managed_kafka_event_source.rb
Overview
Use a self hosted Kafka installation as a streaming source for AWS Lambda.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(target) ⇒ void
Called by
lambda.addEventSourceto allow the event source to bind to this function. - #enrich_mapping_options(options) ⇒ AWSCDK::Lambda::EventSourceMappingOptions
-
#initialize(props) ⇒ SelfManagedKafkaEventSource
constructor
A new instance of SelfManagedKafkaEventSource.
- #props ⇒ AWSCDK::LambdaEventSources::StreamEventSourceProps
Constructor Details
#initialize(props) ⇒ SelfManagedKafkaEventSource
Returns a new instance of SelfManagedKafkaEventSource.
29 30 31 32 33 |
# File 'lambda_event_sources/self_managed_kafka_event_source.rb', line 29 def initialize(props) props = props.is_a?(Hash) ? ::AWSCDK::LambdaEventSources::SelfManagedKafkaEventSourceProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhX2V2ZW50X3NvdXJjZXMuU2VsZk1hbmFnZWRLYWZrYUV2ZW50U291cmNlUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
35 36 37 38 39 40 41 |
# File 'lambda_event_sources/self_managed_kafka_event_source.rb', line 35 def self.jsii_overridable_methods { :props => { kind: :property, name: "props", is_optional: false }, :bind => { kind: :method, name: "bind", is_optional: false }, :enrich_mapping_options => { kind: :method, name: "enrichMappingOptions", is_optional: false }, } end |
Instance Method Details
#bind(target) ⇒ void
This method returns an undefined value.
Called by lambda.addEventSource to allow the event source to bind to this function.
52 53 54 55 |
# File 'lambda_event_sources/self_managed_kafka_event_source.rb', line 52 def bind(target) Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "target") jsii_call_method("bind", [target]) end |
#enrich_mapping_options(options) ⇒ AWSCDK::Lambda::EventSourceMappingOptions
59 60 61 62 63 |
# File 'lambda_event_sources/self_managed_kafka_event_source.rb', line 59 def () = .is_a?(Hash) ? ::AWSCDK::Lambda::EventSourceMappingOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkV2ZW50U291cmNlTWFwcGluZ09wdGlvbnMifQ==")), "options") jsii_call_method("enrichMappingOptions", []) end |
#props ⇒ AWSCDK::LambdaEventSources::StreamEventSourceProps
44 45 46 |
# File 'lambda_event_sources/self_managed_kafka_event_source.rb', line 44 def props() jsii_get_property("props") end |