Package dev.restate.sdk.testing
Class RestateRunnerBuilder
- java.lang.Object
-
- dev.restate.sdk.testing.RestateRunnerBuilder
-
public class RestateRunnerBuilder extends java.lang.ObjectBuilder forRestateRunner. SeeRestateRunnerfor more details.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RestateRunnerBuilderbind(dev.restate.sdk.common.syscalls.ServiceDefinition<?> serviceDefinition)Add a Restate service to the endpoint.<O> RestateRunnerBuilderbind(dev.restate.sdk.common.syscalls.ServiceDefinition<O> serviceDefinition, O options)Add a Restate service to the endpoint, setting the options.RestateRunnerBuilderbind(java.lang.Object service)Add a Restate service to the endpoint.ManualRestateRunnerbuildManualRunner()RestateRunnerbuildRunner()static RestateRunnerBuildercreate()static RestateRunnerBuilderof(dev.restate.sdk.http.vertx.RestateHttpEndpointBuilder endpointBuilder)Create fromRestateHttpEndpointBuilder.RestateRunnerBuilderwithAdditionalEnv(java.lang.String key, java.lang.String value)Add additional environment variables to the Restate container.RestateRunnerBuilderwithConfigFile(java.lang.String configFile)Mount a config file in the Restate container.RestateRunnerBuilderwithRestateContainerImage(java.lang.String restateContainerImage)Override the container image to use for the Restate runtime.
-
-
-
Method Detail
-
withRestateContainerImage
public RestateRunnerBuilder withRestateContainerImage(java.lang.String restateContainerImage)
Override the container image to use for the Restate runtime.
-
withAdditionalEnv
public RestateRunnerBuilder withAdditionalEnv(java.lang.String key, java.lang.String value)
Add additional environment variables to the Restate container.
-
withConfigFile
public RestateRunnerBuilder withConfigFile(java.lang.String configFile)
Mount a config file in the Restate container.
-
bind
public RestateRunnerBuilder 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 RestateRunnerBuilder bind(dev.restate.sdk.common.syscalls.ServiceDefinition<?> serviceDefinition)
Add a Restate service to the endpoint.To set the options, use
bind(ServiceDefinition, Object).
-
bind
public <O> RestateRunnerBuilder bind(dev.restate.sdk.common.syscalls.ServiceDefinition<O> serviceDefinition, O options)
Add a Restate service to the endpoint, setting the options.
-
buildManualRunner
public ManualRestateRunner buildManualRunner()
-
buildRunner
public RestateRunner buildRunner()
-
create
public static RestateRunnerBuilder create()
-
of
public static RestateRunnerBuilder of(dev.restate.sdk.http.vertx.RestateHttpEndpointBuilder endpointBuilder)
Create fromRestateHttpEndpointBuilder.
-
-