本文整理汇总了TypeScript中aws-sdk.Kinesis类的典型用法代码示例。如果您正苦于以下问题:TypeScript Kinesis类的具体用法?TypeScript Kinesis怎么用?TypeScript Kinesis使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Kinesis类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Kinesis
export const createKinesisClient = (conf: ClientConfig, endpoint?: string): Kinesis => {
const instance = new Kinesis(conf || {})
if (endpoint) {
instance.setEndpoint(endpoint)
}
return instance
}
示例2: Promise
return new Promise(function(resolve, reject) {
Kinesis.putRecord(kinesisRequest, function (error: any, data: any) {
if (error) return reject(error);
console.log("Successfully put to ExactTargetStatus stream with SequenceNumber of " + data.SequenceNumber);
return resolve(data);
});
})
示例3: done
const next = done => {
const params = {
StreamName: stream,
ExclusiveStartShardId: startShardId,
}
client.describeStream(params, (err, data) => {
if (err) {
return done(err)
}
if (!data.StreamDescription.HasMoreShards) {
foundAllShards = true
}
const lastShard = data.StreamDescription.Shards[data.StreamDescription.Shards.length - 1]
startShardId = lastShard.ShardId
shards = shards.concat(data.StreamDescription.Shards)
done()
})
}
示例4: describe
private describe(callback) {
this.kinesis.describeStream({ StreamName: this.name }, callback)
}