Creating a HTTP2 server
- Create the Restate Server
- Bind one or multiple services to it.
- Listen on the specified port for connections and requests.
Customizing the HTTP2 server
Customizing the HTTP2 server
If you need to customize the HTTP2 server, or serve over HTTP1.1
you can call By default, this handler will advertise itself as working
bidirectionally; the SDK will try to get completions from the runtime
during execution.However, you can use the method
.Handler()
instead of Start()
, and then use the
handler as normal. To discover services over HTTP1.1 you must
provide the --use-http1.1
CLI flag..Bidirectional(false)
on the endpoint
builder to change this on platforms that do not support bidirectional
communication, such as Lambda. If you don’t do this your handler may get
stuck.Creating a Lambda handler
To register your service as a Lambda function change the endpoint into a Lambda handler with.LambdaHandler()
, and pass this handler to lambda.Start
.