Package dev.restate.sdk.lambda
Class RestateLambdaEndpointBuilder
- java.lang.Object
-
- dev.restate.sdk.lambda.RestateLambdaEndpointBuilder
-
public final class RestateLambdaEndpointBuilder extends java.lang.ObjectEndpoint builder for a Restate AWS Lambda Endpoint, to serve Restate service.
-
-
Constructor Summary
Constructors Constructor Description RestateLambdaEndpointBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestateLambdaEndpointBuilderbind(dev.restate.sdk.common.syscalls.ServiceDefinition<?> service)Add a Restate service to the endpoint.<O> RestateLambdaEndpointBuilderbind(dev.restate.sdk.common.syscalls.ServiceDefinition<O> serviceDefinition, O options)Add a Restate service to the endpoint, setting the options.RestateLambdaEndpointBuilderbind(java.lang.Object service)Add a Restate service to the endpoint.RestateLambdaEndpointbuild()Build theRestateLambdaEndpointserving the Restate service endpoint.RestateLambdaEndpointBuilderenablePreviewContext()RestateLambdaEndpointBuilderwithOpenTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry)Add aOpenTelemetryimplementation for tracing and metrics.RestateLambdaEndpointBuilderwithRequestIdentityVerifier(dev.restate.sdk.auth.RequestIdentityVerifier requestIdentityVerifier)Set the request identity verifier for this endpoint.
-
-
-
Method Detail
-
bind
public RestateLambdaEndpointBuilder bind(java.lang.Object service)
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
public RestateLambdaEndpointBuilder enablePreviewContext()
-
build
public RestateLambdaEndpoint build()
Build theRestateLambdaEndpointserving the Restate service endpoint.
-
-