Package dev.restate.sdk.lambda
Class RestateLambdaEndpointBuilder
java.lang.Object
dev.restate.sdk.lambda.RestateLambdaEndpointBuilder
Endpoint builder for a Restate AWS Lambda Endpoint, to serve Restate service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind(dev.restate.sdk.common.syscalls.ServiceDefinition<?> service) Add a Restate service to the endpoint.bind(dev.restate.sdk.common.syscalls.ServiceDefinition<O> serviceDefinition, O options) Add a Restate service to the endpoint, setting the options.Add a Restate service to the endpoint.build()Build theRestateLambdaEndpointserving the Restate service endpoint.withOpenTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry) Add aOpenTelemetryimplementation for tracing and metrics.withRequestIdentityVerifier(dev.restate.sdk.auth.RequestIdentityVerifier requestIdentityVerifier) Set the request identity verifier for this endpoint.
-
Constructor Details
-
RestateLambdaEndpointBuilder
public RestateLambdaEndpointBuilder()
-
-
Method Details
-
bind
Add a Restate service to the endpoint. This will automatically discover the generated factory based on the class name.You can also manually instantiate the
ServiceDefinitionusingbind(ServiceDefinition). -
bind
public RestateLambdaEndpointBuilder bind(dev.restate.sdk.common.syscalls.ServiceDefinition<?> service) Add a Restate service to the endpoint.To set the options, use
bind(ServiceDefinition, Object). -
bind
public <O> RestateLambdaEndpointBuilder bind(dev.restate.sdk.common.syscalls.ServiceDefinition<O> serviceDefinition, O options) Add a Restate service to the endpoint, setting the options. -
withOpenTelemetry
public RestateLambdaEndpointBuilder withOpenTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry) Add aOpenTelemetryimplementation for tracing and metrics.- See Also:
-
OpenTelemetry
-
withRequestIdentityVerifier
public RestateLambdaEndpointBuilder withRequestIdentityVerifier(dev.restate.sdk.auth.RequestIdentityVerifier requestIdentityVerifier) Set the request identity verifier for this endpoint.For the Restate implementation to use with Restate Cloud, check the module
sdk-request-identity. -
enablePreviewContext
-
build
Build theRestateLambdaEndpointserving the Restate service endpoint.
-