@@ -26,21 +26,18 @@ message StreamingMessage {
26
26
oneof content {
27
27
28
28
// Worker initiates stream
29
- StartStream start_stream = 20 ;
29
+ StartStream start_stream = 20 ;
30
30
31
31
// Host sends capabilities/init data to worker
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
- // Worker periodically sends empty heartbeat message to host
37
- WorkerHeartbeat worker_heartbeat = 15 ;
38
-
39
36
// Host sends terminate message to worker.
40
37
// Worker terminates if it can, otherwise host terminates after a grace period
41
38
WorkerTerminate worker_terminate = 14 ;
42
39
43
- // Add any worker relevant status to response
40
+ // Host periodically sends status request to the worker
44
41
WorkerStatusRequest worker_status_request = 12 ;
45
42
WorkerStatusResponse worker_status_response = 13 ;
46
43
@@ -49,25 +46,25 @@ message StreamingMessage {
49
46
50
47
// Worker requests a desired action (restart worker, reload function)
51
48
WorkerActionResponse worker_action_response = 7 ;
52
-
49
+
53
50
// Host sends required metadata to worker to load function
54
51
FunctionLoadRequest function_load_request = 8 ;
55
52
// Worker responds after loading with the load result
56
53
FunctionLoadResponse function_load_response = 9 ;
57
-
54
+
58
55
// Host requests a given invocation
59
56
InvocationRequest invocation_request = 4 ;
60
57
61
58
// Worker responds to a given invocation
62
59
InvocationResponse invocation_response = 5 ;
63
60
64
- // Host sends cancel message to attempt to cancel an invocation.
61
+ // Host sends cancel message to attempt to cancel an invocation.
65
62
// If an invocation is cancelled, host will receive an invocation response with status cancelled.
66
63
InvocationCancel invocation_cancel = 21 ;
67
64
68
65
// Worker logs a message back to the host
69
66
RpcLog rpc_log = 2 ;
70
-
67
+
71
68
FunctionEnvironmentReloadRequest function_environment_reload_request = 25 ;
72
69
73
70
FunctionEnvironmentReloadResponse function_environment_reload_response = 26 ;
@@ -82,21 +79,24 @@ message StreamingMessage {
82
79
83
80
// Host sends required metadata to worker to load functions
84
81
FunctionLoadRequestCollection function_load_request_collection = 31 ;
82
+
83
+ // Host gets the list of function load responses
84
+ FunctionLoadResponseCollection function_load_response_collection = 32 ;
85
85
}
86
86
}
87
87
88
88
// Process.Start required info
89
89
// connection details
90
90
// protocol type
91
- // protocol version
91
+ // protocol version
92
92
93
93
// Worker sends the host information identifying itself
94
94
message StartStream {
95
95
// id of the worker
96
96
string worker_id = 2 ;
97
97
}
98
98
99
- // Host requests the worker to initialize itself
99
+ // Host requests the worker to initialize itself
100
100
message WorkerInitRequest {
101
101
// version of the host sending init request
102
102
string host_version = 1 ;
@@ -110,6 +110,9 @@ message WorkerInitRequest {
110
110
111
111
// Full path of worker.config.json location
112
112
string worker_directory = 4 ;
113
+
114
+ // base directory for function app
115
+ string function_app_directory = 5 ;
113
116
}
114
117
115
118
// Worker responds with the result of initializing itself
@@ -144,11 +147,6 @@ message StatusResult {
144
147
repeated RpcLog logs = 3 ;
145
148
}
146
149
147
- // TODO: investigate grpc heartbeat - don't limit to grpc implemention
148
-
149
- // Message is empty by design - Will add more fields in future if needed
150
- message WorkerHeartbeat {}
151
-
152
150
// Warning before killing the process after grace_period
153
151
// Worker self terminates ..no response on this
154
152
message WorkerTerminate {
@@ -179,24 +177,25 @@ message FileChangeEventRequest {
179
177
180
178
// Indicates whether worker reloaded successfully or needs a restart
181
179
message WorkerActionResponse {
182
- // indicates whether a restart is needed, or reload succesfully
180
+ // indicates whether a restart is needed, or reload successfully
183
181
enum Action {
184
182
Restart = 0 ;
185
183
Reload = 1 ;
186
184
}
187
-
185
+
188
186
// action for this response
189
187
Action action = 1 ;
190
188
191
189
// text reason for the response
192
190
string reason = 2 ;
193
191
}
194
192
195
- // NOT USED
196
- message WorkerStatusRequest {
193
+ // Used by the host to determine worker health
194
+ message WorkerStatusRequest {
197
195
}
198
196
199
- // NOT USED
197
+ // Worker responds with status message
198
+ // TODO: Add any worker relevant status to response
200
199
message WorkerStatusResponse {
201
200
}
202
201
@@ -228,6 +227,11 @@ message FunctionLoadRequestCollection {
228
227
repeated FunctionLoadRequest function_load_requests = 1 ;
229
228
}
230
229
230
+ // Host gets the list of function load responses
231
+ message FunctionLoadResponseCollection {
232
+ repeated FunctionLoadResponse function_load_responses = 1 ;
233
+ }
234
+
231
235
// Load request of a single Function
232
236
message FunctionLoadRequest {
233
237
// unique function identifier (avoid name collisions, facilitate reload case)
@@ -260,7 +264,7 @@ message RpcFunctionMetadata {
260
264
261
265
// base directory for the Function
262
266
string directory = 1 ;
263
-
267
+
264
268
// Script file specified
265
269
string script_file = 2 ;
266
270
@@ -304,7 +308,7 @@ message FunctionMetadataResponse {
304
308
StatusResult result = 2 ;
305
309
306
310
// if set to true then host will perform indexing
307
- bool useDefaultMetadataIndexing = 3 ;
311
+ bool use_default_metadata_indexing = 3 ;
308
312
}
309
313
310
314
// Host requests worker to invoke a Function
@@ -481,7 +485,7 @@ message BindingInfo {
481
485
DataType data_type = 4 ;
482
486
}
483
487
484
- // Used to send logs back to the Host
488
+ // Used to send logs back to the Host
485
489
message RpcLog {
486
490
// Matching ILogger semantics
487
491
// https://github.com/aspnet/Logging/blob/9506ccc3f3491488fe88010ef8b9eb64594abf95/src/Microsoft.Extensions.Logging/Logger.cs
@@ -532,7 +536,7 @@ message RpcLog {
532
536
map <string , TypedData > propertiesMap = 9 ;
533
537
}
534
538
535
- // Encapsulates an Exception
539
+ // Encapsulates an Exception
536
540
message RpcException {
537
541
// Source of the exception
538
542
string source = 3 ;
@@ -542,6 +546,14 @@ message RpcException {
542
546
543
547
// Textual message describing the exception
544
548
string message = 2 ;
549
+
550
+ // Worker specifies whether exception is a user exception,
551
+ // for purpose of application insights logging. Defaults to false.
552
+ optional bool is_user_exception = 4 ;
553
+
554
+ // Type of exception. If it's a user exception, the type is passed along to app insights.
555
+ // Otherwise, it's ignored for now.
556
+ optional string type = 5 ;
545
557
}
546
558
547
559
// Http cookie type. Note that only name and value are used for Http requests
@@ -586,7 +598,7 @@ message RpcHttpCookie {
586
598
// TODO - solidify this or remove it
587
599
message RpcHttp {
588
600
string method = 1 ;
589
- string url = 2 ;
601
+ string url = 2 ;
590
602
map <string ,string > headers = 3 ;
591
603
TypedData body = 4 ;
592
604
map <string ,string > params = 10 ;
0 commit comments