@@ -32,7 +32,8 @@ message StreamingMessage {
3232 WorkerInitRequest worker_init_request = 17 ;
3333 // Worker responds after initializing with its capabilities & status
3434 WorkerInitResponse worker_init_response = 16 ;
35-
35+
36+ // MESSAGE NOT USED
3637 // Worker periodically sends empty heartbeat message to host
3738 WorkerHeartbeat worker_heartbeat = 15 ;
3839
@@ -85,6 +86,13 @@ message StreamingMessage {
8586
8687 // Host gets the list of function load responses
8788 FunctionLoadResponseCollection function_load_response_collection = 32 ;
89+
90+ // Host sends required metadata to worker to warmup the worker
91+ WorkerWarmupRequest worker_warmup_request = 33 ;
92+
93+ // Worker responds after warming up with the warmup result
94+ WorkerWarmupResponse worker_warmup_response = 34 ;
95+
8896 }
8997}
9098
@@ -120,7 +128,7 @@ message WorkerInitRequest {
120128
121129// Worker responds with the result of initializing itself
122130message WorkerInitResponse {
123- // NOT USED
131+ // PROPERTY NOT USED
124132 // TODO: Remove from protobuf during next breaking change release
125133 string worker_version = 1 ;
126134
@@ -173,7 +181,7 @@ message StatusResult {
173181 repeated RpcLog logs = 3 ;
174182}
175183
176- // NOT USED
184+ // MESSAGE NOT USED
177185// TODO: Remove from protobuf during next breaking change release
178186message WorkerHeartbeat {}
179187
@@ -187,7 +195,7 @@ message WorkerTerminate {
187195message FileChangeEventRequest {
188196 // Types of File change operations (See link for more info: https://msdn.microsoft.com/en-us/library/t6xf43e0(v=vs.110).aspx)
189197 enum Type {
190- Unknown = 0 ;
198+ Unknown = 0 ;
191199 Created = 1 ;
192200 Deleted = 2 ;
193201 Changed = 4 ;
@@ -237,6 +245,13 @@ message FunctionEnvironmentReloadRequest {
237245}
238246
239247message FunctionEnvironmentReloadResponse {
248+ // After specialization, worker sends capabilities & metadata.
249+ // Worker metadata captured for telemetry purposes
250+ WorkerMetadata worker_metadata = 1 ;
251+
252+ // A map of worker supported features/capabilities
253+ map <string , string > capabilities = 2 ;
254+
240255 // Status of the response
241256 StatusResult result = 3 ;
242257}
@@ -325,7 +340,7 @@ message RpcFunctionMetadata {
325340 // Properties for function metadata
326341 // They're usually specific to a worker and largely passed along to the controller API for use
327342 // outside the host
328- map <string ,string > Properties = 16 ;
343+ map <string ,string > properties = 16 ;
329344}
330345
331346// Host tells worker it is ready to receive metadata
@@ -369,14 +384,14 @@ message InvocationRequest {
369384
370385// Host sends ActivityId, traceStateString and Tags from host
371386message RpcTraceContext {
372- // This corresponds to Activity.Current?.Id
373- string trace_parent = 1 ;
387+ // This corresponds to Activity.Current?.Id
388+ string trace_parent = 1 ;
374389
375- // This corresponds to Activity.Current?.TraceStateString
376- string trace_state = 2 ;
390+ // This corresponds to Activity.Current?.TraceStateString
391+ string trace_state = 2 ;
377392
378- // This corresponds to Activity.Current?.Tags
379- map <string , string > attributes = 3 ;
393+ // This corresponds to Activity.Current?.Tags
394+ map <string , string > attributes = 3 ;
380395}
381396
382397// Host sends retry context for a function invocation
@@ -396,8 +411,8 @@ message InvocationCancel {
396411 // Unique id for invocation
397412 string invocation_id = 2 ;
398413
399- // Time period before force shutdown
400- google.protobuf.Duration grace_period = 1 ; // could also use absolute time
414+ // PROPERTY NOT USED
415+ google.protobuf.Duration grace_period = 1 ;
401416}
402417
403418// Worker responds with status of Invocation
@@ -415,6 +430,15 @@ message InvocationResponse {
415430 StatusResult result = 3 ;
416431}
417432
433+ message WorkerWarmupRequest {
434+ // Full path of worker.config.json location
435+ string worker_directory = 1 ;
436+ }
437+
438+ message WorkerWarmupResponse {
439+ StatusResult result = 1 ;
440+ }
441+
418442// Used to encapsulate data which could be a variety of types
419443message TypedData {
420444 oneof data {
@@ -429,6 +453,8 @@ message TypedData {
429453 CollectionString collection_string = 9 ;
430454 CollectionDouble collection_double = 10 ;
431455 CollectionSInt64 collection_sint64 = 11 ;
456+ ModelBindingData model_binding_data = 12 ;
457+ CollectionModelBindingData collection_model_binding_data = 13 ;
432458 }
433459}
434460
@@ -496,20 +522,20 @@ message ParameterBinding {
496522
497523// Used to describe a given binding on load
498524message BindingInfo {
499- // Indicates whether it is an input or output binding (or a fancy inout binding)
500- enum Direction {
501- in = 0 ;
502- out = 1 ;
503- inout = 2 ;
504- }
505-
506- // Indicates the type of the data for the binding
507- enum DataType {
508- undefined = 0 ;
509- string = 1 ;
510- binary = 2 ;
511- stream = 3 ;
512- }
525+ // Indicates whether it is an input or output binding (or a fancy inout binding)
526+ enum Direction {
527+ in = 0 ;
528+ out = 1 ;
529+ inout = 2 ;
530+ }
531+
532+ // Indicates the type of the data for the binding
533+ enum DataType {
534+ undefined = 0 ;
535+ string = 1 ;
536+ binary = 2 ;
537+ stream = 3 ;
538+ }
513539
514540 // Type of binding (e.g. HttpTrigger)
515541 string type = 2 ;
@@ -518,6 +544,9 @@ message BindingInfo {
518544 Direction direction = 3 ;
519545
520546 DataType data_type = 4 ;
547+
548+ // Properties for binding metadata
549+ map <string , string > properties = 5 ;
521550}
522551
523552// Used to send logs back to the Host
@@ -582,13 +611,13 @@ message RpcException {
582611 // Textual message describing the exception
583612 string message = 2 ;
584613
585- // Worker specifies whether exception is a user exception,
586- // for purpose of application insights logging. Defaults to false.
614+ // Worker specifies whether exception is a user exception,
615+ // for purpose of application insights logging. Defaults to false.
587616 bool is_user_exception = 4 ;
588617
589618 // Type of exception. If it's a user exception, the type is passed along to app insights.
590619 // Otherwise, it's ignored for now.
591- string type = 5 ;
620+ string type = 5 ;
592621}
593622
594623// Http cookie type. Note that only name and value are used for Http requests
@@ -647,3 +676,25 @@ message RpcHttp {
647676 map <string ,NullableString > nullable_params = 21 ;
648677 map <string ,NullableString > nullable_query = 22 ;
649678}
679+
680+ // Message representing Microsoft.Azure.WebJobs.ParameterBindingData
681+ // Used for hydrating SDK-type bindings in out-of-proc workers
682+ message ModelBindingData
683+ {
684+ // The version of the binding data content
685+ string version = 1 ;
686+
687+ // The extension source of the binding data
688+ string source = 2 ;
689+
690+ // The content type of the binding data content
691+ string content_type = 3 ;
692+
693+ // The binding data content
694+ bytes content = 4 ;
695+ }
696+
697+ // Used to encapsulate collection model_binding_data
698+ message CollectionModelBindingData {
699+ repeated ModelBindingData model_binding_data = 1 ;
700+ }
0 commit comments