This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b61833  chore: add some kamelets from existing examples
     new 53ff7b6  Merge pull request #4 from nicolaferraro/other-kamelets
8b61833 is described below

commit 8b618333eb055d6f5213fc05fa39bcb1ebb652bd
Author: nicolaferraro <[email protected]>
AuthorDate: Mon Feb 15 16:03:55 2021 +0100

    chore: add some kamelets from existing examples
---
 bitcoin-source.kamelet.yaml | 61 +++++++++++++++++++++++++++++++++++++++++++++
 http-source.kamelet.yaml    | 41 ++++++++++++++++++++++++++++++
 mqtt-source.kamelet.yaml    | 40 +++++++++++++++++++++++++++++
 3 files changed, 142 insertions(+)

diff --git a/bitcoin-source.kamelet.yaml b/bitcoin-source.kamelet.yaml
new file mode 100644
index 0000000..a12b250
--- /dev/null
+++ b/bitcoin-source.kamelet.yaml
@@ -0,0 +1,61 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: bitcoin-source
+  annotations:
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PCEtLSBDcmVhdGVkIHdpdGggSW5rc2NhcGUgKGh0dHA6Ly93d3cuaW5rc2NhcGUub3JnLykgLS0+CjxzdmcgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNjQiIHdpZHRoPSI2NCIgdmVyc2lvbj0iMS4xIiB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwNjMwODc2LC0wLjAwMzAxOT
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Bitcoin Source"
+    description: |-
+      Provides a feed of the value of the Bitcoin compared to USDT using the 
Binance service.
+    properties:
+      period:
+        title: Period between updates
+        description: The interval between updates in milliseconds
+        type: integer
+        default: 10000
+  types:
+    out:
+      mediaType: application/json  
+      schema:
+        additionalProperties: true
+        type: object
+        properties:
+          currencyPair:
+            type: string
+          open:
+            type: number
+          last:
+            type: number
+          bid:
+            type: number
+          ask:
+            type: number
+          high:
+            type: number
+          low:
+            type: number
+          vwap:
+            type: number
+          volume:
+            type: number
+          quoteVolume:
+            type: number
+          bidSize:
+            type: number
+          askSize:
+            type: number
+  flow:
+    from:
+      uri: "timer:update"
+      parameters:
+        period: "{{period}}"
+      steps:
+      - to: 
"xchange:binance?service=marketdata&method=ticker&currencyPair=BTC/USDT"
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"
diff --git a/http-source.kamelet.yaml b/http-source.kamelet.yaml
new file mode 100644
index 0000000..f16a890
--- /dev/null
+++ b/http-source.kamelet.yaml
@@ -0,0 +1,41 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: http-source
+  annotations:
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MjAiCmhlaWdodD0iNDIwIiBzdHJva2U9IiMwMDAiIGZpbGw9Im5vbmUiPgo8cGF0aCBzdHJva2Utd2lkdGg9IjI2IgpkPSJNMjA5LDE1YTE5NSwxOTUgMCAxLDAgMiwweiIvPgo8cGF0aCBzdHJva2Utd2lkdGg9IjE4IgpkPSJtMjEwLDE1djM5MG0xOTUtMTk1SDE1TTU5LDkwYTI2MCwyNjAgMCAwLDAgMzAyLDAgbTAsMjQwIGEyNjAsMjYwIDAgMCwwLTMwMiwwTTE5NSwyMGEyNTAsMjUwIDAgMCwwIDAsMzgyIG0zMC
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "HTTP Source"
+    description: |-
+      Periodically fetches an HTTP resource and provides the content as output.
+    properties:
+      period:
+        title: Period between updates
+        description: The interval between fetches in milliseconds
+        type: integer
+        default: 10000
+      contentType:
+        title: Content type
+        description: The content type of the resource
+        type: string
+        default: "application/json"
+      url:
+        title: URL
+        description: The URL to fetch for data
+        type: string
+        example: 
"https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json";
+  flow:
+    from:
+      uri: "timer:fetch"
+      parameters:
+        period: "{{period}}"
+      steps:
+      - set-header:
+          name: "Accept"
+          constant: {{contentType}}
+      - to: "netty-http:{{url}}"
+      - to: "kamelet:sink"
diff --git a/mqtt-source.kamelet.yaml b/mqtt-source.kamelet.yaml
new file mode 100644
index 0000000..da080dd
--- /dev/null
+++ b/mqtt-source.kamelet.yaml
@@ -0,0 +1,40 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: mqtt-source
+  annotations:
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjMuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMiIgYmFzZVByb2ZpbGU9InRpbnkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIKCSB5PSIwcHgiIHZpZXdCb3g9IjAgMCAzMjAgMzIwIiBvdmVyZmxvdz0idmlzaWJsZSIgeG1sOnNwYWNlPSJwcm
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "MQTT Source"
+    description: |-
+      Allows receiving messages from any endpoint that supports the MQTT 
protocol, such as a message broker.
+    required:
+      - topic
+    properties:
+      topic:
+        title: Topic
+        description: The topic to subscribe to
+        type: string
+        example: "mytopic"
+      brokerUrl:
+        title: Broker URL
+        description: The URL of the broker where to establish the connection
+        type: string
+        example: "tcp://mosquitto:1883"
+      clientId:
+        title: Client ID
+        description: The client ID to use when connecting to the resource
+        type: string
+        default: "mqtt-source"
+  flow:
+    from:
+      uri: paho:{{topic}}
+      parameters:
+        brokerUrl: "{{brokerUrl}}"
+        clientId: "{{clientId}}"
+      steps:
+      - to: kamelet:sink

Reply via email to