RedisOptions.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.DEFAULT_REDIS_OPTIONS = void 0;
  4. exports.DEFAULT_REDIS_OPTIONS = {
  5. // Connection
  6. port: 6379,
  7. host: "localhost",
  8. family: 0,
  9. connectTimeout: 10000,
  10. disconnectTimeout: 2000,
  11. retryStrategy: function (times) {
  12. return Math.min(times * 50, 2000);
  13. },
  14. keepAlive: 0,
  15. noDelay: true,
  16. connectionName: null,
  17. disableClientInfo: false,
  18. clientInfoTag: undefined,
  19. // Sentinel
  20. sentinels: null,
  21. name: null,
  22. role: "master",
  23. sentinelRetryStrategy: function (times) {
  24. return Math.min(times * 10, 1000);
  25. },
  26. sentinelReconnectStrategy: function () {
  27. // This strategy only applies when sentinels are used for detecting
  28. // a failover, not during initial master resolution.
  29. // The deployment can still function when some of the sentinels are down
  30. // for a long period of time, so we may not want to attempt reconnection
  31. // very often. Therefore the default interval is fairly long (1 minute).
  32. return 60000;
  33. },
  34. natMap: null,
  35. enableTLSForSentinelMode: false,
  36. updateSentinels: true,
  37. failoverDetector: false,
  38. // Status
  39. username: null,
  40. password: null,
  41. db: 0,
  42. // Others
  43. enableOfflineQueue: true,
  44. enableReadyCheck: true,
  45. autoResubscribe: true,
  46. autoResendUnfulfilledCommands: true,
  47. lazyConnect: false,
  48. keyPrefix: "",
  49. reconnectOnError: null,
  50. readOnly: false,
  51. stringNumbers: false,
  52. maxRetriesPerRequest: 20,
  53. maxLoadingRetryTime: 10000,
  54. enableAutoPipelining: false,
  55. autoPipeliningIgnoredCommands: [],
  56. sentinelMaxConnections: 10,
  57. blockingTimeoutGrace: 100,
  58. };