Decode kinesis data
parent
7e2216f692
commit
e84194e809
File diff suppressed because one or more lines are too long
|
|
@ -144,8 +144,7 @@ class AWS {
|
||||||
iterator = records.NextShardIterator;
|
iterator = records.NextShardIterator;
|
||||||
if (records.Records.length > 0) {
|
if (records.Records.length > 0) {
|
||||||
for (let index = 0; index < records.Records.length; index++) {
|
for (let index = 0; index < records.Records.length; index++) {
|
||||||
const record = records.Records[index].Data;
|
core.info(JSON.stringify(records.Records[index]));
|
||||||
core.info(AWS.ab2str(record));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||||
|
|
@ -170,9 +169,5 @@ class AWS {
|
||||||
core.info(`log: ${log}`);
|
core.info(`log: ${log}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static ab2str(buf) {
|
|
||||||
return String.fromCharCode.apply(undefined, new Uint16Array(buf));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
export default AWS;
|
export default AWS;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue