-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrdkafka.html
More file actions
241 lines (213 loc) · 8.06 KB
/
Copy pathlibrdkafka.html
File metadata and controls
241 lines (213 loc) · 8.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<script type="text/javascript">
RED.nodes.registerType("librdkafka-client", {
category: "config",
defaults: {
name: {value: ""},
envprefix: {value: ""},
servers: {value: "localhost:9094", required: true},
authmechanism: {value: "scram-sha-512"},
verifyservercert: {value: true},
},
credentials: {
user: {value: ""},
password: {value: "", type: "password"},
},
label: function() {
return this.name || (this.host + ":" + this.port);
}
});
</script>
<script type="text/html" data-template-name="librdkafka-client">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Env Prefix</label>
<input type="text" id="node-config-input-envprefix" placeholder="Env Prefix">
</div>
<div class="form-row">
<label for="node-config-input-servers"><i class="fa fa-server"></i> Servers</label>
<input type="text" id="node-config-input-servers">
</div>
<div class="form-row">
<label for="node-config-input-servers"><i class="fa fa-id-card"></i> Client Id</label>
<input type="text" id="node-config-input-clientid">
</div>
<div class="form-row">
<label for="node-config-input-authmechanism"><i class="fa fa-plug"></i> Auth Mechanism</label>
<input type="text" id="node-config-input-authmechanism">
</div>
<div class="form-row">
<label for="node-config-input-user"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-config-input-user">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="fa fa-key"></i> Password</label>
<input type="password" id="node-config-input-password">
</div>
<div class="form-row">
<label for="node-config-input-verifyservercert"><i class="fa fa-key"></i> Verify Server Cert</label>
<input type="checkbox" id="node-config-input-verifyservercert">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType("librdkafka-consumer", {
category: "network",
color: '#debd5c',
defaults: {
clientNode: {type: "librdkafka-client"},
name: {value: ""},
groupid: {value: "", required: true},
topic: {value: "", required: true},
frombeginning: {value: false},
},
inputs: 0,
outputs: 1,
icon: "kafka.svg",
paletteLabel: "kafka in",
label: function() {
return this.name || `kafka-consumer: ${this.topic}`;
}
});
</script>
<script type="text/html" data-template-name="librdkafka-consumer">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-clientNode"><i class="fa fa-server"></i>Connection</label>
<input type="text" id="node-input-clientNode">
</div>
<div class="form-row">
<label for="node-input-groupid"><i class="fa fa-group"></i> Group Id</label>
<input type="text" id="node-input-groupid">
</div>
<div class="form-row">
<label for="node-input-topic"><i class="fa fa-tag"></i> Topic</label>
<input type="text" id="node-input-topic">
</div>
<div class="form-row">
<label for="node-config-input-frombeginning"><i class="fa fa-key"></i> From Beginning</label>
<input type="checkbox" id="node-config-input-frombeginning">
</div>
</script>
<script type="text/html" data-help-name="librdkafka-consumer">
<p>A node for consuming kafka messages.</p>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">object</span>
</dt>
<dd> A JavaScript object with the data </dd>
</dl>
<h3>Details</h3>
<p><code>msg.payload</code> is used as the input data.</p>
<p>Input data is parsed using the configuration provided in the
<code>Description</code> setting. This configuration is an array of column
descriptions. Each column is described by a <code>width</code> and a
<code>name</code> properties</p>
</script>
<script type="text/javascript">
RED.nodes.registerType("librdkafka-producer", {
category: "network",
color: '#debd5c',
defaults: {
clientNode: {type: "librdkafka-client"},
name: {value: ""},
},
inputs: 1,
outputs: 1,
icon: "kafka.svg",
align: "right",
paletteLabel: "kafka out",
label: function() {
return this.name || `kafka-producer`;
}
});
</script>
<script type="text/html" data-template-name="librdkafka-producer">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-clientNode"><i class="fa fa-server"></i>Connection</label>
<input type="text" id="node-input-clientNode">
</div>
</script>
<script type="text/html" data-help-name="librdkafka-producer">
<p>A node for producing kafka messages.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">object</span>
</dt>
<dd> A JavaScript object with the topic and the payload to send</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">object</span>
</dt>
<dd> A JavaScript object with the data </dd>
</dl>
<h3>Details</h3>
<p><code>msg.payload</code> is used as the input data.</p>
<p>Input data is parsed using the configuration provided in the
<code>Description</code> setting. This configuration is an array of column
descriptions. Each column is described by a <code>width</code> and a
<code>name</code> properties</p>
</script>
<script type="text/javascript">
RED.nodes.registerType("librdkafka-admin", {
category: "network",
color: '#debd5c',
defaults: {
clientNode: {type: "librdkafka-client"},
name: {value: ""},
},
inputs: 1,
outputs: 1,
icon: "kafka.svg",
align: "right",
paletteLabel: "kafka admin",
label: function() {
return this.name || `kafka-admin`;
}
});
</script>
<script type="text/html" data-template-name="librdkafka-admin">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-clientNode"><i class="fa fa-server"></i>Connection</label>
<input type="text" id="node-input-clientNode">
</div>
</script>
<script type="text/html" data-help-name="librdkafka-admin">
<p>A node for administrate a kafka server.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">object</span>
</dt>
<dd> A JavaScript object with the topic and the payload to send</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">object</span>
</dt>
<dd> A JavaScript object with the data </dd>
</dl>
<h3>Details</h3>
<p><code>msg.payload</code> is used as the input data.</p>
<p>Input data is parsed using the configuration provided in the
<code>Description</code> setting. This configuration is an array of column
descriptions. Each column is described by a <code>width</code> and a
<code>name</code> properties</p>
</script>