github.com/MetalBlockchain/metalgo@v1.11.9/proto/pb/vm/runtime/runtime_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.3.0
     4  // - protoc             (unknown)
     5  // source: vm/runtime/runtime.proto
     6  
     7  package manager
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	emptypb "google.golang.org/protobuf/types/known/emptypb"
    15  )
    16  
    17  // This is a compile-time assertion to ensure that this generated file
    18  // is compatible with the grpc package it is being compiled against.
    19  // Requires gRPC-Go v1.32.0 or later.
    20  const _ = grpc.SupportPackageIsVersion7
    21  
    22  const (
    23  	Runtime_Initialize_FullMethodName = "/vm.runtime.Runtime/Initialize"
    24  )
    25  
    26  // RuntimeClient is the client API for Runtime service.
    27  //
    28  // 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.
    29  type RuntimeClient interface {
    30  	// Initialize a VM Runtime.
    31  	Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    32  }
    33  
    34  type runtimeClient struct {
    35  	cc grpc.ClientConnInterface
    36  }
    37  
    38  func NewRuntimeClient(cc grpc.ClientConnInterface) RuntimeClient {
    39  	return &runtimeClient{cc}
    40  }
    41  
    42  func (c *runtimeClient) Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
    43  	out := new(emptypb.Empty)
    44  	err := c.cc.Invoke(ctx, Runtime_Initialize_FullMethodName, in, out, opts...)
    45  	if err != nil {
    46  		return nil, err
    47  	}
    48  	return out, nil
    49  }
    50  
    51  // RuntimeServer is the server API for Runtime service.
    52  // All implementations must embed UnimplementedRuntimeServer
    53  // for forward compatibility
    54  type RuntimeServer interface {
    55  	// Initialize a VM Runtime.
    56  	Initialize(context.Context, *InitializeRequest) (*emptypb.Empty, error)
    57  	mustEmbedUnimplementedRuntimeServer()
    58  }
    59  
    60  // UnimplementedRuntimeServer must be embedded to have forward compatible implementations.
    61  type UnimplementedRuntimeServer struct {
    62  }
    63  
    64  func (UnimplementedRuntimeServer) Initialize(context.Context, *InitializeRequest) (*emptypb.Empty, error) {
    65  	return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
    66  }
    67  func (UnimplementedRuntimeServer) mustEmbedUnimplementedRuntimeServer() {}
    68  
    69  // UnsafeRuntimeServer may be embedded to opt out of forward compatibility for this service.
    70  // Use of this interface is not recommended, as added methods to RuntimeServer will
    71  // result in compilation errors.
    72  type UnsafeRuntimeServer interface {
    73  	mustEmbedUnimplementedRuntimeServer()
    74  }
    75  
    76  func RegisterRuntimeServer(s grpc.ServiceRegistrar, srv RuntimeServer) {
    77  	s.RegisterService(&Runtime_ServiceDesc, srv)
    78  }
    79  
    80  func _Runtime_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    81  	in := new(InitializeRequest)
    82  	if err := dec(in); err != nil {
    83  		return nil, err
    84  	}
    85  	if interceptor == nil {
    86  		return srv.(RuntimeServer).Initialize(ctx, in)
    87  	}
    88  	info := &grpc.UnaryServerInfo{
    89  		Server:     srv,
    90  		FullMethod: Runtime_Initialize_FullMethodName,
    91  	}
    92  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    93  		return srv.(RuntimeServer).Initialize(ctx, req.(*InitializeRequest))
    94  	}
    95  	return interceptor(ctx, in, info, handler)
    96  }
    97  
    98  // Runtime_ServiceDesc is the grpc.ServiceDesc for Runtime service.
    99  // It's only intended for direct use with grpc.RegisterService,
   100  // and not to be introspected or modified (even as a copy)
   101  var Runtime_ServiceDesc = grpc.ServiceDesc{
   102  	ServiceName: "vm.runtime.Runtime",
   103  	HandlerType: (*RuntimeServer)(nil),
   104  	Methods: []grpc.MethodDesc{
   105  		{
   106  			MethodName: "Initialize",
   107  			Handler:    _Runtime_Initialize_Handler,
   108  		},
   109  	},
   110  	Streams:  []grpc.StreamDesc{},
   111  	Metadata: "vm/runtime/runtime.proto",
   112  }