This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Event, KeyedEvent and StringKeyedEvent types (#27)
- Loading branch information
1 parent
7eb6145
commit f4e659a
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH | ||
// | ||
// This file is part of the Restate service protocol, which is | ||
// released under the MIT license. | ||
// | ||
// You can find a copy of the license in file LICENSE in the root | ||
// directory of this repository or package, or at | ||
// https://github.com/restatedev/proto/blob/main/LICENSE | ||
|
||
syntax = "proto3"; | ||
|
||
package dev.restate; | ||
|
||
import "dev/restate/ext.proto"; | ||
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"; | ||
|
||
message Event { | ||
// Payload | ||
bytes payload = 2; | ||
|
||
// Metadata | ||
string source = 3; | ||
|
||
// This is filled by the source to retain ordering guarantees, depending on the source type | ||
bytes ordering_key = 1 [(dev.restate.ext.field) = KEY]; | ||
map<string, string> attributes = 15; | ||
} | ||
|
||
message KeyedEvent { | ||
// Payload | ||
bytes key = 1 [(dev.restate.ext.field) = KEY]; | ||
bytes payload = 2; | ||
|
||
// Metadata | ||
string source = 3; | ||
map<string, string> attributes = 15; | ||
} | ||
|
||
message StringKeyedEvent { | ||
// Payload | ||
string key = 1 [(dev.restate.ext.field) = KEY]; | ||
bytes payload = 2; | ||
|
||
// Metadata | ||
string source = 3; | ||
map<string, string> attributes = 15; | ||
} |