Class RestateLambdaEndpointBuilder

java.lang.Object
dev.restate.sdk.lambda.RestateLambdaEndpointBuilder

public final class RestateLambdaEndpointBuilder extends Object
Endpoint builder for a Restate AWS Lambda Endpoint, to serve Restate service.
  • Constructor Details

    • RestateLambdaEndpointBuilder

      public RestateLambdaEndpointBuilder()
  • Method Details

    • bind

      public RestateLambdaEndpointBuilder bind(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 ServiceDefinition using bind(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 a OpenTelemetry implementation 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 the RestateLambdaEndpoint serving the Restate service endpoint.