This change switches from child lists to parent pointers, in the way resource ancestries are represented. This cleans up a fair bit of the old parenting logic, including all notion of ambient parent scopes (and will notably address pulumi/pulumi#435). This lets us show a more parent/child display in the output when doing planning and updating. For instance, here is an update of a lambda's text, which is logically part of a cloud timer: * cloud:timer:Timer: (same) [urn=urn:pulumi:malta::lm-cloud:☁️timer:Timer::lm-cts-malta-job-CleanSnapshots] * cloud:function:Function: (same) [urn=urn:pulumi:malta::lm-cloud:☁️function:Function::lm-cts-malta-job-CleanSnapshots] * aws:serverless:Function: (same) [urn=urn:pulumi:malta::lm-cloud::aws:serverless:Function::lm-cts-malta-job-CleanSnapshots] ~ aws:lambda/function:Function: (modify) [id=lm-cts-malta-job-CleanSnapshots-fee4f3bf41280741] [urn=urn:pulumi:malta::lm-cloud::aws:lambda/function:Function::lm-cts-malta-job-CleanSnapshots] - code : archive(assets:2092f44) { // etc etc etc Note that we still get walls of text, but this will be actually quite nice when combined with pulumi/pulumi#454. I've also suppressed printing properties that didn't change during updates when --detailed was not passed, and also suppressed empty strings and zero-length arrays (since TF uses these as defaults in many places and it just makes creation and deletion quite verbose). Note that this is a far cry from everything we can possibly do here as part of pulumi/pulumi#340 (and even pulumi/pulumi#417). But it's a good start towards taming some of our output spew.
212 lines
6.9 KiB
Go
212 lines
6.9 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: language.proto
|
|
// DO NOT EDIT!
|
|
|
|
package pulumirpc
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// RunRequest asks the interpreter to execute a program.
|
|
type RunRequest struct {
|
|
Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
|
|
Stack string `protobuf:"bytes,2,opt,name=stack" json:"stack,omitempty"`
|
|
Pwd string `protobuf:"bytes,3,opt,name=pwd" json:"pwd,omitempty"`
|
|
Program string `protobuf:"bytes,4,opt,name=program" json:"program,omitempty"`
|
|
Args []string `protobuf:"bytes,5,rep,name=args" json:"args,omitempty"`
|
|
Config map[string]string `protobuf:"bytes,6,rep,name=config" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
DryRun bool `protobuf:"varint,7,opt,name=dryRun" json:"dryRun,omitempty"`
|
|
Parallel int32 `protobuf:"varint,8,opt,name=parallel" json:"parallel,omitempty"`
|
|
}
|
|
|
|
func (m *RunRequest) Reset() { *m = RunRequest{} }
|
|
func (m *RunRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*RunRequest) ProtoMessage() {}
|
|
func (*RunRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
|
|
|
|
func (m *RunRequest) GetProject() string {
|
|
if m != nil {
|
|
return m.Project
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RunRequest) GetStack() string {
|
|
if m != nil {
|
|
return m.Stack
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RunRequest) GetPwd() string {
|
|
if m != nil {
|
|
return m.Pwd
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RunRequest) GetProgram() string {
|
|
if m != nil {
|
|
return m.Program
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RunRequest) GetArgs() []string {
|
|
if m != nil {
|
|
return m.Args
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RunRequest) GetConfig() map[string]string {
|
|
if m != nil {
|
|
return m.Config
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RunRequest) GetDryRun() bool {
|
|
if m != nil {
|
|
return m.DryRun
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *RunRequest) GetParallel() int32 {
|
|
if m != nil {
|
|
return m.Parallel
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// RunResponse is the response back from the interpreter/source back to the monitor.
|
|
type RunResponse struct {
|
|
Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
|
|
}
|
|
|
|
func (m *RunResponse) Reset() { *m = RunResponse{} }
|
|
func (m *RunResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*RunResponse) ProtoMessage() {}
|
|
func (*RunResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
|
|
|
|
func (m *RunResponse) GetError() string {
|
|
if m != nil {
|
|
return m.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*RunRequest)(nil), "pulumirpc.RunRequest")
|
|
proto.RegisterType((*RunResponse)(nil), "pulumirpc.RunResponse")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for LanguageRuntime service
|
|
|
|
type LanguageRuntimeClient interface {
|
|
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
|
|
}
|
|
|
|
type languageRuntimeClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewLanguageRuntimeClient(cc *grpc.ClientConn) LanguageRuntimeClient {
|
|
return &languageRuntimeClient{cc}
|
|
}
|
|
|
|
func (c *languageRuntimeClient) Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error) {
|
|
out := new(RunResponse)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.LanguageRuntime/Run", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for LanguageRuntime service
|
|
|
|
type LanguageRuntimeServer interface {
|
|
Run(context.Context, *RunRequest) (*RunResponse, error)
|
|
}
|
|
|
|
func RegisterLanguageRuntimeServer(s *grpc.Server, srv LanguageRuntimeServer) {
|
|
s.RegisterService(&_LanguageRuntime_serviceDesc, srv)
|
|
}
|
|
|
|
func _LanguageRuntime_Run_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RunRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(LanguageRuntimeServer).Run(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.LanguageRuntime/Run",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(LanguageRuntimeServer).Run(ctx, req.(*RunRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _LanguageRuntime_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pulumirpc.LanguageRuntime",
|
|
HandlerType: (*LanguageRuntimeServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Run",
|
|
Handler: _LanguageRuntime_Run_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "language.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("language.proto", fileDescriptor2) }
|
|
|
|
var fileDescriptor2 = []byte{
|
|
// 290 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x91, 0x31, 0x4f, 0xc3, 0x30,
|
|
0x10, 0x85, 0x49, 0xd3, 0xa6, 0xed, 0x45, 0x02, 0x64, 0x41, 0x65, 0x65, 0x0a, 0x61, 0xc9, 0x94,
|
|
0xa1, 0x48, 0x88, 0xb2, 0x22, 0x06, 0x24, 0x26, 0xff, 0x03, 0x93, 0x9a, 0x28, 0xd4, 0xb1, 0x8d,
|
|
0x63, 0x83, 0xf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