Skip to content

Type Alias: BuildHTTPServiceProxyOptions ​

说明

本页由源码中的注释生成,内容为英文。

BuildHTTPServiceProxyOptions = object

The options of an HTTPServiceProxy, given to buildHTTPServiceProxy.

Properties ​

clientId? ​

readonly optional clientId?: string

The client's id, sent as the id header of the calls and the id query parameter of the event stream: the service's ServiceContext.clientId, which Entrypoint.notify() pushes events to. Give a stable one to receive the events across restarts. At most 200 characters.

Default ​

ts
a random UUID

headers? ​

readonly optional headers?: Record<string, string>

The headers sent with each call and with the event stream, such as {Authorization: 'Bearer <token>'}.


reconnectDelay? ​

readonly optional reconnectDelay?: number

The delay, in milliseconds, before the event stream is opened again once it ended or failed (the service restarted, unreachable). A non-negative integer.

Default ​

ts
1000

url ​

readonly url: string

The address of the service: the URL of its httpServiceEntrypoint, with the adapter's path (http://inventory:3000/, https://orders.internal/rpc).

Released under the MIT License.