Skip to content

PURISTA API


PURISTA API / @purista/base-http-bridge / getDefaultHttpEventBridgeConfig

Function: getDefaultHttpEventBridgeConfig()

getDefaultHttpEventBridgeConfig(): object

Defined in: base-http-bridge/src/HttpEventBridge/getDefaultHttpEventBridgeConfig.impl.ts:5

Returns

apiPrefix?

optional apiPrefix?: string

the prefix to be used if the command is configured as REST api endpoint according to the OpenAPI definition needs to enableRestApiExpose set to true

Default

ts
/api

commandPayloadAsCloudEvent?

optional commandPayloadAsCloudEvent?: boolean

command invocations are wrapped in CloudEvent

CloudEvents specification v1.0: https://github.com/cloudevents/spec/tree/v1.0

Default

ts
false

defaultCommandTimeout?

optional defaultCommandTimeout?: number

Overwrite the hardcoded default timeout of command invocations

enableHttpCompression?

optional enableHttpCompression?: boolean

enable HTTP compression in web server

Default

ts
true

enableRestApiExpose?

optional enableRestApiExpose?: boolean

expose commands as regular REST endpoints when they are configured as endpoints

Default

ts
true

instanceId?

optional instanceId?: string

The instance id of the event bridge. If not set, a id will generated each time a instance is created. Use this if there is a need to always have the same instance id.

logger?

optional logger?: Logger

logLevel?

optional logLevel?: LogLevelName

metrics?

optional metrics?: PuristaMetricsRuntimeOptions

metricsRecorder?

optional metricsRecorder?: PuristaMetricsRecorderInterface

name?

optional name?: string

pathPrefix?

optional pathPrefix?: string

the prefix to be used for exposing commands as endpoints expecting a event bus message

Default

ts
purista

serverHost?

optional serverHost?: string

Host of the server.

Default

ts
127.0.0.1

serverPort?

optional serverPort?: number

Port of the server.

Default

ts
8080

spanProcessor?

optional spanProcessor?: SpanProcessor

subscriptionPayloadAsCloudEvent?

optional subscriptionPayloadAsCloudEvent?: boolean

subscription invocations are wrapped in CloudEvent

CloudEvents specification v1.0: https://github.com/cloudevents/spec/tree/v1.0

Default

ts
false