@jeffusion/bungee-types 3.3.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/types.d.ts +45 -31
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -85,6 +85,47 @@ export interface StickySessionConfig {
85
85
  enabled: boolean;
86
86
  keyExpression?: string;
87
87
  }
88
+ export interface RouteTimeoutsConfig {
89
+ connectMs?: number;
90
+ requestMs?: number;
91
+ }
92
+ export interface FailoverPassiveHealthConfig {
93
+ consecutiveFailures?: number;
94
+ healthySuccesses?: number;
95
+ autoDisableThreshold?: number;
96
+ autoEnableOnActiveHealthCheck?: boolean;
97
+ }
98
+ export interface FailoverRecoveryConfig {
99
+ probeIntervalMs?: number;
100
+ probeTimeoutMs?: number;
101
+ }
102
+ export interface FailoverSlowStartConfig {
103
+ enabled: boolean;
104
+ durationMs?: number;
105
+ initialWeightFactor?: number;
106
+ }
107
+ export interface FailoverHealthCheckConfig {
108
+ enabled: boolean;
109
+ intervalMs?: number;
110
+ timeoutMs?: number;
111
+ path?: string;
112
+ method?: string;
113
+ expectedStatus?: number[];
114
+ unhealthyThreshold?: number;
115
+ healthyThreshold?: number;
116
+ body?: string;
117
+ contentType?: string;
118
+ headers?: Record<string, string>;
119
+ query?: Record<string, string>;
120
+ }
121
+ export interface FailoverConfig {
122
+ enabled: boolean;
123
+ retryOn?: number | string | (number | string)[];
124
+ passiveHealth?: FailoverPassiveHealthConfig;
125
+ recovery?: FailoverRecoveryConfig;
126
+ slowStart?: FailoverSlowStartConfig;
127
+ healthCheck?: FailoverHealthCheckConfig;
128
+ }
88
129
  export interface RouteConfig extends ModificationRules {
89
130
  path: string;
90
131
  pathRewrite?: Record<string, string>;
@@ -92,37 +133,8 @@ export interface RouteConfig extends ModificationRules {
92
133
  plugins?: Array<PluginConfig | string>;
93
134
  stickySession?: StickySessionConfig;
94
135
  upstreams: Upstream[];
95
- failover?: {
96
- enabled: boolean;
97
- retryableStatusCodes?: number | string | (number | string)[];
98
- consecutiveFailuresThreshold?: number;
99
- recoveryIntervalMs?: number;
100
- recoveryTimeoutMs?: number;
101
- healthyThreshold?: number;
102
- requestTimeoutMs?: number;
103
- connectTimeoutMs?: number;
104
- autoDisableThreshold?: number;
105
- autoEnableOnHealthCheck?: boolean;
106
- slowStart?: {
107
- enabled: boolean;
108
- durationMs?: number;
109
- initialWeightFactor?: number;
110
- };
111
- healthCheck?: {
112
- enabled: boolean;
113
- intervalMs?: number;
114
- timeoutMs?: number;
115
- path?: string;
116
- method?: string;
117
- expectedStatus?: number[];
118
- unhealthyThreshold?: number;
119
- healthyThreshold?: number;
120
- body?: string;
121
- contentType?: string;
122
- headers?: Record<string, string>;
123
- query?: Record<string, string>;
124
- };
125
- };
136
+ timeouts?: RouteTimeoutsConfig;
137
+ failover?: FailoverConfig;
126
138
  }
127
139
  export interface LoggingConfig {
128
140
  body?: {
@@ -166,6 +178,8 @@ export interface PluginConfig {
166
178
  enabled?: boolean;
167
179
  }
168
180
  export interface AppConfig {
181
+ configVersion?: number;
182
+ logLevel?: string;
169
183
  bodyParserLimit?: string;
170
184
  auth?: AuthConfig;
171
185
  logging?: LoggingConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeffusion/bungee-types",
3
- "version": "3.3.0",
3
+ "version": "4.0.0",
4
4
  "description": "TypeScript type definitions for Bungee",
5
5
  "main": "./dist/index.d.ts",
6
6
  "types": "./dist/index.d.ts",