pulumi/sdk/proto/go/analyzer.pb.go

222 lines
7.2 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go.
// source: analyzer.proto
// DO NOT EDIT!
/*
Package lumirpc is a generated protocol buffer package.
It is generated from these files:
analyzer.proto
engine.proto
Implement initial Lumi-as-a-library This is the initial step towards redefining Lumi as a library that runs atop vanilla Node.js/V8, rather than as its own runtime. This change is woefully incomplete but this includes some of the more stable pieces of my current work-in-progress. The new structure is that within the sdk/ directory we will have a client library per language. This client library contains the object model for Lumi (resources, properties, assets, config, etc), in addition to the "language runtime host" components required to interoperate with the Lumi resource monitor. This resource monitor is effectively what we call "Lumi" today, in that it's the thing orchestrating plans and deployments. Inside the sdk/ directory, you will find nodejs/, the Node.js client library, alongside proto/, the definitions for RPC interop between the different pieces of the system. This includes existing RPC definitions for resource providers, etc., in addition to the new ones for hosting different language runtimes from within Lumi. These new interfaces are surprisingly simple. There is effectively a bidirectional RPC channel between the Lumi resource monitor, represented by the lumirpc.ResourceMonitor interface, and each language runtime, represented by the lumirpc.LanguageRuntime interface. The overall orchestration goes as follows: 1) Lumi decides it needs to run a program written in language X, so it dynamically loads the language runtime plugin for language X. 2) Lumi passes that runtime a loopback address to its ResourceMonitor service, while language X will publish a connection back to its LanguageRuntime service, which Lumi will talk to. 3) Lumi then invokes LanguageRuntime.Run, passing information like the desired working directory, program name, arguments, and optional configuration variables to make available to the program. 4) The language X runtime receives this, unpacks it and sets up the necessary context, and then invokes the program. The program then calls into Lumi object model abstractions that internally communicate back to Lumi using the ResourceMonitor interface. 5) The key here is ResourceMonitor.NewResource, which Lumi uses to serialize state about newly allocated resources. Lumi receives these and registers them as part of the plan, doing the usual diffing, etc., to decide how to proceed. This interface is perhaps one of the most subtle parts of the new design, as it necessitates the use of promises internally to allow parallel evaluation of the resource plan, letting dataflow determine the available concurrency. 6) The program exits, and Lumi continues on its merry way. If the program fails, the RunResponse will include information about the failure. Due to (5), all properties on resources are now instances of a new Property<T> type. A Property<T> is just a thin wrapper over a T, but it encodes the special properties of Lumi resource properties. Namely, it is possible to create one out of a T, other Property<T>, Promise<T>, or to freshly allocate one. In all cases, the Property<T> does not "settle" until its final state is known. This cannot occur before the deployment actually completes, and so in general it's not safe to depend on concrete resolutions of values (unlike ordinary Promise<T>s which are usually expected to resolve). As a result, all derived computations are meant to use the `then` function (as in `someValue.then(v => v+x)`). Although this change includes tests that may be run in isolation to test the various RPC interactions, we are nowhere near finished. The remaining work primarily boils down to three things: 1) Wiring all of this up to the Lumi code. 2) Fixing the handful of known loose ends required to make this work, primarily around the serialization of properties (waiting on unresolved ones, serializing assets properly, etc). 3) Implementing lambda closure serialization as a native extension. This ongoing work is part of pulumi/pulumi-fabric#311.
2017-08-26 21:07:54 +02:00
languages.proto
provider.proto
It has these top-level messages:
AnalyzeRequest
AnalyzeResponse
AnalyzeFailure
LogRequest
Implement initial Lumi-as-a-library This is the initial step towards redefining Lumi as a library that runs atop vanilla Node.js/V8, rather than as its own runtime. This change is woefully incomplete but this includes some of the more stable pieces of my current work-in-progress. The new structure is that within the sdk/ directory we will have a client library per language. This client library contains the object model for Lumi (resources, properties, assets, config, etc), in addition to the "language runtime host" components required to interoperate with the Lumi resource monitor. This resource monitor is effectively what we call "Lumi" today, in that it's the thing orchestrating plans and deployments. Inside the sdk/ directory, you will find nodejs/, the Node.js client library, alongside proto/, the definitions for RPC interop between the different pieces of the system. This includes existing RPC definitions for resource providers, etc., in addition to the new ones for hosting different language runtimes from within Lumi. These new interfaces are surprisingly simple. There is effectively a bidirectional RPC channel between the Lumi resource monitor, represented by the lumirpc.ResourceMonitor interface, and each language runtime, represented by the lumirpc.LanguageRuntime interface. The overall orchestration goes as follows: 1) Lumi decides it needs to run a program written in language X, so it dynamically loads the language runtime plugin for language X. 2) Lumi passes that runtime a loopback address to its ResourceMonitor service, while language X will publish a connection back to its LanguageRuntime service, which Lumi will talk to. 3) Lumi then invokes LanguageRuntime.Run, passing information like the desired working directory, program name, arguments, and optional configuration variables to make available to the program. 4) The language X runtime receives this, unpacks it and sets up the necessary context, and then invokes the program. The program then calls into Lumi object model abstractions that internally communicate back to Lumi using the ResourceMonitor interface. 5) The key here is ResourceMonitor.NewResource, which Lumi uses to serialize state about newly allocated resources. Lumi receives these and registers them as part of the plan, doing the usual diffing, etc., to decide how to proceed. This interface is perhaps one of the most subtle parts of the new design, as it necessitates the use of promises internally to allow parallel evaluation of the resource plan, letting dataflow determine the available concurrency. 6) The program exits, and Lumi continues on its merry way. If the program fails, the RunResponse will include information about the failure. Due to (5), all properties on resources are now instances of a new Property<T> type. A Property<T> is just a thin wrapper over a T, but it encodes the special properties of Lumi resource properties. Namely, it is possible to create one out of a T, other Property<T>, Promise<T>, or to freshly allocate one. In all cases, the Property<T> does not "settle" until its final state is known. This cannot occur before the deployment actually completes, and so in general it's not safe to depend on concrete resolutions of values (unlike ordinary Promise<T>s which are usually expected to resolve). As a result, all derived computations are meant to use the `then` function (as in `someValue.then(v => v+x)`). Although this change includes tests that may be run in isolation to test the various RPC interactions, we are nowhere near finished. The remaining work primarily boils down to three things: 1) Wiring all of this up to the Lumi code. 2) Fixing the handful of known loose ends required to make this work, primarily around the serialization of properties (waiting on unresolved ones, serializing assets properly, etc). 3) Implementing lambda closure serialization as a native extension. This ongoing work is part of pulumi/pulumi-fabric#311.
2017-08-26 21:07:54 +02:00
RunRequest
RunResponse
NewResourceRequest
NewResourceResponse
ConfigureRequest
CheckRequest
CheckResponse
CheckFailure
DiffRequest
DiffResponse
CreateRequest
CreateResponse
Initial support for output properties (1 of 3) This change includes approximately 1/3rd of the change necessary to support output properties, as per pulumi/lumi#90. In short, the runtime now has a new hidden type, Latent<T>, which represents a "speculative" value, whose eventual type will be T, that we can use during evaluation in various ways. Namely, operations against Latent<T>s generally produce new Latent<U>s. During planning, any Latent<T>s that end up in resource properties are transformed into "unknown" property values. An unknown property value is legal only during planning-time activities, such as Check, Name, and InspectChange. As a result, those RPC interfaces have been updated to include lookaside maps indicating which properties have unknown values. My intent is to add some helper functions to make dealing with this circumstance more correct-by-construction. For now, using an unresolved Latent<T> in a conditional will lead to an error. See pulumi/lumi#67. Speculating beyond these -- by supporting iterative planning and application -- is something we want to support eventually, but it makes sense to do that as an additive change beyond this initial support. That is a missing 1/3. Finally, the other missing 1/3rd which will happen much sooner than the rest is restructuing plan application so that it will correctly observe resolution of Latent<T> values. Right now, the evaluation happens in one single pass, prior to the application, and so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 02:32:59 +02:00
UpdateRequest
UpdateResponse
DeleteRequest
*/
package lumirpc
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), "lumirpc.AnalyzeRequest")
proto.RegisterType((*AnalyzeResponse)(nil), "lumirpc.AnalyzeResponse")
proto.RegisterType((*AnalyzeFailure)(nil), "lumirpc.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, "/lumirpc.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: "/lumirpc.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: "lumirpc.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{
// 238 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x90, 0x31, 0x6b, 0xc3, 0x30,
0x10, 0x85, 0xeb, 0xb6, 0x24, 0xce, 0x15, 0x52, 0xb8, 0xa1, 0x35, 0xa6, 0x83, 0xf1, 0x94, 0x49,
0x81, 0x64, 0xe8, 0x56, 0x28, 0x94, 0x0c, 0x1d, 0xd5, 0xb9, 0x83, 0x13, 0x2e, 0xc1, 0xe0, 0x5a,
0xea, 0x49, 0x1a, 0xdc, 0x5f, 0x5f, 0x90, 0xae, 0xa2, 0xe0, 0xed, 0x4e, 0xef, 0xe9, 0xbb, 0x77,
0x07, 0xeb, 0x6e, 0xec, 0x86, 0xe9,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