greet: function*(name: string) {
return `Hello, ${name}!`;
},
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as restate from "@restatedev/restate-sdk"; | |
| import {RestatePromise, TerminalError} from "@restatedev/restate-sdk"; | |
| import {readFile} from "fs/promises"; | |
| import {join} from "path"; | |
| import type * as dosswf from "./workflow_dsl_types" | |
| import * as dosswfruntime from "./workflow_interpreter_runtime" | |
| type ActionStackElement = { id: number, stepIds: string[] }; | |
| type ExecuteRequest = { | |
| steps: dosswf.ActionStep[]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Service | |
| @CustomSerdeFactory(ProtobufConfluentSerdeFactory::class) | |
| class Greeter { | |
| @Handler | |
| suspend fun greet(ctx: Context, name: MyMessage): MyMessage { | |
| TODO("") | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package my.example | |
| import dev.restate.sdk.annotation.CustomSerdeFactory | |
| import dev.restate.sdk.annotation.Handler | |
| import dev.restate.sdk.annotation.Service | |
| import dev.restate.sdk.http.vertx.RestateHttpServer | |
| import dev.restate.sdk.kotlin.* | |
| import dev.restate.sdk.kotlin.endpoint.endpoint | |
| import dev.restate.serde.kotlinx.KotlinSerializationSerdeFactory | |
| import io.github.smiley4.schemakenerator.core.annotations.Default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as restate from "@restatedev/restate-sdk"; | |
| import { v4 as uuid } from 'uuid'; | |
| import {TerminalError} from "@restatedev/restate-sdk"; | |
| type FlightRequest = { flightId: string, passengerName: string }; | |
| type CarRequest = { pickupLocation: string, rentalDate: string }; | |
| type PaymentRequest = { cardNumber: string, amount: number }; | |
| type BookingRequest = { flight: FlightRequest, car: CarRequest, payment: PaymentRequest }; | |
| const booking = restate.service({ |
I'm pleased to announce the release of Java/Kotlin SDK 2.0, in combination with Restate 1.3. Check out the announcement blog post for more details about Restate 1.3 and the new SDK features: [TODO link]
Below are the changes specific to the Java/Kotlin SDK.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: sacura |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.vertx.core.Handler | |
| import io.vertx.core.http.HttpMethod | |
| import io.vertx.ext.web.Router | |
| import io.vertx.ext.web.RoutingContext | |
| import io.vertx.ext.web.handler.* | |
| import io.vertx.ext.web.sstore.LocalSessionStore | |
| import io.vertx.core.Vertx | |
| import io.vertx.kotlin.core.deployVerticleAwait | |
| import io.vertx.kotlin.core.http.listenAwait | |
| import io.vertx.kotlin.core.json.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.vertx.core.AbstractVerticle; | |
| import io.vertx.core.Future; | |
| import io.vertx.core.Vertx; | |
| import io.vertx.ext.web.Router; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| public class MainVerticle extends AbstractVerticle { | |
| public final static Logger log = LoggerFactory.getLogger(MainVerticle.class); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to create prod version of project (concat all deps in one single file) | |
| cd "$(dirname "$0")" | |
| rm -f main_prod.c | |
| tempfile=$(mktemp) | |
| tempmain=$(mktemp) | |
| cat main.c > "$tempmain" |
NewerOlder