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

Commit

Permalink
Add Event, KeyedEvent and StringKeyedEvent types (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper authored Sep 11, 2023
1 parent 7eb6145 commit f4e659a
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions dev/restate/events.proto
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;
}

0 comments on commit f4e659a

Please sign in to comment.