Skip to content

Commit 26e5687

Browse files
Change naming
1 parent 628d23b commit 26e5687

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • client-kotlin/src/main/kotlin/dev/restate/client/kotlin
  • sdk-api-kotlin/src/main/kotlin/dev/restate/sdk/kotlin

client-kotlin/src/main/kotlin/dev/restate/client/kotlin/ingress.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ internal constructor(
445445
* ```kotlin
446446
* client.toService<CounterKt>()
447447
* .request { add(1) }
448-
* .withOptions { idempotencyKey = "123" }
448+
* .options { idempotencyKey = "123" }
449449
* .call()
450450
* ```
451451
*
@@ -461,7 +461,7 @@ interface KClientRequest<Req, Res> : Request<Req, Res> {
461461
* @param block builder block for options
462462
* @return a new request with the configured options
463463
*/
464-
fun withOptions(block: InvocationOptions.Builder.() -> Unit): KClientRequest<Req, Res>
464+
fun options(block: InvocationOptions.Builder.() -> Unit): KClientRequest<Req, Res>
465465

466466
/**
467467
* Call the target handler and wait for the response.
@@ -553,7 +553,7 @@ private class KClientRequestImpl<Req, Res>(
553553
private val request: Request<Req, Res>,
554554
) : KClientRequest<Req, Res>, Request<Req, Res> by request {
555555

556-
override fun withOptions(block: InvocationOptions.Builder.() -> Unit): KClientRequest<Req, Res> {
556+
override fun options(block: InvocationOptions.Builder.() -> Unit): KClientRequest<Req, Res> {
557557
val builder = InvocationOptions.builder()
558558
builder.block()
559559
return KClientRequestImpl(

sdk-api-kotlin/src/main/kotlin/dev/restate/sdk/kotlin/api.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ private class KotlinStateImpl(
11431143
* ```kotlin
11441144
* toService<CounterKt>()
11451145
* .request { add(1) }
1146-
* .withOptions { idempotencyKey = "123" }
1146+
* .options { idempotencyKey = "123" }
11471147
* .call()
11481148
* ```
11491149
*
@@ -1160,7 +1160,7 @@ interface KRequest<Req, Res> : Request<Req, Res> {
11601160
* @return a new request with the configured options
11611161
*/
11621162
@org.jetbrains.annotations.ApiStatus.Experimental
1163-
fun withOptions(block: InvocationOptions.Builder.() -> Unit): KRequest<Req, Res>
1163+
fun options(block: InvocationOptions.Builder.() -> Unit): KRequest<Req, Res>
11641164

11651165
/**
11661166
* Call the target handler and return a [CallDurableFuture] for the result.
@@ -1297,7 +1297,7 @@ inline fun <reified SVC : Any> toWorkflow(key: String): KRequestBuilder<SVC> {
12971297
/** Implementation of [KRequest] for SDK context. */
12981298
private class KRequestImpl<Req, Res>(private val request: Request<Req, Res>) :
12991299
KRequest<Req, Res>, Request<Req, Res> by request {
1300-
override fun withOptions(block: InvocationOptions.Builder.() -> Unit): KRequest<Req, Res> {
1300+
override fun options(block: InvocationOptions.Builder.() -> Unit): KRequest<Req, Res> {
13011301
val builder = InvocationOptions.builder()
13021302
builder.block()
13031303
return KRequestImpl(

0 commit comments

Comments
 (0)