github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/rpc/rpcdump/rpcdump_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 3 package rpcdump 4 5 import ( 6 context "context" 7 8 dump "github.com/hyperledger/burrow/dump" 9 grpc "google.golang.org/grpc" 10 codes "google.golang.org/grpc/codes" 11 status "google.golang.org/grpc/status" 12 ) 13 14 // This is a compile-time assertion to ensure that this generated file 15 // is compatible with the grpc package it is being compiled against. 16 // Requires gRPC-Go v1.32.0 or later. 17 const _ = grpc.SupportPackageIsVersion7 18 19 // DumpClient is the client API for Dump service. 20 // 21 // 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. 22 type DumpClient interface { 23 GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) 24 } 25 26 type dumpClient struct { 27 cc grpc.ClientConnInterface 28 } 29 30 func NewDumpClient(cc grpc.ClientConnInterface) DumpClient { 31 return &dumpClient{cc} 32 } 33 34 func (c *dumpClient) GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) { 35 stream, err := c.cc.NewStream(ctx, &Dump_ServiceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) 36 if err != nil { 37 return nil, err 38 } 39 x := &dumpGetDumpClient{stream} 40 if err := x.ClientStream.SendMsg(in); err != nil { 41 return nil, err 42 } 43 if err := x.ClientStream.CloseSend(); err != nil { 44 return nil, err 45 } 46 return x, nil 47 } 48 49 type Dump_GetDumpClient interface { 50 Recv() (*dump.Dump, error) 51 grpc.ClientStream 52 } 53 54 type dumpGetDumpClient struct { 55 grpc.ClientStream 56 } 57 58 func (x *dumpGetDumpClient) Recv() (*dump.Dump, error) { 59 m := new(dump.Dump) 60 if err := x.ClientStream.RecvMsg(m); err != nil { 61 return nil, err 62 } 63 return m, nil 64 } 65 66 // DumpServer is the server API for Dump service. 67 // All implementations must embed UnimplementedDumpServer 68 // for forward compatibility 69 type DumpServer interface { 70 GetDump(*GetDumpParam, Dump_GetDumpServer) error 71 mustEmbedUnimplementedDumpServer() 72 } 73 74 // UnimplementedDumpServer must be embedded to have forward compatible implementations. 75 type UnimplementedDumpServer struct { 76 } 77 78 func (UnimplementedDumpServer) GetDump(*GetDumpParam, Dump_GetDumpServer) error { 79 return status.Errorf(codes.Unimplemented, "method GetDump not implemented") 80 } 81 func (UnimplementedDumpServer) mustEmbedUnimplementedDumpServer() {} 82 83 // UnsafeDumpServer may be embedded to opt out of forward compatibility for this service. 84 // Use of this interface is not recommended, as added methods to DumpServer will 85 // result in compilation errors. 86 type UnsafeDumpServer interface { 87 mustEmbedUnimplementedDumpServer() 88 } 89 90 func RegisterDumpServer(s grpc.ServiceRegistrar, srv DumpServer) { 91 s.RegisterService(&Dump_ServiceDesc, srv) 92 } 93 94 func _Dump_GetDump_Handler(srv interface{}, stream grpc.ServerStream) error { 95 m := new(GetDumpParam) 96 if err := stream.RecvMsg(m); err != nil { 97 return err 98 } 99 return srv.(DumpServer).GetDump(m, &dumpGetDumpServer{stream}) 100 } 101 102 type Dump_GetDumpServer interface { 103 Send(*dump.Dump) error 104 grpc.ServerStream 105 } 106 107 type dumpGetDumpServer struct { 108 grpc.ServerStream 109 } 110 111 func (x *dumpGetDumpServer) Send(m *dump.Dump) error { 112 return x.ServerStream.SendMsg(m) 113 } 114 115 // Dump_ServiceDesc is the grpc.ServiceDesc for Dump service. 116 // It's only intended for direct use with grpc.RegisterService, 117 // and not to be introspected or modified (even as a copy) 118 var Dump_ServiceDesc = grpc.ServiceDesc{ 119 ServiceName: "rpcdump.Dump", 120 HandlerType: (*DumpServer)(nil), 121 Methods: []grpc.MethodDesc{}, 122 Streams: []grpc.StreamDesc{ 123 { 124 StreamName: "GetDump", 125 Handler: _Dump_GetDump_Handler, 126 ServerStreams: true, 127 }, 128 }, 129 Metadata: "rpcdump.proto", 130 }