Skip to content

Commit 290a443

Browse files
authored
feat(lb): enable http3 and add host header field in HL (#246)
1 parent a1e71a4 commit 290a443

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

packages/clients/src/api/lb/v1/marshalling.gen.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ const unmarshalHealthCheckHttpConfig = (data: unknown) => {
130130

131131
return {
132132
code: data.code,
133+
hostHeader: data.host_header,
133134
method: data.method,
134135
uri: data.uri,
135136
} as HealthCheckHttpConfig
@@ -144,7 +145,9 @@ const unmarshalHealthCheckHttpsConfig = (data: unknown) => {
144145

145146
return {
146147
code: data.code,
148+
hostHeader: data.host_header,
147149
method: data.method,
150+
sni: data.sni,
148151
uri: data.uri,
149152
} as HealthCheckHttpsConfig
150153
}
@@ -423,6 +426,7 @@ export const unmarshalFrontend = (data: unknown) => {
423426
: undefined,
424427
certificateIds: data.certificate_ids,
425428
createdAt: unmarshalDate(data.created_at),
429+
enableHttp3: data.enable_http3,
426430
id: data.id,
427431
inboundPort: data.inbound_port,
428432
lb: data.lb ? unmarshalLb(data.lb) : undefined,
@@ -756,6 +760,7 @@ const marshalHealthCheckHttpConfig = (
756760
defaults: DefaultValues,
757761
): Record<string, unknown> => ({
758762
code: request.code,
763+
host_header: request.hostHeader,
759764
method: request.method,
760765
uri: request.uri,
761766
})
@@ -765,7 +770,9 @@ const marshalHealthCheckHttpsConfig = (
765770
defaults: DefaultValues,
766771
): Record<string, unknown> => ({
767772
code: request.code,
773+
host_header: request.hostHeader,
768774
method: request.method,
775+
sni: request.sni,
769776
uri: request.uri,
770777
})
771778

@@ -1008,6 +1015,7 @@ export const marshalCreateFrontendRequest = (
10081015
backend_id: request.backendId,
10091016
certificate_id: request.certificateId,
10101017
certificate_ids: request.certificateIds,
1018+
enable_http3: request.enableHttp3,
10111019
inbound_port: request.inboundPort,
10121020
name: request.name || randomName('lbf'),
10131021
timeout_client: request.timeoutClient,
@@ -1171,6 +1179,7 @@ export const marshalUpdateFrontendRequest = (
11711179
backend_id: request.backendId,
11721180
certificate_id: request.certificateId,
11731181
certificate_ids: request.certificateIds,
1182+
enable_http3: request.enableHttp3,
11741183
inbound_port: request.inboundPort,
11751184
name: request.name,
11761185
timeout_client: request.timeoutClient,
@@ -1374,6 +1383,7 @@ export const marshalZonedApiCreateFrontendRequest = (
13741383
backend_id: request.backendId,
13751384
certificate_id: request.certificateId,
13761385
certificate_ids: request.certificateIds,
1386+
enable_http3: request.enableHttp3,
13771387
inbound_port: request.inboundPort,
13781388
name: request.name || randomName('lbf'),
13791389
timeout_client: request.timeoutClient,
@@ -1544,6 +1554,7 @@ export const marshalZonedApiUpdateFrontendRequest = (
15441554
backend_id: request.backendId,
15451555
certificate_id: request.certificateId,
15461556
certificate_ids: request.certificateIds,
1557+
enable_http3: request.enableHttp3,
15471558
inbound_port: request.inboundPort,
15481559
name: request.name,
15491560
timeout_client: request.timeoutClient,

packages/clients/src/api/lb/v1/types.gen.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ export interface Frontend {
315315
certificateIds: Array<string>
316316
createdAt?: Date
317317
updatedAt?: Date
318+
enableHttp3: boolean
318319
}
319320

320321
/** Health check */
@@ -378,16 +379,36 @@ export interface HealthCheck {
378379
checkSendProxy: boolean
379380
}
380381

382+
/** Health check. http config */
381383
export interface HealthCheckHttpConfig {
384+
/** HTTP uri used with the request */
382385
uri: string
386+
/** HTTP method used with the request */
383387
method: string
388+
/**
389+
* A health check response will be considered as valid if the response's
390+
* status code match
391+
*/
384392
code?: number
393+
/** HTTP host header used with the request */
394+
hostHeader: string
385395
}
386396

397+
/** Health check. https config */
387398
export interface HealthCheckHttpsConfig {
399+
/** HTTP uri used with the request */
388400
uri: string
401+
/** HTTP method used with the request */
389402
method: string
403+
/**
404+
* A health check response will be considered as valid if the response's
405+
* status code match
406+
*/
390407
code?: number
408+
/** HTTP host header used with the request */
409+
hostHeader: string
410+
/** Specifies the SNI to use to do health checks over SSL */
411+
sni: string
391412
}
392413

393414
export interface HealthCheckLdapConfig {}
@@ -1085,6 +1106,8 @@ export type CreateFrontendRequest = {
10851106
certificateId?: string
10861107
/** List of certificate IDs to bind on the frontend */
10871108
certificateIds?: Array<string>
1109+
/** Activate HTTP 3 protocol (beta) */
1110+
enableHttp3: boolean
10881111
}
10891112

10901113
export type GetFrontendRequest = {
@@ -1111,6 +1134,8 @@ export type UpdateFrontendRequest = {
11111134
certificateId?: string
11121135
/** List of certificate IDs to bind on the frontend */
11131136
certificateIds?: Array<string>
1137+
/** Activate HTTP 3 protocol (beta) */
1138+
enableHttp3: boolean
11141139
}
11151140

11161141
export type DeleteFrontendRequest = {
@@ -1906,6 +1931,8 @@ export type ZonedApiCreateFrontendRequest = {
19061931
certificateId?: string
19071932
/** List of certificate IDs to bind on the frontend */
19081933
certificateIds?: Array<string>
1934+
/** Activate HTTP 3 protocol (beta) */
1935+
enableHttp3: boolean
19091936
}
19101937

19111938
export type ZonedApiGetFrontendRequest = {
@@ -1932,6 +1959,8 @@ export type ZonedApiUpdateFrontendRequest = {
19321959
certificateId?: string
19331960
/** List of certificate IDs to bind on the frontend */
19341961
certificateIds?: Array<string>
1962+
/** Activate HTTP 3 protocol (beta) */
1963+
enableHttp3: boolean
19351964
}
19361965

19371966
export type ZonedApiDeleteFrontendRequest = {

0 commit comments

Comments
 (0)