Skip to content

Commit 2a3fb29

Browse files
authored
Merge pull request #95 from Azure/satvu/env-reload-strat
Add capabilities update strategy to environment reload response
2 parents c91a6cd + a088a33 commit 2a3fb29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/proto/FunctionRpc.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,14 @@ message FunctionEnvironmentReloadRequest {
245245
}
246246

247247
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+
}
248256
// After specialization, worker sends capabilities & metadata.
249257
// Worker metadata captured for telemetry purposes
250258
WorkerMetadata worker_metadata = 1;
@@ -254,6 +262,9 @@ message FunctionEnvironmentReloadResponse {
254262

255263
// Status of the response
256264
StatusResult result = 3;
265+
266+
// If no strategy is defined, the host will default to merge
267+
CapabilitiesUpdateStrategy capabilities_update_strategy = 4;
257268
}
258269

259270
// Tell the out-of-proc worker to close any shared memory maps it allocated for given invocation

0 commit comments

Comments
 (0)