pulumi/sdk/proto/go/resource.pb.go
joeduffy 8b5874dab5 General prep work for refresh
This change includes a bunch of refactorings I made in prep for
doing refresh (first, the command, see pulumi/pulumi#1081):

* The primary change is to change the way the engine's core update
  functionality works with respect to deploy.Source.  This is the
  way we can plug in new sources of resource information during
  planning (and, soon, diffing).  The way I intend to model refresh
  is by having a new kind of source, deploy.RefreshSource, which
  will let us do virtually everything about an update/diff the same
  way with refreshes, which avoid otherwise duplicative effort.

  This includes changing the planOptions (nee deployOptions) to
  take a new SourceFunc callback, which is responsible for creating
  a source specific to the kind of plan being requested.

  Preview, Update, and Destroy now are primarily differentiated by
  the kind of deploy.Source that they return, rather than sprinkling
  things like `if Destroying` throughout.  This tidies up some logic
  and, more importantly, gives us precisely the refresh hook we need.

* Originally, we used the deploy.NullSource for Destroy operations.
  This simply returns nothing, which is how Destroy works.  For some
  reason, we were no longer doing this, and instead had some
  `if Destroying` cases sprinkled throughout the deploy.EvalSource.
  I think this is a vestige of some old way we did configuration, at
  least judging by a comment, which is apparently no longer relevant.

* Move diff and diff-printing logic within the engine into its own
  pkg/engine/diff.go file, to prepare for upcoming work.

* I keep noticing benign diffs anytime I regenerate protobufs.  I
  suspect this is because we're also on different versions.  I changed
  generate.sh to also dump the version into grpc_version.txt.  At
  least we can understand where the diffs are coming from, decide
  whether to take them (i.e., a newer version), and ensure that as
  a team we are monotonically increasing, and not going backwards.

* I also tidied up some tiny things I noticed while in there, like
  comments, incorrect types, lint suppressions, and so on.
2018-03-28 07:45:23 -07:00

338 lines
13 KiB
Go

// Code generated by protoc-gen-go.
// source: resource.proto
// DO NOT EDIT!
package pulumirpc
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/empty"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
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
// RegisterResourceRequest contains information about a resource object that was newly allocated.
type RegisterResourceRequest struct {
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Parent string `protobuf:"bytes,3,opt,name=parent" json:"parent,omitempty"`
Custom bool `protobuf:"varint,4,opt,name=custom" json:"custom,omitempty"`
Object *google_protobuf1.Struct `protobuf:"bytes,5,opt,name=object" json:"object,omitempty"`
Protect bool `protobuf:"varint,6,opt,name=protect" json:"protect,omitempty"`
Dependencies []string `protobuf:"bytes,7,rep,name=dependencies" json:"dependencies,omitempty"`
}
func (m *RegisterResourceRequest) Reset() { *m = RegisterResourceRequest{} }
func (m *RegisterResourceRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceRequest) ProtoMessage() {}
func (*RegisterResourceRequest) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} }
func (m *RegisterResourceRequest) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *RegisterResourceRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *RegisterResourceRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *RegisterResourceRequest) GetCustom() bool {
if m != nil {
return m.Custom
}
return false
}
func (m *RegisterResourceRequest) GetObject() *google_protobuf1.Struct {
if m != nil {
return m.Object
}
return nil
}
func (m *RegisterResourceRequest) GetProtect() bool {
if m != nil {
return m.Protect
}
return false
}
func (m *RegisterResourceRequest) GetDependencies() []string {
if m != nil {
return m.Dependencies
}
return nil
}
// RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the
// auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine.
type RegisterResourceResponse struct {
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
Object *google_protobuf1.Struct `protobuf:"bytes,3,opt,name=object" json:"object,omitempty"`
Stable bool `protobuf:"varint,4,opt,name=stable" json:"stable,omitempty"`
Stables []string `protobuf:"bytes,5,rep,name=stables" json:"stables,omitempty"`
}
func (m *RegisterResourceResponse) Reset() { *m = RegisterResourceResponse{} }
func (m *RegisterResourceResponse) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceResponse) ProtoMessage() {}
func (*RegisterResourceResponse) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} }
func (m *RegisterResourceResponse) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *RegisterResourceResponse) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *RegisterResourceResponse) GetObject() *google_protobuf1.Struct {
if m != nil {
return m.Object
}
return nil
}
func (m *RegisterResourceResponse) GetStable() bool {
if m != nil {
return m.Stable
}
return false
}
func (m *RegisterResourceResponse) GetStables() []string {
if m != nil {
return m.Stables
}
return nil
}
// RegisterResourceOutputsRequest adds extra resource outputs created by the program after registration has occurred.
type RegisterResourceOutputsRequest struct {
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Outputs *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=outputs" json:"outputs,omitempty"`
}
func (m *RegisterResourceOutputsRequest) Reset() { *m = RegisterResourceOutputsRequest{} }
func (m *RegisterResourceOutputsRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceOutputsRequest) ProtoMessage() {}
func (*RegisterResourceOutputsRequest) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} }
func (m *RegisterResourceOutputsRequest) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *RegisterResourceOutputsRequest) GetOutputs() *google_protobuf1.Struct {
if m != nil {
return m.Outputs
}
return nil
}
func init() {
proto.RegisterType((*RegisterResourceRequest)(nil), "pulumirpc.RegisterResourceRequest")
proto.RegisterType((*RegisterResourceResponse)(nil), "pulumirpc.RegisterResourceResponse")
proto.RegisterType((*RegisterResourceOutputsRequest)(nil), "pulumirpc.RegisterResourceOutputsRequest")
}
// 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 ResourceMonitor service
type ResourceMonitorClient interface {
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
RegisterResource(ctx context.Context, in *RegisterResourceRequest, opts ...grpc.CallOption) (*RegisterResourceResponse, error)
RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
}
type resourceMonitorClient struct {
cc *grpc.ClientConn
}
func NewResourceMonitorClient(cc *grpc.ClientConn) ResourceMonitorClient {
return &resourceMonitorClient{cc}
}
func (c *resourceMonitorClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) {
out := new(InvokeResponse)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/Invoke", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceMonitorClient) RegisterResource(ctx context.Context, in *RegisterResourceRequest, opts ...grpc.CallOption) (*RegisterResourceResponse, error) {
out := new(RegisterResourceResponse)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResource", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceMonitorClient) RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
out := new(google_protobuf.Empty)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResourceOutputs", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ResourceMonitor service
type ResourceMonitorServer interface {
Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
RegisterResource(context.Context, *RegisterResourceRequest) (*RegisterResourceResponse, error)
RegisterResourceOutputs(context.Context, *RegisterResourceOutputsRequest) (*google_protobuf.Empty, error)
}
func RegisterResourceMonitorServer(s *grpc.Server, srv ResourceMonitorServer) {
s.RegisterService(&_ResourceMonitor_serviceDesc, srv)
}
func _ResourceMonitor_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InvokeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceMonitorServer).Invoke(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceMonitor/Invoke",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceMonitorServer).Invoke(ctx, req.(*InvokeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ResourceMonitor_RegisterResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterResourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceMonitorServer).RegisterResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceMonitor/RegisterResource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceMonitorServer).RegisterResource(ctx, req.(*RegisterResourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ResourceMonitor_RegisterResourceOutputs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterResourceOutputsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceMonitorServer).RegisterResourceOutputs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceMonitor/RegisterResourceOutputs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceMonitorServer).RegisterResourceOutputs(ctx, req.(*RegisterResourceOutputsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ResourceMonitor_serviceDesc = grpc.ServiceDesc{
ServiceName: "pulumirpc.ResourceMonitor",
HandlerType: (*ResourceMonitorServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Invoke",
Handler: _ResourceMonitor_Invoke_Handler,
},
{
MethodName: "RegisterResource",
Handler: _ResourceMonitor_RegisterResource_Handler,
},
{
MethodName: "RegisterResourceOutputs",
Handler: _ResourceMonitor_RegisterResourceOutputs_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "resource.proto",
}
func init() { proto.RegisterFile("resource.proto", fileDescriptor5) }
var fileDescriptor5 = []byte{
// 405 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x93, 0xcd, 0x8e, 0xd3, 0x30,
0x10, 0xc7, 0x37, 0xc9, 0x6e, 0x4a, 0x07, 0x54, 0x56, 0x3e, 0x74, 0x4d, 0x40, 0x28, 0x0a, 0x97,
0x70, 0x49, 0xc5, 0xf2, 0x00, 0x9c, 0x38, 0x70, 0x40, 0x48, 0xe1, 0x0c, 0x52, 0x93, 0x0c, 0x55,
0xa0, 0xb1, 0x8d, 0x3f, 0x2a, 0xf5, 0x31, 0x78, 0x02, 0x5e, 0x8d, 0x47, 0x41, 0xfe, 0x48, 0xd5,
0x36, 0x50, 0xed, 0x6d, 0xfe, 0xff, 0x19, 0x8f, 0x7f, 0x33, 0x71, 0x60, 0x21, 0x51, 0x71, 0x23,
0x5b, 0xac, 0x84, 0xe4, 0x9a, 0x93, 0xb9, 0x30, 0x5b, 0x33, 0xf4, 0x52, 0xb4, 0xd9, 0xf3, 0x0d,
0xe7, 0x9b, 0x2d, 0xae, 0x5c, 0xa2, 0x31, 0xdf, 0x56, 0x38, 0x08, 0xbd, 0xf7, 0x75, 0xd9, 0x8b,
0xf3, 0xa4, 0xd2, 0xd2, 0xb4, 0x3a, 0x64, 0x17, 0x42, 0xf2, 0x5d, 0xdf, 0xa1, 0x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