Skip to content

Commit 27a28ca

Browse files
authored
Add new message to support model-type bindings for OOP workers (#83)
1 parent ffbd3dd commit 27a28ca

File tree

1 file changed

+45
-24
lines changed

1 file changed

+45
-24
lines changed

src/proto/FunctionRpc.proto

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ message WorkerTerminate {
188188
message FileChangeEventRequest {
189189
// Types of File change operations (See link for more info: https://msdn.microsoft.com/en-us/library/t6xf43e0(v=vs.110).aspx)
190190
enum Type {
191-
Unknown = 0;
191+
Unknown = 0;
192192
Created = 1;
193193
Deleted = 2;
194194
Changed = 4;
@@ -370,14 +370,14 @@ message InvocationRequest {
370370

371371
// Host sends ActivityId, traceStateString and Tags from host
372372
message RpcTraceContext {
373-
// This corresponds to Activity.Current?.Id
374-
string trace_parent = 1;
373+
// This corresponds to Activity.Current?.Id
374+
string trace_parent = 1;
375375

376-
// This corresponds to Activity.Current?.TraceStateString
377-
string trace_state = 2;
376+
// This corresponds to Activity.Current?.TraceStateString
377+
string trace_state = 2;
378378

379-
// This corresponds to Activity.Current?.Tags
380-
map<string, string> attributes = 3;
379+
// This corresponds to Activity.Current?.Tags
380+
map<string, string> attributes = 3;
381381
}
382382

383383
// Host sends retry context for a function invocation
@@ -430,6 +430,7 @@ message TypedData {
430430
CollectionString collection_string = 9;
431431
CollectionDouble collection_double = 10;
432432
CollectionSInt64 collection_sint64 = 11;
433+
ModelBindingData model_binding_data = 12;
433434
}
434435
}
435436

@@ -497,20 +498,20 @@ message ParameterBinding {
497498

498499
// Used to describe a given binding on load
499500
message BindingInfo {
500-
// Indicates whether it is an input or output binding (or a fancy inout binding)
501-
enum Direction {
502-
in = 0;
503-
out = 1;
504-
inout = 2;
505-
}
506-
507-
// Indicates the type of the data for the binding
508-
enum DataType {
509-
undefined = 0;
510-
string = 1;
511-
binary = 2;
512-
stream = 3;
513-
}
501+
// Indicates whether it is an input or output binding (or a fancy inout binding)
502+
enum Direction {
503+
in = 0;
504+
out = 1;
505+
inout = 2;
506+
}
507+
508+
// Indicates the type of the data for the binding
509+
enum DataType {
510+
undefined = 0;
511+
string = 1;
512+
binary = 2;
513+
stream = 3;
514+
}
514515

515516
// Type of binding (e.g. HttpTrigger)
516517
string type = 2;
@@ -519,6 +520,9 @@ message BindingInfo {
519520
Direction direction = 3;
520521

521522
DataType data_type = 4;
523+
524+
// Properties for binding metadata
525+
map<string, string> properties = 5;
522526
}
523527

524528
// Used to send logs back to the Host
@@ -583,13 +587,13 @@ message RpcException {
583587
// Textual message describing the exception
584588
string message = 2;
585589

586-
// Worker specifies whether exception is a user exception,
587-
// for purpose of application insights logging. Defaults to false.
590+
// Worker specifies whether exception is a user exception,
591+
// for purpose of application insights logging. Defaults to false.
588592
bool is_user_exception = 4;
589593

590594
// Type of exception. If it's a user exception, the type is passed along to app insights.
591595
// Otherwise, it's ignored for now.
592-
string type = 5;
596+
string type = 5;
593597
}
594598

595599
// Http cookie type. Note that only name and value are used for Http requests
@@ -648,3 +652,20 @@ message RpcHttp {
648652
map<string,NullableString> nullable_params = 21;
649653
map<string,NullableString> nullable_query = 22;
650654
}
655+
656+
// Message representing Microsoft.Azure.WebJobs.ParameterBindingData
657+
// Used for hydrating SDK-type bindings in out-of-proc workers
658+
message ModelBindingData
659+
{
660+
// The version of the binding data content
661+
string version = 1;
662+
663+
// The extension source of the binding data
664+
string source = 2;
665+
666+
// The content type of the binding data content
667+
string content_type = 3;
668+
669+
// The binding data content
670+
bytes content = 4;
671+
}

0 commit comments

Comments
 (0)