pulumi/sdk/proto/go/engine_grpc.pb.go

187 lines
6.8 KiB
Go
Raw Permalink Normal View History

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.20.1
// source: pulumi/engine.proto
package pulumirpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
Plumb Remote, Component, and LogicalName into the import plugin system (#15199) <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes https://github.com/pulumi/pulumi/issues/14532. 14532 was just for Remote and Component, but since raising that we've added LogicalName as well so this PR also adds support for that. ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [x] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- @Pulumi employees: If yes, you must submit corresponding changes in the service repo. -->
2024-01-24 17:15:30 +00:00
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// EngineClient is the client API for Engine service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type EngineClient interface {
// Log logs a global message in the engine, including errors and warnings.
Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// GetRootResource gets the URN of the root resource, the resource that should be the root of all
// otherwise-unparented resources.
GetRootResource(ctx context.Context, in *GetRootResourceRequest, opts ...grpc.CallOption) (*GetRootResourceResponse, error)
// SetRootResource sets the URN of the root resource.
SetRootResource(ctx context.Context, in *SetRootResourceRequest, opts ...grpc.CallOption) (*SetRootResourceResponse, error)
}
type engineClient struct {
cc grpc.ClientConnInterface
}
func NewEngineClient(cc grpc.ClientConnInterface) EngineClient {
return &engineClient{cc}
}
func (c *engineClient) Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/pulumirpc.Engine/Log", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *engineClient) GetRootResource(ctx context.Context, in *GetRootResourceRequest, opts ...grpc.CallOption) (*GetRootResourceResponse, error) {
out := new(GetRootResourceResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.Engine/GetRootResource", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *engineClient) SetRootResource(ctx context.Context, in *SetRootResourceRequest, opts ...grpc.CallOption) (*SetRootResourceResponse, error) {
out := new(SetRootResourceResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.Engine/SetRootResource", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EngineServer is the server API for Engine service.
// All implementations must embed UnimplementedEngineServer
// for forward compatibility
type EngineServer interface {
// Log logs a global message in the engine, including errors and warnings.
Log(context.Context, *LogRequest) (*emptypb.Empty, error)
// GetRootResource gets the URN of the root resource, the resource that should be the root of all
// otherwise-unparented resources.
GetRootResource(context.Context, *GetRootResourceRequest) (*GetRootResourceResponse, error)
// SetRootResource sets the URN of the root resource.
SetRootResource(context.Context, *SetRootResourceRequest) (*SetRootResourceResponse, error)
mustEmbedUnimplementedEngineServer()
}
// UnimplementedEngineServer must be embedded to have forward compatible implementations.
2023-03-04 22:11:52 +00:00
type UnimplementedEngineServer struct {
}
func (UnimplementedEngineServer) Log(context.Context, *LogRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Log not implemented")
}
func (UnimplementedEngineServer) GetRootResource(context.Context, *GetRootResourceRequest) (*GetRootResourceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRootResource not implemented")
}
func (UnimplementedEngineServer) SetRootResource(context.Context, *SetRootResourceRequest) (*SetRootResourceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetRootResource not implemented")
}
func (UnimplementedEngineServer) mustEmbedUnimplementedEngineServer() {}
// UnsafeEngineServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EngineServer will
// result in compilation errors.
type UnsafeEngineServer interface {
mustEmbedUnimplementedEngineServer()
}
func RegisterEngineServer(s grpc.ServiceRegistrar, srv EngineServer) {
s.RegisterService(&Engine_ServiceDesc, srv)
}
func _Engine_Log_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LogRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EngineServer).Log(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.Engine/Log",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EngineServer).Log(ctx, req.(*LogRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Engine_GetRootResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRootResourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EngineServer).GetRootResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.Engine/GetRootResource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EngineServer).GetRootResource(ctx, req.(*GetRootResourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Engine_SetRootResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetRootResourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EngineServer).SetRootResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.Engine/SetRootResource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EngineServer).SetRootResource(ctx, req.(*SetRootResourceRequest))
}
return interceptor(ctx, in, info, handler)
}
// Engine_ServiceDesc is the grpc.ServiceDesc for Engine service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Engine_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pulumirpc.Engine",
HandlerType: (*EngineServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Log",
Handler: _Engine_Log_Handler,
},
{
MethodName: "GetRootResource",
Handler: _Engine_GetRootResource_Handler,
},
{
MethodName: "SetRootResource",
Handler: _Engine_SetRootResource_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pulumi/engine.proto",
}