You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/rpcapi/terraform1/setup/setup_grpc.pb.go

177 lines
6.3 KiB

// Copyright IBM Corp. 2014, 2026
// SPDX-License-Identifier: BUSL-1.1
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.29.3
// source: setup.proto
package setup
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Setup_Handshake_FullMethodName = "/terraform1.setup.Setup/Handshake"
Setup_Stop_FullMethodName = "/terraform1.setup.Setup/Stop"
)
// SetupClient is the client API for Setup 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 SetupClient interface {
// Clients must call Handshake before any other function of any other
// service, to complete the capability negotiation step that may
// then affect the behaviors of subsequent operations.
//
// This function can be called only once per RPC server.
Handshake(ctx context.Context, in *Handshake_Request, opts ...grpc.CallOption) (*Handshake_Response, error)
// At any time after handshaking, clients may call Stop to initiate a
// graceful shutdown of the server.
Stop(ctx context.Context, in *Stop_Request, opts ...grpc.CallOption) (*Stop_Response, error)
}
type setupClient struct {
cc grpc.ClientConnInterface
}
func NewSetupClient(cc grpc.ClientConnInterface) SetupClient {
return &setupClient{cc}
}
func (c *setupClient) Handshake(ctx context.Context, in *Handshake_Request, opts ...grpc.CallOption) (*Handshake_Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Handshake_Response)
err := c.cc.Invoke(ctx, Setup_Handshake_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *setupClient) Stop(ctx context.Context, in *Stop_Request, opts ...grpc.CallOption) (*Stop_Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Stop_Response)
err := c.cc.Invoke(ctx, Setup_Stop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// SetupServer is the server API for Setup service.
// All implementations must embed UnimplementedSetupServer
// for forward compatibility.
type SetupServer interface {
// Clients must call Handshake before any other function of any other
// service, to complete the capability negotiation step that may
// then affect the behaviors of subsequent operations.
//
// This function can be called only once per RPC server.
Handshake(context.Context, *Handshake_Request) (*Handshake_Response, error)
// At any time after handshaking, clients may call Stop to initiate a
// graceful shutdown of the server.
Stop(context.Context, *Stop_Request) (*Stop_Response, error)
mustEmbedUnimplementedSetupServer()
}
// UnimplementedSetupServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSetupServer struct{}
func (UnimplementedSetupServer) Handshake(context.Context, *Handshake_Request) (*Handshake_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Handshake not implemented")
}
func (UnimplementedSetupServer) Stop(context.Context, *Stop_Request) (*Stop_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
}
func (UnimplementedSetupServer) mustEmbedUnimplementedSetupServer() {}
func (UnimplementedSetupServer) testEmbeddedByValue() {}
// UnsafeSetupServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SetupServer will
// result in compilation errors.
type UnsafeSetupServer interface {
mustEmbedUnimplementedSetupServer()
}
func RegisterSetupServer(s grpc.ServiceRegistrar, srv SetupServer) {
// If the following call pancis, it indicates UnimplementedSetupServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Setup_ServiceDesc, srv)
}
func _Setup_Handshake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Handshake_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SetupServer).Handshake(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Setup_Handshake_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SetupServer).Handshake(ctx, req.(*Handshake_Request))
}
return interceptor(ctx, in, info, handler)
}
func _Setup_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Stop_Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SetupServer).Stop(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Setup_Stop_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SetupServer).Stop(ctx, req.(*Stop_Request))
}
return interceptor(ctx, in, info, handler)
}
// Setup_ServiceDesc is the grpc.ServiceDesc for Setup service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Setup_ServiceDesc = grpc.ServiceDesc{
ServiceName: "terraform1.setup.Setup",
HandlerType: (*SetupServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Handshake",
Handler: _Setup_Handshake_Handler,
},
{
MethodName: "Stop",
Handler: _Setup_Stop_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "setup.proto",
}