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
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Aug 14, 2023
1 parent a7ce45d commit ab1592b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
17 changes: 0 additions & 17 deletions dev/restate/core.proto

This file was deleted.

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

package dev.restate;

import "google/protobuf/empty.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 +34,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 {
// Complete an awakeable
rpc Complete(CompleteAwakeableRequest) returns (google.protobuf.Empty);
// Fail an awakeable
rpc Fail(FailAwakeableRequest) returns (google.protobuf.Empty);
}

message CompleteAwakeableRequest {
// Base64 encoded identifier of the awakeable to complete
string id = 1;

// Argument of the invocation.
//
// When executing requests to the ingress using JSON, this field will be parsed as any JSON,
// such as string, object or number.
// When executing requests to the ingress using Protobuf, this field must be bytes.
// The SDK will parse those bytes using the deserializer specified in the user code.
bytes result = 2;
}

message FailAwakeableRequest {
// Base64 encoded identifier of the awakeable to fail
string id = 1;

// Failure reason
string reason = 2;
}

0 comments on commit ab1592b

Please sign in to comment.