Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup prerelease for streaming aggregate events #115

Merged
merged 17 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Contracts CI/CD

env:
PRERELEASE_BRANCHES: mithrandir
PRERELEASE_BRANCHES: treebeard

on:
push:
Expand Down
4 changes: 3 additions & 1 deletion Source/Runtime/Events/Committed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ message CommittedAggregateEvents {
artifacts.Artifact eventType = 4;
bool public = 5;
string content = 6;
uint64 aggregateRootVersion = 7; // The aggregate root version the event was applied to
}
string eventSourceId = 1;
protobuf.Uuid aggregateRootId = 2;
uint64 aggregateRootVersion = 3;
uint64 aggregateRootVersion = 3 [deprecated = true]; // DEPRECATED Replaced by currentAggregateRootVersion
repeated CommittedAggregateEvent events = 4;
uint64 currentAggregateRootVersion = 5; // Represents the current version of the aggregate root
}
18 changes: 17 additions & 1 deletion Source/Runtime/Events/EventStore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

syntax = "proto3";

import "Artifacts/Artifact.proto";
import "Protobuf/Failure.proto";
import "Services/CallContext.proto";
import "Runtime/Events/Aggregate.proto";
Expand All @@ -28,6 +29,20 @@ message FetchForAggregateRequest {
services.CallRequestContext callContext = 1;
Aggregate aggregate = 2;
woksin marked this conversation as resolved.
Show resolved Hide resolved
}
message FetchForAggregateInBatchesRequest {
services.CallRequestContext callContext = 1;
Aggregate aggregate = 2;
oneof Request {
FetchAllEventsForAggregateInBatchesRequest fetchAllEvents = 3;
FetchEventsForAggregateInBatchesRequest fetchEvents = 4;
}
}
message FetchAllEventsForAggregateInBatchesRequest {
}

message FetchEventsForAggregateInBatchesRequest {
repeated artifacts.Artifact eventTypes = 1;
}

message CommitEventsResponse {
protobuf.Failure failure = 1; // not set if not failed
Expand All @@ -48,5 +63,6 @@ message FetchForAggregateResponse {
service EventStore {
rpc Commit(CommitEventsRequest) returns(CommitEventsResponse);
rpc CommitForAggregate(CommitAggregateEventsRequest) returns(CommitAggregateEventsResponse);
rpc FetchForAggregate(FetchForAggregateRequest) returns(FetchForAggregateResponse);
rpc FetchForAggregate(FetchForAggregateRequest) returns(FetchForAggregateResponse); // DEPRECATED: This is superseeded by FetchForAggregateInBatches
rpc FetchForAggregateInBatches(FetchForAggregateInBatchesRequest) returns (stream FetchForAggregateResponse);
}