Skip to content

Commit 79752f2

Browse files
amamounelsayedpragnagopa
authored andcommitted
Add support for TypedDataCollection
1 parent b447994 commit 79752f2

File tree

7 files changed

+454
-100
lines changed

7 files changed

+454
-100
lines changed

src/WebJobs.Script.Grpc/azure-functions-language-worker-protobuf/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ From within the Azure Functions language worker repo:
3030
- `git fetch proto-file refs/tags/<tag-name>`
3131
- Example: `git fetch proto-file refs/tags/v1.1.0-protofile`
3232
3. Merge updates
33-
- Merge with an explicit path to subtree: `git merge -X subtree=<path in language worker repo> --squash <tag-name> --allow-unrelated-histories`
34-
- Example: `git merge -X subtree=src/WebJobs.Script.Grpc/azure-functions-language-worker-protobuf --squash v1.1.0-protofile --allow-unrelated-histories`
33+
- Merge with an explicit path to subtree: `git merge -X subtree=<path in language worker repo> --squash <tag-name> --allow-unrelated-histories --strategy-option theirs`
34+
- Example: `git merge -X subtree=src/WebJobs.Script.Grpc/azure-functions-language-worker-protobuf --squash v1.1.0-protofile --allow-unrelated-histories --strategy-option theirs`
3535
4. Finalize with commit
3636
- `git commit -m "Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Tag: <tag-name>. Commit: <commit hash>"`
3737
- `git push`
@@ -95,4 +95,4 @@ provided by the bot. You will only need to do this once across all repos using o
9595

9696
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
9797
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
98-
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
98+
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

src/WebJobs.Script.Grpc/azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto

+26-2
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,35 @@ message TypedData {
289289
bytes bytes = 3;
290290
bytes stream = 4;
291291
RpcHttp http = 5;
292-
sint64 int = 6;
292+
sint64 int = 6;
293293
double double = 7;
294+
CollectionBytes collection_bytes = 8;
295+
CollectionString collection_string = 9;
296+
CollectionDouble collection_double = 10;
297+
CollectionSInt64 collection_sint64 = 11;
294298
}
295299
}
296300

301+
// Used to encapsulate collection string
302+
message CollectionString {
303+
repeated string string = 1;
304+
}
305+
306+
// Used to encapsulate collection bytes
307+
message CollectionBytes {
308+
repeated bytes bytes = 1;
309+
}
310+
311+
// Used to encapsulate collection double
312+
message CollectionDouble {
313+
repeated double double = 1;
314+
}
315+
316+
// Used to encapsulate collection sint64
317+
message CollectionSInt64 {
318+
repeated sint64 sint64 = 1;
319+
}
320+
297321
// Used to describe a given binding on invocation
298322
message ParameterBinding {
299323
// Name for the binding
@@ -430,4 +454,4 @@ message RpcHttp {
430454
TypedData rawBody = 17;
431455
repeated RpcClaimsIdentity identities = 18;
432456
repeated RpcHttpCookie cookies = 19;
433-
}
457+
}

src/WebJobs.Script.Grpc/azure-functions-language-worker-protobuf/src/proto/identity/ClaimsIdentityRpc.proto

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
syntax = "proto3";
22
// protobuf vscode extension: https://marketplace.visualstudio.com/items?itemName=zxh404.vscode-proto3
33

4+
option java_package = "com.microsoft.azure.functions.rpc.messages";
5+
46
import "shared/NullableTypes.proto";
57

68
// Light-weight representation of a .NET System.Security.Claims.ClaimsIdentity object.

src/WebJobs.Script.Grpc/azure-functions-language-worker-protobuf/src/proto/shared/NullableTypes.proto

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
syntax = "proto3";
22
// protobuf vscode extension: https://marketplace.visualstudio.com/items?itemName=zxh404.vscode-proto3
33

4+
option java_package = "com.microsoft.azure.functions.rpc.messages";
5+
46
import "google/protobuf/timestamp.proto";
57

68
message NullableString {

src/WebJobs.Script/Rpc/LanguageWorkerConstants.cs

+1
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ public static class LanguageWorkerConstants
5050

5151
// Capabilites
5252
public const string RawHttpBodyBytes = "RawHttpBodyBytes";
53+
public const string TypedDataCollection = "TypedDataCollection";
5354
}
5455
}

0 commit comments

Comments
 (0)