Skip to content

Commit

Permalink
Merge pull request #95 from Azure/satvu/env-reload-strat
Browse files Browse the repository at this point in the history
Add capabilities update strategy to environment reload response
  • Loading branch information
satvu authored Jul 14, 2023
2 parents c91a6cd + a088a33 commit 2a3fb29
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/proto/FunctionRpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ message FunctionEnvironmentReloadRequest {
}

message FunctionEnvironmentReloadResponse {
enum CapabilitiesUpdateStrategy {
// overwrites existing values and appends new ones
// ex. worker init: {A: foo, B: bar} + env reload: {A:foo, B: foo, C: foo} -> {A: foo, B: foo, C: foo}
merge = 0;
// existing capabilities are cleared and new capabilities are applied
// ex. worker init: {A: foo, B: bar} + env reload: {A:foo, C: foo} -> {A: foo, C: foo}
replace = 1;
}
// After specialization, worker sends capabilities & metadata.
// Worker metadata captured for telemetry purposes
WorkerMetadata worker_metadata = 1;
Expand All @@ -254,6 +262,9 @@ message FunctionEnvironmentReloadResponse {

// Status of the response
StatusResult result = 3;

// If no strategy is defined, the host will default to merge
CapabilitiesUpdateStrategy capabilities_update_strategy = 4;
}

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

0 comments on commit 2a3fb29

Please sign in to comment.