UNPKG

ks3

Version:

本代码库为`金山云存储KS3`服务.主要提供`KS3 nodejs SDK`和`命令行工具`.

27 lines (26 loc) 933 B
var KS3 = require('..'); var xml2json = require("../lib/util").xml2json; const { ak, sk, bucketName, endpoint } = require('./const'); const client = new KS3({ ak, sk, bucket: bucketName, endpoint, proxyUrl: '', // 代理 URL,示例:http://example.com:3128 proxyAuth: { user: '', // 代理认证的用户名 pass: '' // 代理认证的密码 }, maxRetryTimes: 3, // 出错重试次数,默认3次(总共请求4次) retryStrategy: 'ExponentialWait', // 重试策略,支持设置为:ExponentialWait、FixedWait、LinearWait、JitterWait,默认值为ExponentialWait dnsCache: true, // 是否开启 DNS 缓存 timeout: 30 * 1000, // 超时时间,默认值为1h,单位为毫秒。 dnsCacheTimeout: 30 * 1000, // DNS缓存清理时间,默认30s followRedirect: true // secure: true }); module.exports = { xml2json, client, bucketName }