Skip to content

Commit

Permalink
add api flows for negotiating a sankey upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Snow Pettersen committed Oct 21, 2024
1 parent e68806b commit 10e9aad
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/bitdrift_public/protobuf/client/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ message ApiRequest {
OpaqueConfigurationUpdateAck opaque_configuration_update_ack = 8;
OpaqueRequest opaque_upload = 9;
SankeyDiagramUploadRequest sankey_diagram_upload = 10;
SankeyIntentRequest sankey_intent = 11;
}
}

Expand All @@ -220,6 +221,15 @@ message SankeyDiagramUploadRequest {
repeated Node nodes = 3 [(validate.rules).repeated = {min_items: 1}];
}

// A request to ask whether to upload a Sankey path.
message SankeyIntentRequest {
// The UUID of the intent being negotiated. This is used to correlate the response with the request.
string intent_uuid = 1 [(validate.rules).string = {min_len: 1}];

// The ID of the path that is being considered for upload.
string path_id = 2 [(validate.rules).string = {min_len: 1}];
}

// The response sent as part of stream establishment.
message HandshakeResponse {
message StreamSettings {
Expand Down Expand Up @@ -404,6 +414,20 @@ message FlushBuffers {
message SankeyDiagramUploadResponse {
}

// The response to Sankey diagram intent request.
message SankeyIntentResponse {
enum Decision {
// The diagram should be uploaded.
UPLOAD = 0;
// The diagram should be dropped.
DROP = 1;
}

string intent_uuid = 1 [(validate.rules).string = {min_len: 1}];

Decision decision = 2;
}

// A multiplexed response sent over the bitdrift API.
message ApiResponse {
oneof response_type {
Expand All @@ -421,6 +445,7 @@ message ApiResponse {
OpaqueConfigurationUpdate opaque_configuration_update = 10;
OpaqueResponse opaque_upload = 11;
SankeyDiagramUploadResponse sankey_diagram_upload = 12;
SnakeyIntentResponse sankey_intent_response = 13;

Check failure on line 448 in src/bitdrift_public/protobuf/client/v1/api.proto

View workflow job for this annotation

GitHub Actions / test

field bitdrift_public.protobuf.client.v1.ApiResponse.sankey_intent_response: unknown type SnakeyIntentResponse
}
}

Expand Down

0 comments on commit 10e9aad

Please sign in to comment.