@@ -32,7 +32,8 @@ message StreamingMessage {
32
32
WorkerInitRequest worker_init_request = 17 ;
33
33
// Worker responds after initializing with its capabilities & status
34
34
WorkerInitResponse worker_init_response = 16 ;
35
-
35
+
36
+ // MESSAGE NOT USED
36
37
// Worker periodically sends empty heartbeat message to host
37
38
WorkerHeartbeat worker_heartbeat = 15 ;
38
39
@@ -85,6 +86,13 @@ message StreamingMessage {
85
86
86
87
// Host gets the list of function load responses
87
88
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
+
88
96
}
89
97
}
90
98
@@ -120,7 +128,7 @@ message WorkerInitRequest {
120
128
121
129
// Worker responds with the result of initializing itself
122
130
message WorkerInitResponse {
123
- // NOT USED
131
+ // PROPERTY NOT USED
124
132
// TODO: Remove from protobuf during next breaking change release
125
133
string worker_version = 1 ;
126
134
@@ -173,7 +181,7 @@ message StatusResult {
173
181
repeated RpcLog logs = 3 ;
174
182
}
175
183
176
- // NOT USED
184
+ // MESSAGE NOT USED
177
185
// TODO: Remove from protobuf during next breaking change release
178
186
message WorkerHeartbeat {}
179
187
@@ -187,7 +195,7 @@ message WorkerTerminate {
187
195
message FileChangeEventRequest {
188
196
// Types of File change operations (See link for more info: https://msdn.microsoft.com/en-us/library/t6xf43e0(v=vs.110).aspx)
189
197
enum Type {
190
- Unknown = 0 ;
198
+ Unknown = 0 ;
191
199
Created = 1 ;
192
200
Deleted = 2 ;
193
201
Changed = 4 ;
@@ -237,8 +245,26 @@ message FunctionEnvironmentReloadRequest {
237
245
}
238
246
239
247
message FunctionEnvironmentReloadResponse {
248
+ enum CapabilitiesUpdateStrategy {
249
+ // overwrites existing values and appends new ones
250
+ // ex. worker init: {A: foo, B: bar} + env reload: {A:foo, B: foo, C: foo} -> {A: foo, B: foo, C: foo}
251
+ merge = 0 ;
252
+ // existing capabilities are cleared and new capabilities are applied
253
+ // ex. worker init: {A: foo, B: bar} + env reload: {A:foo, C: foo} -> {A: foo, C: foo}
254
+ replace = 1 ;
255
+ }
256
+ // After specialization, worker sends capabilities & metadata.
257
+ // Worker metadata captured for telemetry purposes
258
+ WorkerMetadata worker_metadata = 1 ;
259
+
260
+ // A map of worker supported features/capabilities
261
+ map <string , string > capabilities = 2 ;
262
+
240
263
// Status of the response
241
264
StatusResult result = 3 ;
265
+
266
+ // If no strategy is defined, the host will default to merge
267
+ CapabilitiesUpdateStrategy capabilities_update_strategy = 4 ;
242
268
}
243
269
244
270
// Tell the out-of-proc worker to close any shared memory maps it allocated for given invocation
@@ -322,10 +348,13 @@ message RpcFunctionMetadata {
322
348
// A flag indicating if managed dependency is enabled or not
323
349
bool managed_dependency_enabled = 14 ;
324
350
351
+ // The optional function execution retry strategy to use on invocation failures.
352
+ RpcRetryOptions retry_options = 15 ;
353
+
325
354
// Properties for function metadata
326
355
// They're usually specific to a worker and largely passed along to the controller API for use
327
356
// outside the host
328
- map <string ,string > Properties = 16 ;
357
+ map <string ,string > properties = 16 ;
329
358
}
330
359
331
360
// Host tells worker it is ready to receive metadata
@@ -369,14 +398,14 @@ message InvocationRequest {
369
398
370
399
// Host sends ActivityId, traceStateString and Tags from host
371
400
message RpcTraceContext {
372
- // This corresponds to Activity.Current?.Id
373
- string trace_parent = 1 ;
401
+ // This corresponds to Activity.Current?.Id
402
+ string trace_parent = 1 ;
374
403
375
- // This corresponds to Activity.Current?.TraceStateString
376
- string trace_state = 2 ;
404
+ // This corresponds to Activity.Current?.TraceStateString
405
+ string trace_state = 2 ;
377
406
378
- // This corresponds to Activity.Current?.Tags
379
- map <string , string > attributes = 3 ;
407
+ // This corresponds to Activity.Current?.Tags
408
+ map <string , string > attributes = 3 ;
380
409
}
381
410
382
411
// Host sends retry context for a function invocation
@@ -396,8 +425,8 @@ message InvocationCancel {
396
425
// Unique id for invocation
397
426
string invocation_id = 2 ;
398
427
399
- // Time period before force shutdown
400
- google.protobuf.Duration grace_period = 1 ; // could also use absolute time
428
+ // PROPERTY NOT USED
429
+ google.protobuf.Duration grace_period = 1 ;
401
430
}
402
431
403
432
// Worker responds with status of Invocation
@@ -415,6 +444,15 @@ message InvocationResponse {
415
444
StatusResult result = 3 ;
416
445
}
417
446
447
+ message WorkerWarmupRequest {
448
+ // Full path of worker.config.json location
449
+ string worker_directory = 1 ;
450
+ }
451
+
452
+ message WorkerWarmupResponse {
453
+ StatusResult result = 1 ;
454
+ }
455
+
418
456
// Used to encapsulate data which could be a variety of types
419
457
message TypedData {
420
458
oneof data {
@@ -429,6 +467,8 @@ message TypedData {
429
467
CollectionString collection_string = 9 ;
430
468
CollectionDouble collection_double = 10 ;
431
469
CollectionSInt64 collection_sint64 = 11 ;
470
+ ModelBindingData model_binding_data = 12 ;
471
+ CollectionModelBindingData collection_model_binding_data = 13 ;
432
472
}
433
473
}
434
474
@@ -496,20 +536,20 @@ message ParameterBinding {
496
536
497
537
// Used to describe a given binding on load
498
538
message 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
- }
539
+ // Indicates whether it is an input or output binding (or a fancy inout binding)
540
+ enum Direction {
541
+ in = 0 ;
542
+ out = 1 ;
543
+ inout = 2 ;
544
+ }
545
+
546
+ // Indicates the type of the data for the binding
547
+ enum DataType {
548
+ undefined = 0 ;
549
+ string = 1 ;
550
+ binary = 2 ;
551
+ stream = 3 ;
552
+ }
513
553
514
554
// Type of binding (e.g. HttpTrigger)
515
555
string type = 2 ;
@@ -518,6 +558,9 @@ message BindingInfo {
518
558
Direction direction = 3 ;
519
559
520
560
DataType data_type = 4 ;
561
+
562
+ // Properties for binding metadata
563
+ map <string , string > properties = 5 ;
521
564
}
522
565
523
566
// Used to send logs back to the Host
@@ -582,13 +625,13 @@ message RpcException {
582
625
// Textual message describing the exception
583
626
string message = 2 ;
584
627
585
- // Worker specifies whether exception is a user exception,
586
- // for purpose of application insights logging. Defaults to false.
628
+ // Worker specifies whether exception is a user exception,
629
+ // for purpose of application insights logging. Defaults to false.
587
630
bool is_user_exception = 4 ;
588
631
589
632
// Type of exception. If it's a user exception, the type is passed along to app insights.
590
633
// Otherwise, it's ignored for now.
591
- string type = 5 ;
634
+ string type = 5 ;
592
635
}
593
636
594
637
// Http cookie type. Note that only name and value are used for Http requests
@@ -647,3 +690,52 @@ message RpcHttp {
647
690
map <string ,NullableString > nullable_params = 21 ;
648
691
map <string ,NullableString > nullable_query = 22 ;
649
692
}
693
+
694
+ // Message representing Microsoft.Azure.WebJobs.ParameterBindingData
695
+ // Used for hydrating SDK-type bindings in out-of-proc workers
696
+ message ModelBindingData
697
+ {
698
+ // The version of the binding data content
699
+ string version = 1 ;
700
+
701
+ // The extension source of the binding data
702
+ string source = 2 ;
703
+
704
+ // The content type of the binding data content
705
+ string content_type = 3 ;
706
+
707
+ // The binding data content
708
+ bytes content = 4 ;
709
+ }
710
+
711
+ // Used to encapsulate collection model_binding_data
712
+ message CollectionModelBindingData {
713
+ repeated ModelBindingData model_binding_data = 1 ;
714
+ }
715
+
716
+ // Retry policy which the worker sends the host when the worker indexes
717
+ // a function.
718
+ message RpcRetryOptions
719
+ {
720
+ // The retry strategy to use. Valid values are fixed delay or exponential backoff.
721
+ enum RetryStrategy
722
+ {
723
+ exponential_backoff = 0 ;
724
+ fixed_delay = 1 ;
725
+ }
726
+
727
+ // The maximum number of retries allowed per function execution.
728
+ // -1 means to retry indefinitely.
729
+ int32 max_retry_count = 2 ;
730
+
731
+ // The delay that's used between retries when you're using a fixed delay strategy.
732
+ google.protobuf.Duration delay_interval = 3 ;
733
+
734
+ // The minimum retry delay when you're using an exponential backoff strategy
735
+ google.protobuf.Duration minimum_interval = 4 ;
736
+
737
+ // The maximum retry delay when you're using an exponential backoff strategy
738
+ google.protobuf.Duration maximum_interval = 5 ;
739
+
740
+ RetryStrategy retry_strategy = 6 ;
741
+ }
0 commit comments