pulumi/sdk/proto/go/runtime.pb.go
Luke Hoban 0c53db0587 Switch to real gRPC interface between host and guest
Introduce a new gRPC service for `runtime`.

Support a single `construct` method on the new gRPC service.

Spawn a separate Node.js process to run the gRPC service, and remote calls to it from the host language runtime `construct` API.
2020-07-15 15:09:34 -07:00

234 lines
8.2 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: runtime.proto
package pulumirpc
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/golang/protobuf/ptypes/empty"
import _struct "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 ConstructRequest struct {
LibraryPath string `protobuf:"bytes,1,opt,name=libraryPath" json:"libraryPath,omitempty"`
Resource string `protobuf:"bytes,2,opt,name=resource" json:"resource,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
Args *_struct.Struct `protobuf:"bytes,4,opt,name=args" json:"args,omitempty"`
Opts *_struct.Struct `protobuf:"bytes,5,opt,name=opts" json:"opts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConstructRequest) Reset() { *m = ConstructRequest{} }
func (m *ConstructRequest) String() string { return proto.CompactTextString(m) }
func (*ConstructRequest) ProtoMessage() {}
func (*ConstructRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_runtime_775b1abeaa5bed1a, []int{0}
}
func (m *ConstructRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConstructRequest.Unmarshal(m, b)
}
func (m *ConstructRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConstructRequest.Marshal(b, m, deterministic)
}
func (dst *ConstructRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConstructRequest.Merge(dst, src)
}
func (m *ConstructRequest) XXX_Size() int {
return xxx_messageInfo_ConstructRequest.Size(m)
}
func (m *ConstructRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ConstructRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ConstructRequest proto.InternalMessageInfo
func (m *ConstructRequest) GetLibraryPath() string {
if m != nil {
return m.LibraryPath
}
return ""
}
func (m *ConstructRequest) GetResource() string {
if m != nil {
return m.Resource
}
return ""
}
func (m *ConstructRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ConstructRequest) GetArgs() *_struct.Struct {
if m != nil {
return m.Args
}
return nil
}
func (m *ConstructRequest) GetOpts() *_struct.Struct {
if m != nil {
return m.Opts
}
return nil
}
type ConstructResponse struct {
Outs *_struct.Struct `protobuf:"bytes,1,opt,name=outs" json:"outs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConstructResponse) Reset() { *m = ConstructResponse{} }
func (m *ConstructResponse) String() string { return proto.CompactTextString(m) }
func (*ConstructResponse) ProtoMessage() {}
func (*ConstructResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_runtime_775b1abeaa5bed1a, []int{1}
}
func (m *ConstructResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConstructResponse.Unmarshal(m, b)
}
func (m *ConstructResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConstructResponse.Marshal(b, m, deterministic)
}
func (dst *ConstructResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConstructResponse.Merge(dst, src)
}
func (m *ConstructResponse) XXX_Size() int {
return xxx_messageInfo_ConstructResponse.Size(m)
}
func (m *ConstructResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ConstructResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ConstructResponse proto.InternalMessageInfo
func (m *ConstructResponse) GetOuts() *_struct.Struct {
if m != nil {
return m.Outs
}
return nil
}
func init() {
proto.RegisterType((*ConstructRequest)(nil), "pulumirpc.ConstructRequest")
proto.RegisterType((*ConstructResponse)(nil), "pulumirpc.ConstructResponse")
}
// 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 Runtime service
type RuntimeClient interface {
Construct(ctx context.Context, in *ConstructRequest, opts ...grpc.CallOption) (*ConstructResponse, error)
}
type runtimeClient struct {
cc *grpc.ClientConn
}
func NewRuntimeClient(cc *grpc.ClientConn) RuntimeClient {
return &runtimeClient{cc}
}
func (c *runtimeClient) Construct(ctx context.Context, in *ConstructRequest, opts ...grpc.CallOption) (*ConstructResponse, error) {
out := new(ConstructResponse)
err := grpc.Invoke(ctx, "/pulumirpc.Runtime/Construct", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Runtime service
type RuntimeServer interface {
Construct(context.Context, *ConstructRequest) (*ConstructResponse, error)
}
func RegisterRuntimeServer(s *grpc.Server, srv RuntimeServer) {
s.RegisterService(&_Runtime_serviceDesc, srv)
}
func _Runtime_Construct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConstructRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RuntimeServer).Construct(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.Runtime/Construct",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RuntimeServer).Construct(ctx, req.(*ConstructRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Runtime_serviceDesc = grpc.ServiceDesc{
ServiceName: "pulumirpc.Runtime",
HandlerType: (*RuntimeServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Construct",
Handler: _Runtime_Construct_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "runtime.proto",
}
func init() { proto.RegisterFile("runtime.proto", fileDescriptor_runtime_775b1abeaa5bed1a) }
var fileDescriptor_runtime_775b1abeaa5bed1a = []byte{
// 256 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x90, 0xcd, 0x4a, 0xc4, 0x30,
0x1c, 0xc4, 0xad, 0xd6, 0x8f, 0x66, 0x15, 0x34, 0x17, 0x43, 0x77, 0x0f, 0xa5, 0xa7, 0x05, 0x21,
0x0b, 0xeb, 0x0b, 0x08, 0x5e, 0x3c, 0x4a, 0xf7, 0x09, 0xda, 0x12, 0x6b, 0xa1, 0x4d, 0xe2, 0xff,
0xe3, 0xb0, 0x2f, 0xe7, 0xb3, 0xc9, 0x26, 0x5a, 0x96, 0x22, 0x7a, 0x4b, 0xe6, 0x37, 0xfc, 0x67,
0x18, 0x71, 0x03, 0x6c, 0xa9, 0x1f, 0x8d, 0xf6, 0xe0, 0xc8, 0xc9, 0xcc, 0xf3, 0xc0, 0x63, 0x0f,
0xbe, 0xcd, 0xaf, 0xfd, 0xc0, 0x5d, 0x6f, 0x23, 0xc8, 0x97, 0x9d, 0x73, 0xdd, 0x60, 0x36, 0xe1,
0xd7, 0xf0, 0xdb, 0xc6, 0x8c, 0x9e, 0xf6, 0xdf, 0x70, 0x35, 0x87, 0x48, 0xc0, 0x2d, 0x45, 0x5a,
0x7e, 0x26, 0xe2, 0xf6, 0xd9, 0xd9, 0xa8, 0x55, 0xe6, 0x83, 0x0d, 0x92, 0x2c, 0xc4, 0x62, 0xe8,
0x1b, 0xa8, 0x61, 0xff, 0x5a, 0xd3, 0xbb, 0x4a, 0x8a, 0x64, 0x9d, 0x55, 0xc7, 0x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