OptionaldefaultDefault service options that will be used by all services bind to this endpoint.
Options can be overridden on each service/handler.
Optionalhttp2HTTP/2 settings of the server.
Restate sends invocations as HTTP/2 streams over a few long-lived
connections, and opens another connection only when the existing ones
are close to their maxConcurrentStreams. A low maxConcurrentStreams
makes Restate open more connections, which lets connection-level load
balancing (for example an L4 load balancer in front of several replicas)
spread invocations evenly.
Restate Server versions before 1.7 don't open additional connections:
they use one connection per partition, so a low maxConcurrentStreams
also limits how many invocations of this endpoint run concurrently per
partition. Avoid lowering it if you run many concurrent invocations
against such a server.
OptionalidentityProvide a list of v1 request identity public keys eg publickeyv1_2G8dCQhArfvGpzPw5Vx2ALciR4xCLHfS5YaT93XjNxX9 to validate
incoming requests against, limiting requests to Restate clusters with the corresponding private keys. This public key format is
logged by the Restate process at startup if a request identity private key is provided.
If this function is called, all incoming requests irrelevant of endpoint type will be expected to have
x-restate-signature-scheme: v1 and x-restate-jwt-v1: <valid jwt signed with one of these keys>. If not called,
Optional ExperimentaljournalProvider for the codec to use for journal values. One codec will be instantiated globally for this endpoint. Check JournalValueCodec for more details
OptionalloggerReplace the default console-based LoggerTransport
Using console:
createEndpointHandler({ logger: (meta, message, ...o) => {console.log(`${meta.level}: `, message, ...o)}})
OptionalportPort to listen on. Defaults to the PORT environment variable, or 9080.
A list of Restate services, virtual objects, or workflows that will be exposed via the endpoint.
Options for creating an endpoint handler.