b7576b9b14
This change adds the capability for a resource provider to indicate that, where an action carried out in response to a diff, a certain set of properties would be "stable"; that is to say, they are guaranteed not to change. As a result, properties may be resolved to their final values during previewing, avoiding erroneous cascading impacts. This avoids the ever-annoying situation I keep running into when demoing: when adding or removing an ingress rule to a security group, we ripple the impact through the instance, and claim it must be replaced, because that instance depends on the security group via its name. Well, the name is a great example of a stable property, in that it will never change, and so this is truly unfortunate and always adds uncertainty into the demos. Particularly since the actual update doesn't need to perform replacements. This resolves pulumi/pulumi#330.
224 lines
7.2 KiB
Go
224 lines
7.2 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: analyzer.proto
|
|
// DO NOT EDIT!
|
|
|
|
/*
|
|
Package pulumirpc is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
analyzer.proto
|
|
engine.proto
|
|
languages.proto
|
|
provider.proto
|
|
|
|
It has these top-level messages:
|
|
AnalyzeRequest
|
|
AnalyzeResponse
|
|
AnalyzeFailure
|
|
LogRequest
|
|
RunRequest
|
|
RunResponse
|
|
NewResourceRequest
|
|
NewResourceResponse
|
|
ConfigureRequest
|
|
InvokeRequest
|
|
InvokeResponse
|
|
CheckRequest
|
|
CheckResponse
|
|
CheckFailure
|
|
DiffRequest
|
|
DiffResponse
|
|
CreateRequest
|
|
CreateResponse
|
|
UpdateRequest
|
|
UpdateResponse
|
|
DeleteRequest
|
|
*/
|
|
package pulumirpc
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import google_protobuf "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
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type AnalyzeRequest struct {
|
|
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
|
|
Properties *google_protobuf.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
}
|
|
|
|
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
|
|
func (m *AnalyzeRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeRequest) ProtoMessage() {}
|
|
func (*AnalyzeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *AnalyzeRequest) GetType() string {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeRequest) GetProperties() *google_protobuf.Struct {
|
|
if m != nil {
|
|
return m.Properties
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AnalyzeResponse struct {
|
|
Failures []*AnalyzeFailure `protobuf:"bytes,1,rep,name=failures" json:"failures,omitempty"`
|
|
}
|
|
|
|
func (m *AnalyzeResponse) Reset() { *m = AnalyzeResponse{} }
|
|
func (m *AnalyzeResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeResponse) ProtoMessage() {}
|
|
func (*AnalyzeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
func (m *AnalyzeResponse) GetFailures() []*AnalyzeFailure {
|
|
if m != nil {
|
|
return m.Failures
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AnalyzeFailure struct {
|
|
Property string `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
|
|
Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"`
|
|
}
|
|
|
|
func (m *AnalyzeFailure) Reset() { *m = AnalyzeFailure{} }
|
|
func (m *AnalyzeFailure) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeFailure) ProtoMessage() {}
|
|
func (*AnalyzeFailure) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
|
|
|
func (m *AnalyzeFailure) GetProperty() string {
|
|
if m != nil {
|
|
return m.Property
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeFailure) GetReason() string {
|
|
if m != nil {
|
|
return m.Reason
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*AnalyzeRequest)(nil), "pulumirpc.AnalyzeRequest")
|
|
proto.RegisterType((*AnalyzeResponse)(nil), "pulumirpc.AnalyzeResponse")
|
|
proto.RegisterType((*AnalyzeFailure)(nil), "pulumirpc.AnalyzeFailure")
|
|
}
|
|
|
|
// 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 Analyzer service
|
|
|
|
type AnalyzerClient interface {
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
|
Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error)
|
|
}
|
|
|
|
type analyzerClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewAnalyzerClient(cc *grpc.ClientConn) AnalyzerClient {
|
|
return &analyzerClient{cc}
|
|
}
|
|
|
|
func (c *analyzerClient) Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
|
|
out := new(AnalyzeResponse)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/Analyze", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Analyzer service
|
|
|
|
type AnalyzerServer interface {
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
|
Analyze(context.Context, *AnalyzeRequest) (*AnalyzeResponse, error)
|
|
}
|
|
|
|
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer) {
|
|
s.RegisterService(&_Analyzer_serviceDesc, srv)
|
|
}
|
|
|
|
func _Analyzer_Analyze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AnalyzeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AnalyzerServer).Analyze(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.Analyzer/Analyze",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AnalyzerServer).Analyze(ctx, req.(*AnalyzeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Analyzer_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pulumirpc.Analyzer",
|
|
HandlerType: (*AnalyzerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Analyze",
|
|
Handler: _Analyzer_Analyze_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "analyzer.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 242 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
|
|
0x14, 0xc6, 0xad, 0xca, 0xd9, 0xbe, 0x83, 0x13, 0xde, 0xa0, 0xb5, 0x38, 0x94, 0x4e, 0x9d, 0x72,
|
|
0x50, 0x11, 0x67, 0x45, 0xc4, 0xc9, 0x21, 0xce, 0x0e, 0xbd, 0xe3, 0xdd, 0x51, 0xa8, 0x4d,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