Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Introduce Awakeables service (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper authored Aug 18, 2023
1 parent a7ce45d commit 03afce9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
17 changes: 0 additions & 17 deletions dev/restate/core.proto

This file was deleted.

31 changes: 31 additions & 0 deletions dev/restate/services.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ syntax = "proto3";

package dev.restate;

import "google/protobuf/empty.proto";
import "google/protobuf/struct.proto";

option java_multiple_files = true;
option java_package = "dev.restate.generated";
option go_package = "restate.dev/sdk-go/pb";
Expand Down Expand Up @@ -32,4 +35,32 @@ message InvokeResponse {
// Generated unique invocation identifier.
// It can be used to retrieve the status of the invocation and cancel it.
string sid = 1;
}

service Awakeables {
// Resolve an Awakeable with a result value.
rpc Resolve(ResolveAwakeableRequest) returns (google.protobuf.Empty);
// Reject an Awakeable with a reason.
rpc Reject(RejectAwakeableRequest) returns (google.protobuf.Empty);
}

message ResolveAwakeableRequest {
// Base64 encoded identifier of the Awakeable to resolve.
string id = 1;

oneof result {
bytes bytes_result = 2;

// When executing requests to the ingress using JSON, you can pass a json_result directly for ease of use.
// json_result will be sent back to the awakeable as string encoded JSON, not as Protobuf value.
google.protobuf.Value json_result = 3;
}
}

message RejectAwakeableRequest {
// Base64 encoded identifier of the Awakeable to reject.
string id = 1;

// Rejection reason.
string reason = 2;
}

0 comments on commit 03afce9

Please sign in to comment.