Skip to content

Commit 1d9f91a

Browse files
author
Guy Bedford
authored
feat: support backend property hostcalls (#1002)
1 parent 4c2b95f commit 1d9f91a

24 files changed

+1169
-60
lines changed

documentation/docs/backend/Backend/Backend.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ async function app() {
197197
firstByteTimeout: 15000,
198198
betweenBytesTimeout: 10000,
199199
useSSL: true,
200-
sslMinVersion: 1.3,
201-
sslMaxVersion: 1.3,
200+
tlsMinVersion: 1.3,
201+
tlsMaxVersion: 1.3,
202202
});
203203
return fetch('https://www.fastly.com/', {
204204
backend // Here we are configuring this request to use the backend from above.
@@ -238,8 +238,8 @@ async function app() {
238238
firstByteTimeout: 15000,
239239
betweenBytesTimeout: 10000,
240240
useSSL: true,
241-
sslMinVersion: 1.3,
242-
sslMaxVersion: 1.3,
241+
tlsMinVersion: 1.3,
242+
tlsMaxVersion: 1.3,
243243
});
244244
return fetch('https://www.fastly.com/', {
245245
backend // Here we are configuring this request to use the backend from above.

documentation/docs/backend/Backend/health.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ pagination_prev: null
77

88
# Backend.health()
99

10+
:::info
11+
12+
This method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.
13+
14+
:::
15+
1016
The **`Backend.health()`** method returns a string representing the health of the given Backend instance.
1117

1218
## Syntax
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.betweenBytesTimeout
9+
10+
The read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number
11+
providing the between bytes timeout for this backend in milliseconds.
12+
13+
When not set or in environments that do not support this property (such as Viceroy), `null`
14+
may be returned.
15+
16+
## Value
17+
18+
A `number` or `null`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.connectTimeout
9+
10+
The read-only **`connectTimeout`** property of a `Backend` instance is an integer number
11+
providing the connect timeout for this backend in milliseconds.
12+
13+
When not set or in environments that do not support this property (such as Viceroy), `null`
14+
may be returned.
15+
16+
## Value
17+
18+
A `number` or `null`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.firstByteTimeout
9+
10+
The read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number
11+
providing the first byte timeout for this backend in milliseconds.
12+
13+
When not set or in environments that do not support this property (such as Viceroy), `null`
14+
may be returned.
15+
16+
## Value
17+
18+
A `number` or `null`.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.prototype.health()
9+
10+
The **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.
11+
12+
## Syntax
13+
14+
```js
15+
health()
16+
```
17+
18+
### Return value
19+
20+
A string representing the health of the specified Backend value.
21+
22+
Possible values are:
23+
- `"healthy"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.
24+
- `"unhealthy"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.
25+
- `"unknown"` - The backend does not have a health check configured.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.hostOverride
9+
10+
The read-only **`hostOverride`** property of a `Backend` instance is the host header
11+
override string used when sending requests to this backend.
12+
13+
## Value
14+
15+
A `string`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.httpKeepaliveTime
9+
10+
The read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive
11+
time for this backend in milliseconds, or 0 if no keepalive is set.
12+
13+
## Value
14+
15+
A `number`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.isDynamic
9+
10+
The read-only **`isDynamic`** property of a `Backend` instance is a boolean
11+
indicating if the backend was dynamically created for this service.
12+
13+
## Value
14+
15+
A `boolean`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Backend.isSSL
9+
10+
The read-only **`isSSL`** property of a `Backend` instance is a boolean
11+
indicating if the backend is using an SSL connection.
12+
13+
## Value
14+
15+
A `boolean`.

0 commit comments

Comments
 (0)