lib/client.js
function Client(options) {
  this.accessID = options.accessID;
  this.accessKey = options.accessKey;
  this.signatureMethod = options.signatureMethod || 'HmacSHA1';
  this.signatureVersion = options.signatureVersion || '1';
  this.APIVersion = options.APIVersion || '2013-05-10';
  this.APIHost = options.APIHost || 'http://ots.aliyuncs.com';
  // protocol: 'http:'
  // hostname: 'service.ots.aliyun.com'
  // port: undefined
  this.APIHostInfo = urlparse(this.APIHost);
  this.requestAgent = options.agent || null;
  this.requestTimeout = options.requestTimeout || 5000;
  var dnsCacheTime = options.dnsCacheTime || 10000;
  this.dns = CacheDNS.create({cacheTime: dnsCacheTime});
  this.vip = options.vip;
}
function Client(options) {
  this.accessID = options.accessID;
  this.accessKey = options.accessKey;
  this.signatureMethod = options.signatureMethod || 'HmacSHA1';
  this.signatureVersion = options.signatureVersion || '1';
  this.APIVersion = options.APIVersion || '2013-05-10';
  this.APIHost = options.APIHost || 'http://ots.aliyuncs.com';
  // protocol: 'http:'
  // hostname: 'service.ots.aliyun.com'
  // port: undefined
  this.APIHostInfo = urlparse(this.APIHost);
  this.requestAgent = options.agent || null;
  this.requestTimeout = options.requestTimeout || 5000;
  var dnsCacheTime = options.dnsCacheTime || 10000;
  this.dns = CacheDNS.create({cacheTime: dnsCacheTime});
  this.vip = options.vip;
}
function Client ( options ) { this . accessID = options . accessID ; this . accessKey = options . accessKey ; this . signatureMethod = options . signatureMethod || 'HmacSHA1' ; this . signatureVersion = options . signatureVersion || '1' ; this . APIVersion = options . APIVersion || '2013-05-10' ; this . APIHost = options . APIHost || 'http://ots.aliyuncs.com' ; // protocol: 'http:' // hostname: 'service.ots.aliyun.com' // port: undefined this . APIHostInfo = urlparse ( this . APIHost ) ; this . requestAgent = options . agent || null ; this . requestTimeout = options . requestTimeout || 5000 ; var dnsCacheTime = options . dnsCacheTime || 10000 ; this . dns = CacheDNS . create ( { cacheTime : dnsCacheTime } ) ; this . vip = options . vip ; }
OTS Client.

@param {Object} options
- {String} accessID
- {String} accessKey
- {Number} [requestTimeout], default 5000ms.
- {Agent} [http] request agent, default is `urllib.agent`.
- {Number} [dnsCacheTime] dns cache time, default is `10000 ms`.
- {String} [APIVersion] api version, default is '2013-05-10'.
- {String} [APIHost] api host URL, default is 'http://service.ots.aliyun.com'.
- {Object} [vip] OTS vip manager, only use for alibaba-inc. @suqian.yf
@constructor
OTS Client .