本文整理汇总了TypeScript中azure-storage.createQueueService函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createQueueService函数的具体用法?TypeScript createQueueService怎么用?TypeScript createQueueService使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createQueueService函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: queueSigningRequest
function queueSigningRequest(quality: string, commit: string): Promise<void> {
const retryOperations = new azure.ExponentialRetryPolicyFilter();
const queueSvc = azure
.createQueueService(process.env['AZURE_STORAGE_ACCOUNT_2'], process.env['AZURE_STORAGE_ACCESS_KEY_2'])
.withFilter(retryOperations);
queueSvc.messageEncoder = new azure.QueueMessageEncoder.TextBase64QueueMessageEncoder();
const message = `${quality}/${commit}`;
return new Promise<void>((c, e) => queueSvc.createMessage('sign-darwin', message, err => err ? e(err) : c()));
}
示例2: it
it('should work with dev store', function (done) {
var connectionString = 'UseDevelopmentStorage=true';
var queueService = azure.createQueueService(connectionString);
assert.equal(queueService.storageAccount, StorageServiceClientConstants.DEVSTORE_STORAGE_ACCOUNT);
assert.equal(queueService.storageAccessKey, StorageServiceClientConstants.DEVSTORE_STORAGE_ACCESS_KEY);
var parsedHost = url.parse(queueService.host.primaryHost);
assert.equal(parsedHost.protocol, 'http:');
assert.equal(parsedHost.hostname, '127.0.0.1');
assert.equal(parsedHost.port, '10001');
done();
});
示例3: done
suite.setupSuite(function () {
queueService = azure.createQueueService().withFilter(new azure.ExponentialRetryPolicyFilter());
done();
});