Skip to content

Commit

Permalink
More complete documentation of environment proto definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Dec 1, 2023
1 parent e88fb5d commit d85ce3f
Showing 1 changed file with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1563,15 +1563,26 @@ message Environment {

message StandardEnvironments {
enum Environments {
DOCKER = 0 [(beam_urn) = "beam:env:docker:v1"]; // A managed docker container to run user code.

PROCESS = 1 [(beam_urn) = "beam:env:process:v1"]; // A managed native process to run user code.

EXTERNAL = 2 [(beam_urn) = "beam:env:external:v1"]; // An external non managed process to run user code.

DEFAULT = 3 [(beam_urn) = "beam:env:default:v1"]; // Used as a stub when context is missing a runner-provided default environment.

ANYOF = 4 [(beam_urn) = "beam:env:anyof:v1"]; // A selection of equivalent environments a runner may use.
// A managed docker container to run user code.
// Payload should be DockerPayload.
DOCKER = 0 [(beam_urn) = "beam:env:docker:v1"];

// A managed native process to run user code.
// Payload should be ProcessPayload.
PROCESS = 1 [(beam_urn) = "beam:env:process:v1"];

// An external non managed process to run user code.
// Payload should be ExternalPayload.
EXTERNAL = 2 [(beam_urn) = "beam:env:external:v1"];

// Used as a stub when context is missing a runner-provided default environment.
DEFAULT = 3 [(beam_urn) = "beam:env:default:v1"];

// A selection of equivalent fully-specified environments a runner may use.
// Note that this environment itself does not declare any dependencies or capabilities,
// as those may differ among the several alternatives.
// Payload should be AnyOfEnvironmentPayload.
ANYOF = 4 [(beam_urn) = "beam:env:anyof:v1"];
}
}

Expand All @@ -1588,11 +1599,12 @@ message ProcessPayload {
}

message ExternalPayload {
ApiServiceDescriptor endpoint = 1;
ApiServiceDescriptor endpoint = 1; // Serving BeamFnExternalWorkerPool API.
map<string, string> params = 2; // Arbitrary extra parameters to pass
}

message AnyOfEnvironmentPayload {
// Each is fully contained (with their own dependencies, capabilities, etc.)
repeated Environment environments = 1;
}

Expand Down

0 comments on commit d85ce3f

Please sign in to comment.