-
Notifications
You must be signed in to change notification settings - Fork 1k
/
language.proto
130 lines (108 loc) 路 5.58 KB
/
language.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Copyright 2016-2018, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
import "pulumi/plugin.proto";
import "google/protobuf/empty.proto";
package pulumirpc;
option go_package = "github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpc";
// LanguageRuntime is the interface that the planning monitor uses to drive execution of an interpreter responsible
// for confguring and creating resource objects.
service LanguageRuntime {
// GetRequiredPlugins computes the complete set of anticipated plugins required by a program.
rpc GetRequiredPlugins(GetRequiredPluginsRequest) returns (GetRequiredPluginsResponse) {}
// Run executes a program and returns its result.
rpc Run(RunRequest) returns (RunResponse) {}
// GetPluginInfo returns generic information about this plugin, like its version.
rpc GetPluginInfo(google.protobuf.Empty) returns (PluginInfo) {}
// InstallDependencies will install dependencies for the project, e.g. by running `npm install` for nodejs projects.
rpc InstallDependencies(InstallDependenciesRequest) returns (stream InstallDependenciesResponse) {}
// About returns information about the runtime for this language.
rpc About(google.protobuf.Empty) returns (AboutResponse) {}
// GetProgramDependencies returns the set of dependencies required by the program.
rpc GetProgramDependencies(GetProgramDependenciesRequest) returns (GetProgramDependenciesResponse) {}
// RunPlugin executes a plugin program and returns its result asynchronously.
rpc RunPlugin(RunPluginRequest) returns (stream RunPluginResponse) {}
}
// AboutResponse returns runtime information about the language.
message AboutResponse {
string executable = 1; // the primary executable for the runtime of this language.
string version = 2; // the version of the runtime for this language.
map<string, string> metadata = 3; // other information about this language.
}
message GetProgramDependenciesRequest {
string project = 1; // the project name.
string pwd = 2; // the program's working directory.
string program = 3; // the path to the program.
bool transitiveDependencies = 4; // if transitive dependencies should be included in the result.
}
message DependencyInfo {
string name = 1; // The name of the dependency.
string version = 2; // The version of the dependency.
}
message GetProgramDependenciesResponse {
repeated DependencyInfo dependencies = 1; // the dependencies of this program
}
message GetRequiredPluginsRequest {
string project = 1; // the project name.
string pwd = 2; // the program's working directory.
string program = 3; // the path to the program.
}
message GetRequiredPluginsResponse {
repeated PluginDependency plugins = 1; // a list of plugins required by this program.
}
// RunRequest asks the interpreter to execute a program.
message RunRequest {
string project = 1; // the project name.
string stack = 2; // the name of the stack being deployed into.
string pwd = 3; // the program's working directory.
string program = 4; // the path to the program to execute.
repeated string args = 5; // any arguments to pass to the program.
map<string, string> config = 6; // the configuration variables to apply before running.
bool dryRun = 7; // true if we're only doing a dryrun (preview).
int32 parallel = 8; // the degree of parallelism for resource operations (<=1 for serial).
string monitor_address = 9; // the address for communicating back to the resource monitor.
bool queryMode = 10; // true if we're only doing a query.
repeated string configSecretKeys = 11; // the configuration keys that have secret values.
string organization = 12; // the organization of the stack being deployed into.
}
// RunResponse is the response back from the interpreter/source back to the monitor.
message RunResponse {
// An unhandled error if any occurred.
string error = 1;
// An error happened. And it was reported to the user. Work should stop immediately
// with nothing further to print to the user. This corresponds to a "result.Bail()"
// value in the 'go' layer.
bool bail = 2;
}
message InstallDependenciesRequest {
string directory = 1; // the program's working directory.
bool is_terminal = 2; // if we are running in a terminal and should use ANSI codes
}
message InstallDependenciesResponse {
bytes stdout = 1; // a line of stdout text.
bytes stderr = 2; // a line of stderr text.
}
message RunPluginRequest{
string pwd = 1; // the program's working directory.
string program = 2; // the path to the program to execute.
repeated string args = 3; // any arguments to pass to the program.
repeated string env = 4; // any environment variables to set as part of the program.
}
message RunPluginResponse {
oneof output {
bytes stdout = 1; // a line of stdout text.
bytes stderr = 2; // a line of stderr text.
int32 exitcode = 3; // the exit code of the provider.
}
}