github.com/ledgerwatch/erigon-lib@v1.0.0/gointerfaces/remote/ethbackend_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 v4.24.2 5 // source: remote/ethbackend.proto 6 7 package remote 8 9 import ( 10 context "context" 11 types "github.com/ledgerwatch/erigon-lib/gointerfaces/types" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 emptypb "google.golang.org/protobuf/types/known/emptypb" 16 ) 17 18 // This is a compile-time assertion to ensure that this generated file 19 // is compatible with the grpc package it is being compiled against. 20 // Requires gRPC-Go v1.32.0 or later. 21 const _ = grpc.SupportPackageIsVersion7 22 23 const ( 24 ETHBACKEND_Etherbase_FullMethodName = "/remote.ETHBACKEND/Etherbase" 25 ETHBACKEND_NetVersion_FullMethodName = "/remote.ETHBACKEND/NetVersion" 26 ETHBACKEND_NetPeerCount_FullMethodName = "/remote.ETHBACKEND/NetPeerCount" 27 ETHBACKEND_Version_FullMethodName = "/remote.ETHBACKEND/Version" 28 ETHBACKEND_ProtocolVersion_FullMethodName = "/remote.ETHBACKEND/ProtocolVersion" 29 ETHBACKEND_ClientVersion_FullMethodName = "/remote.ETHBACKEND/ClientVersion" 30 ETHBACKEND_Subscribe_FullMethodName = "/remote.ETHBACKEND/Subscribe" 31 ETHBACKEND_SubscribeLogs_FullMethodName = "/remote.ETHBACKEND/SubscribeLogs" 32 ETHBACKEND_Block_FullMethodName = "/remote.ETHBACKEND/Block" 33 ETHBACKEND_TxnLookup_FullMethodName = "/remote.ETHBACKEND/TxnLookup" 34 ETHBACKEND_NodeInfo_FullMethodName = "/remote.ETHBACKEND/NodeInfo" 35 ETHBACKEND_Peers_FullMethodName = "/remote.ETHBACKEND/Peers" 36 ETHBACKEND_AddPeer_FullMethodName = "/remote.ETHBACKEND/AddPeer" 37 ETHBACKEND_PendingBlock_FullMethodName = "/remote.ETHBACKEND/PendingBlock" 38 ETHBACKEND_BorEvent_FullMethodName = "/remote.ETHBACKEND/BorEvent" 39 ) 40 41 // ETHBACKENDClient is the client API for ETHBACKEND service. 42 // 43 // 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. 44 type ETHBACKENDClient interface { 45 Etherbase(ctx context.Context, in *EtherbaseRequest, opts ...grpc.CallOption) (*EtherbaseReply, error) 46 NetVersion(ctx context.Context, in *NetVersionRequest, opts ...grpc.CallOption) (*NetVersionReply, error) 47 NetPeerCount(ctx context.Context, in *NetPeerCountRequest, opts ...grpc.CallOption) (*NetPeerCountReply, error) 48 // Version returns the service version number 49 Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*types.VersionReply, error) 50 // ProtocolVersion returns the Ethereum protocol version number (e.g. 66 for ETH66). 51 ProtocolVersion(ctx context.Context, in *ProtocolVersionRequest, opts ...grpc.CallOption) (*ProtocolVersionReply, error) 52 // ClientVersion returns the Ethereum client version string using node name convention (e.g. TurboGeth/v2021.03.2-alpha/Linux). 53 ClientVersion(ctx context.Context, in *ClientVersionRequest, opts ...grpc.CallOption) (*ClientVersionReply, error) 54 Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (ETHBACKEND_SubscribeClient, error) 55 // Only one subscription is needed to serve all the users, LogsFilterRequest allows to dynamically modifying the subscription 56 SubscribeLogs(ctx context.Context, opts ...grpc.CallOption) (ETHBACKEND_SubscribeLogsClient, error) 57 // High-level method - can read block from db, snapshots or apply any other logic 58 // it doesn't provide consistency 59 // Request fields are optional - it's ok to request block only by hash or only by number 60 Block(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockReply, error) 61 // High-level method - can find block number by txn hash 62 // it doesn't provide consistency 63 TxnLookup(ctx context.Context, in *TxnLookupRequest, opts ...grpc.CallOption) (*TxnLookupReply, error) 64 // NodeInfo collects and returns NodeInfo from all running sentry instances. 65 NodeInfo(ctx context.Context, in *NodesInfoRequest, opts ...grpc.CallOption) (*NodesInfoReply, error) 66 // Peers collects and returns peers information from all running sentry instances. 67 Peers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PeersReply, error) 68 AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerReply, error) 69 // PendingBlock returns latest built block. 70 PendingBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PendingBlockReply, error) 71 BorEvent(ctx context.Context, in *BorEventRequest, opts ...grpc.CallOption) (*BorEventReply, error) 72 } 73 74 type eTHBACKENDClient struct { 75 cc grpc.ClientConnInterface 76 } 77 78 func NewETHBACKENDClient(cc grpc.ClientConnInterface) ETHBACKENDClient { 79 return &eTHBACKENDClient{cc} 80 } 81 82 func (c *eTHBACKENDClient) Etherbase(ctx context.Context, in *EtherbaseRequest, opts ...grpc.CallOption) (*EtherbaseReply, error) { 83 out := new(EtherbaseReply) 84 err := c.cc.Invoke(ctx, ETHBACKEND_Etherbase_FullMethodName, in, out, opts...) 85 if err != nil { 86 return nil, err 87 } 88 return out, nil 89 } 90 91 func (c *eTHBACKENDClient) NetVersion(ctx context.Context, in *NetVersionRequest, opts ...grpc.CallOption) (*NetVersionReply, error) { 92 out := new(NetVersionReply) 93 err := c.cc.Invoke(ctx, ETHBACKEND_NetVersion_FullMethodName, in, out, opts...) 94 if err != nil { 95 return nil, err 96 } 97 return out, nil 98 } 99 100 func (c *eTHBACKENDClient) NetPeerCount(ctx context.Context, in *NetPeerCountRequest, opts ...grpc.CallOption) (*NetPeerCountReply, error) { 101 out := new(NetPeerCountReply) 102 err := c.cc.Invoke(ctx, ETHBACKEND_NetPeerCount_FullMethodName, in, out, opts...) 103 if err != nil { 104 return nil, err 105 } 106 return out, nil 107 } 108 109 func (c *eTHBACKENDClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*types.VersionReply, error) { 110 out := new(types.VersionReply) 111 err := c.cc.Invoke(ctx, ETHBACKEND_Version_FullMethodName, in, out, opts...) 112 if err != nil { 113 return nil, err 114 } 115 return out, nil 116 } 117 118 func (c *eTHBACKENDClient) ProtocolVersion(ctx context.Context, in *ProtocolVersionRequest, opts ...grpc.CallOption) (*ProtocolVersionReply, error) { 119 out := new(ProtocolVersionReply) 120 err := c.cc.Invoke(ctx, ETHBACKEND_ProtocolVersion_FullMethodName, in, out, opts...) 121 if err != nil { 122 return nil, err 123 } 124 return out, nil 125 } 126 127 func (c *eTHBACKENDClient) ClientVersion(ctx context.Context, in *ClientVersionRequest, opts ...grpc.CallOption) (*ClientVersionReply, error) { 128 out := new(ClientVersionReply) 129 err := c.cc.Invoke(ctx, ETHBACKEND_ClientVersion_FullMethodName, in, out, opts...) 130 if err != nil { 131 return nil, err 132 } 133 return out, nil 134 } 135 136 func (c *eTHBACKENDClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (ETHBACKEND_SubscribeClient, error) { 137 stream, err := c.cc.NewStream(ctx, ÐBACKEND_ServiceDesc.Streams[0], ETHBACKEND_Subscribe_FullMethodName, opts...) 138 if err != nil { 139 return nil, err 140 } 141 x := &eTHBACKENDSubscribeClient{stream} 142 if err := x.ClientStream.SendMsg(in); err != nil { 143 return nil, err 144 } 145 if err := x.ClientStream.CloseSend(); err != nil { 146 return nil, err 147 } 148 return x, nil 149 } 150 151 type ETHBACKEND_SubscribeClient interface { 152 Recv() (*SubscribeReply, error) 153 grpc.ClientStream 154 } 155 156 type eTHBACKENDSubscribeClient struct { 157 grpc.ClientStream 158 } 159 160 func (x *eTHBACKENDSubscribeClient) Recv() (*SubscribeReply, error) { 161 m := new(SubscribeReply) 162 if err := x.ClientStream.RecvMsg(m); err != nil { 163 return nil, err 164 } 165 return m, nil 166 } 167 168 func (c *eTHBACKENDClient) SubscribeLogs(ctx context.Context, opts ...grpc.CallOption) (ETHBACKEND_SubscribeLogsClient, error) { 169 stream, err := c.cc.NewStream(ctx, ÐBACKEND_ServiceDesc.Streams[1], ETHBACKEND_SubscribeLogs_FullMethodName, opts...) 170 if err != nil { 171 return nil, err 172 } 173 x := &eTHBACKENDSubscribeLogsClient{stream} 174 return x, nil 175 } 176 177 type ETHBACKEND_SubscribeLogsClient interface { 178 Send(*LogsFilterRequest) error 179 Recv() (*SubscribeLogsReply, error) 180 grpc.ClientStream 181 } 182 183 type eTHBACKENDSubscribeLogsClient struct { 184 grpc.ClientStream 185 } 186 187 func (x *eTHBACKENDSubscribeLogsClient) Send(m *LogsFilterRequest) error { 188 return x.ClientStream.SendMsg(m) 189 } 190 191 func (x *eTHBACKENDSubscribeLogsClient) Recv() (*SubscribeLogsReply, error) { 192 m := new(SubscribeLogsReply) 193 if err := x.ClientStream.RecvMsg(m); err != nil { 194 return nil, err 195 } 196 return m, nil 197 } 198 199 func (c *eTHBACKENDClient) Block(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockReply, error) { 200 out := new(BlockReply) 201 err := c.cc.Invoke(ctx, ETHBACKEND_Block_FullMethodName, in, out, opts...) 202 if err != nil { 203 return nil, err 204 } 205 return out, nil 206 } 207 208 func (c *eTHBACKENDClient) TxnLookup(ctx context.Context, in *TxnLookupRequest, opts ...grpc.CallOption) (*TxnLookupReply, error) { 209 out := new(TxnLookupReply) 210 err := c.cc.Invoke(ctx, ETHBACKEND_TxnLookup_FullMethodName, in, out, opts...) 211 if err != nil { 212 return nil, err 213 } 214 return out, nil 215 } 216 217 func (c *eTHBACKENDClient) NodeInfo(ctx context.Context, in *NodesInfoRequest, opts ...grpc.CallOption) (*NodesInfoReply, error) { 218 out := new(NodesInfoReply) 219 err := c.cc.Invoke(ctx, ETHBACKEND_NodeInfo_FullMethodName, in, out, opts...) 220 if err != nil { 221 return nil, err 222 } 223 return out, nil 224 } 225 226 func (c *eTHBACKENDClient) Peers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PeersReply, error) { 227 out := new(PeersReply) 228 err := c.cc.Invoke(ctx, ETHBACKEND_Peers_FullMethodName, in, out, opts...) 229 if err != nil { 230 return nil, err 231 } 232 return out, nil 233 } 234 235 func (c *eTHBACKENDClient) AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerReply, error) { 236 out := new(AddPeerReply) 237 err := c.cc.Invoke(ctx, ETHBACKEND_AddPeer_FullMethodName, in, out, opts...) 238 if err != nil { 239 return nil, err 240 } 241 return out, nil 242 } 243 244 func (c *eTHBACKENDClient) PendingBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PendingBlockReply, error) { 245 out := new(PendingBlockReply) 246 err := c.cc.Invoke(ctx, ETHBACKEND_PendingBlock_FullMethodName, in, out, opts...) 247 if err != nil { 248 return nil, err 249 } 250 return out, nil 251 } 252 253 func (c *eTHBACKENDClient) BorEvent(ctx context.Context, in *BorEventRequest, opts ...grpc.CallOption) (*BorEventReply, error) { 254 out := new(BorEventReply) 255 err := c.cc.Invoke(ctx, ETHBACKEND_BorEvent_FullMethodName, in, out, opts...) 256 if err != nil { 257 return nil, err 258 } 259 return out, nil 260 } 261 262 // ETHBACKENDServer is the server API for ETHBACKEND service. 263 // All implementations must embed UnimplementedETHBACKENDServer 264 // for forward compatibility 265 type ETHBACKENDServer interface { 266 Etherbase(context.Context, *EtherbaseRequest) (*EtherbaseReply, error) 267 NetVersion(context.Context, *NetVersionRequest) (*NetVersionReply, error) 268 NetPeerCount(context.Context, *NetPeerCountRequest) (*NetPeerCountReply, error) 269 // Version returns the service version number 270 Version(context.Context, *emptypb.Empty) (*types.VersionReply, error) 271 // ProtocolVersion returns the Ethereum protocol version number (e.g. 66 for ETH66). 272 ProtocolVersion(context.Context, *ProtocolVersionRequest) (*ProtocolVersionReply, error) 273 // ClientVersion returns the Ethereum client version string using node name convention (e.g. TurboGeth/v2021.03.2-alpha/Linux). 274 ClientVersion(context.Context, *ClientVersionRequest) (*ClientVersionReply, error) 275 Subscribe(*SubscribeRequest, ETHBACKEND_SubscribeServer) error 276 // Only one subscription is needed to serve all the users, LogsFilterRequest allows to dynamically modifying the subscription 277 SubscribeLogs(ETHBACKEND_SubscribeLogsServer) error 278 // High-level method - can read block from db, snapshots or apply any other logic 279 // it doesn't provide consistency 280 // Request fields are optional - it's ok to request block only by hash or only by number 281 Block(context.Context, *BlockRequest) (*BlockReply, error) 282 // High-level method - can find block number by txn hash 283 // it doesn't provide consistency 284 TxnLookup(context.Context, *TxnLookupRequest) (*TxnLookupReply, error) 285 // NodeInfo collects and returns NodeInfo from all running sentry instances. 286 NodeInfo(context.Context, *NodesInfoRequest) (*NodesInfoReply, error) 287 // Peers collects and returns peers information from all running sentry instances. 288 Peers(context.Context, *emptypb.Empty) (*PeersReply, error) 289 AddPeer(context.Context, *AddPeerRequest) (*AddPeerReply, error) 290 // PendingBlock returns latest built block. 291 PendingBlock(context.Context, *emptypb.Empty) (*PendingBlockReply, error) 292 BorEvent(context.Context, *BorEventRequest) (*BorEventReply, error) 293 mustEmbedUnimplementedETHBACKENDServer() 294 } 295 296 // UnimplementedETHBACKENDServer must be embedded to have forward compatible implementations. 297 type UnimplementedETHBACKENDServer struct { 298 } 299 300 func (UnimplementedETHBACKENDServer) Etherbase(context.Context, *EtherbaseRequest) (*EtherbaseReply, error) { 301 return nil, status.Errorf(codes.Unimplemented, "method Etherbase not implemented") 302 } 303 func (UnimplementedETHBACKENDServer) NetVersion(context.Context, *NetVersionRequest) (*NetVersionReply, error) { 304 return nil, status.Errorf(codes.Unimplemented, "method NetVersion not implemented") 305 } 306 func (UnimplementedETHBACKENDServer) NetPeerCount(context.Context, *NetPeerCountRequest) (*NetPeerCountReply, error) { 307 return nil, status.Errorf(codes.Unimplemented, "method NetPeerCount not implemented") 308 } 309 func (UnimplementedETHBACKENDServer) Version(context.Context, *emptypb.Empty) (*types.VersionReply, error) { 310 return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") 311 } 312 func (UnimplementedETHBACKENDServer) ProtocolVersion(context.Context, *ProtocolVersionRequest) (*ProtocolVersionReply, error) { 313 return nil, status.Errorf(codes.Unimplemented, "method ProtocolVersion not implemented") 314 } 315 func (UnimplementedETHBACKENDServer) ClientVersion(context.Context, *ClientVersionRequest) (*ClientVersionReply, error) { 316 return nil, status.Errorf(codes.Unimplemented, "method ClientVersion not implemented") 317 } 318 func (UnimplementedETHBACKENDServer) Subscribe(*SubscribeRequest, ETHBACKEND_SubscribeServer) error { 319 return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") 320 } 321 func (UnimplementedETHBACKENDServer) SubscribeLogs(ETHBACKEND_SubscribeLogsServer) error { 322 return status.Errorf(codes.Unimplemented, "method SubscribeLogs not implemented") 323 } 324 func (UnimplementedETHBACKENDServer) Block(context.Context, *BlockRequest) (*BlockReply, error) { 325 return nil, status.Errorf(codes.Unimplemented, "method Block not implemented") 326 } 327 func (UnimplementedETHBACKENDServer) TxnLookup(context.Context, *TxnLookupRequest) (*TxnLookupReply, error) { 328 return nil, status.Errorf(codes.Unimplemented, "method TxnLookup not implemented") 329 } 330 func (UnimplementedETHBACKENDServer) NodeInfo(context.Context, *NodesInfoRequest) (*NodesInfoReply, error) { 331 return nil, status.Errorf(codes.Unimplemented, "method NodeInfo not implemented") 332 } 333 func (UnimplementedETHBACKENDServer) Peers(context.Context, *emptypb.Empty) (*PeersReply, error) { 334 return nil, status.Errorf(codes.Unimplemented, "method Peers not implemented") 335 } 336 func (UnimplementedETHBACKENDServer) AddPeer(context.Context, *AddPeerRequest) (*AddPeerReply, error) { 337 return nil, status.Errorf(codes.Unimplemented, "method AddPeer not implemented") 338 } 339 func (UnimplementedETHBACKENDServer) PendingBlock(context.Context, *emptypb.Empty) (*PendingBlockReply, error) { 340 return nil, status.Errorf(codes.Unimplemented, "method PendingBlock not implemented") 341 } 342 func (UnimplementedETHBACKENDServer) BorEvent(context.Context, *BorEventRequest) (*BorEventReply, error) { 343 return nil, status.Errorf(codes.Unimplemented, "method BorEvent not implemented") 344 } 345 func (UnimplementedETHBACKENDServer) mustEmbedUnimplementedETHBACKENDServer() {} 346 347 // UnsafeETHBACKENDServer may be embedded to opt out of forward compatibility for this service. 348 // Use of this interface is not recommended, as added methods to ETHBACKENDServer will 349 // result in compilation errors. 350 type UnsafeETHBACKENDServer interface { 351 mustEmbedUnimplementedETHBACKENDServer() 352 } 353 354 func RegisterETHBACKENDServer(s grpc.ServiceRegistrar, srv ETHBACKENDServer) { 355 s.RegisterService(ÐBACKEND_ServiceDesc, srv) 356 } 357 358 func _ETHBACKEND_Etherbase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 359 in := new(EtherbaseRequest) 360 if err := dec(in); err != nil { 361 return nil, err 362 } 363 if interceptor == nil { 364 return srv.(ETHBACKENDServer).Etherbase(ctx, in) 365 } 366 info := &grpc.UnaryServerInfo{ 367 Server: srv, 368 FullMethod: ETHBACKEND_Etherbase_FullMethodName, 369 } 370 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 371 return srv.(ETHBACKENDServer).Etherbase(ctx, req.(*EtherbaseRequest)) 372 } 373 return interceptor(ctx, in, info, handler) 374 } 375 376 func _ETHBACKEND_NetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 377 in := new(NetVersionRequest) 378 if err := dec(in); err != nil { 379 return nil, err 380 } 381 if interceptor == nil { 382 return srv.(ETHBACKENDServer).NetVersion(ctx, in) 383 } 384 info := &grpc.UnaryServerInfo{ 385 Server: srv, 386 FullMethod: ETHBACKEND_NetVersion_FullMethodName, 387 } 388 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 389 return srv.(ETHBACKENDServer).NetVersion(ctx, req.(*NetVersionRequest)) 390 } 391 return interceptor(ctx, in, info, handler) 392 } 393 394 func _ETHBACKEND_NetPeerCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 395 in := new(NetPeerCountRequest) 396 if err := dec(in); err != nil { 397 return nil, err 398 } 399 if interceptor == nil { 400 return srv.(ETHBACKENDServer).NetPeerCount(ctx, in) 401 } 402 info := &grpc.UnaryServerInfo{ 403 Server: srv, 404 FullMethod: ETHBACKEND_NetPeerCount_FullMethodName, 405 } 406 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 407 return srv.(ETHBACKENDServer).NetPeerCount(ctx, req.(*NetPeerCountRequest)) 408 } 409 return interceptor(ctx, in, info, handler) 410 } 411 412 func _ETHBACKEND_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 413 in := new(emptypb.Empty) 414 if err := dec(in); err != nil { 415 return nil, err 416 } 417 if interceptor == nil { 418 return srv.(ETHBACKENDServer).Version(ctx, in) 419 } 420 info := &grpc.UnaryServerInfo{ 421 Server: srv, 422 FullMethod: ETHBACKEND_Version_FullMethodName, 423 } 424 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 425 return srv.(ETHBACKENDServer).Version(ctx, req.(*emptypb.Empty)) 426 } 427 return interceptor(ctx, in, info, handler) 428 } 429 430 func _ETHBACKEND_ProtocolVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 431 in := new(ProtocolVersionRequest) 432 if err := dec(in); err != nil { 433 return nil, err 434 } 435 if interceptor == nil { 436 return srv.(ETHBACKENDServer).ProtocolVersion(ctx, in) 437 } 438 info := &grpc.UnaryServerInfo{ 439 Server: srv, 440 FullMethod: ETHBACKEND_ProtocolVersion_FullMethodName, 441 } 442 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 443 return srv.(ETHBACKENDServer).ProtocolVersion(ctx, req.(*ProtocolVersionRequest)) 444 } 445 return interceptor(ctx, in, info, handler) 446 } 447 448 func _ETHBACKEND_ClientVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 449 in := new(ClientVersionRequest) 450 if err := dec(in); err != nil { 451 return nil, err 452 } 453 if interceptor == nil { 454 return srv.(ETHBACKENDServer).ClientVersion(ctx, in) 455 } 456 info := &grpc.UnaryServerInfo{ 457 Server: srv, 458 FullMethod: ETHBACKEND_ClientVersion_FullMethodName, 459 } 460 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 461 return srv.(ETHBACKENDServer).ClientVersion(ctx, req.(*ClientVersionRequest)) 462 } 463 return interceptor(ctx, in, info, handler) 464 } 465 466 func _ETHBACKEND_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { 467 m := new(SubscribeRequest) 468 if err := stream.RecvMsg(m); err != nil { 469 return err 470 } 471 return srv.(ETHBACKENDServer).Subscribe(m, &eTHBACKENDSubscribeServer{stream}) 472 } 473 474 type ETHBACKEND_SubscribeServer interface { 475 Send(*SubscribeReply) error 476 grpc.ServerStream 477 } 478 479 type eTHBACKENDSubscribeServer struct { 480 grpc.ServerStream 481 } 482 483 func (x *eTHBACKENDSubscribeServer) Send(m *SubscribeReply) error { 484 return x.ServerStream.SendMsg(m) 485 } 486 487 func _ETHBACKEND_SubscribeLogs_Handler(srv interface{}, stream grpc.ServerStream) error { 488 return srv.(ETHBACKENDServer).SubscribeLogs(&eTHBACKENDSubscribeLogsServer{stream}) 489 } 490 491 type ETHBACKEND_SubscribeLogsServer interface { 492 Send(*SubscribeLogsReply) error 493 Recv() (*LogsFilterRequest, error) 494 grpc.ServerStream 495 } 496 497 type eTHBACKENDSubscribeLogsServer struct { 498 grpc.ServerStream 499 } 500 501 func (x *eTHBACKENDSubscribeLogsServer) Send(m *SubscribeLogsReply) error { 502 return x.ServerStream.SendMsg(m) 503 } 504 505 func (x *eTHBACKENDSubscribeLogsServer) Recv() (*LogsFilterRequest, error) { 506 m := new(LogsFilterRequest) 507 if err := x.ServerStream.RecvMsg(m); err != nil { 508 return nil, err 509 } 510 return m, nil 511 } 512 513 func _ETHBACKEND_Block_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 514 in := new(BlockRequest) 515 if err := dec(in); err != nil { 516 return nil, err 517 } 518 if interceptor == nil { 519 return srv.(ETHBACKENDServer).Block(ctx, in) 520 } 521 info := &grpc.UnaryServerInfo{ 522 Server: srv, 523 FullMethod: ETHBACKEND_Block_FullMethodName, 524 } 525 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 526 return srv.(ETHBACKENDServer).Block(ctx, req.(*BlockRequest)) 527 } 528 return interceptor(ctx, in, info, handler) 529 } 530 531 func _ETHBACKEND_TxnLookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 532 in := new(TxnLookupRequest) 533 if err := dec(in); err != nil { 534 return nil, err 535 } 536 if interceptor == nil { 537 return srv.(ETHBACKENDServer).TxnLookup(ctx, in) 538 } 539 info := &grpc.UnaryServerInfo{ 540 Server: srv, 541 FullMethod: ETHBACKEND_TxnLookup_FullMethodName, 542 } 543 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 544 return srv.(ETHBACKENDServer).TxnLookup(ctx, req.(*TxnLookupRequest)) 545 } 546 return interceptor(ctx, in, info, handler) 547 } 548 549 func _ETHBACKEND_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 550 in := new(NodesInfoRequest) 551 if err := dec(in); err != nil { 552 return nil, err 553 } 554 if interceptor == nil { 555 return srv.(ETHBACKENDServer).NodeInfo(ctx, in) 556 } 557 info := &grpc.UnaryServerInfo{ 558 Server: srv, 559 FullMethod: ETHBACKEND_NodeInfo_FullMethodName, 560 } 561 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 562 return srv.(ETHBACKENDServer).NodeInfo(ctx, req.(*NodesInfoRequest)) 563 } 564 return interceptor(ctx, in, info, handler) 565 } 566 567 func _ETHBACKEND_Peers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 568 in := new(emptypb.Empty) 569 if err := dec(in); err != nil { 570 return nil, err 571 } 572 if interceptor == nil { 573 return srv.(ETHBACKENDServer).Peers(ctx, in) 574 } 575 info := &grpc.UnaryServerInfo{ 576 Server: srv, 577 FullMethod: ETHBACKEND_Peers_FullMethodName, 578 } 579 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 580 return srv.(ETHBACKENDServer).Peers(ctx, req.(*emptypb.Empty)) 581 } 582 return interceptor(ctx, in, info, handler) 583 } 584 585 func _ETHBACKEND_AddPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 586 in := new(AddPeerRequest) 587 if err := dec(in); err != nil { 588 return nil, err 589 } 590 if interceptor == nil { 591 return srv.(ETHBACKENDServer).AddPeer(ctx, in) 592 } 593 info := &grpc.UnaryServerInfo{ 594 Server: srv, 595 FullMethod: ETHBACKEND_AddPeer_FullMethodName, 596 } 597 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 598 return srv.(ETHBACKENDServer).AddPeer(ctx, req.(*AddPeerRequest)) 599 } 600 return interceptor(ctx, in, info, handler) 601 } 602 603 func _ETHBACKEND_PendingBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 604 in := new(emptypb.Empty) 605 if err := dec(in); err != nil { 606 return nil, err 607 } 608 if interceptor == nil { 609 return srv.(ETHBACKENDServer).PendingBlock(ctx, in) 610 } 611 info := &grpc.UnaryServerInfo{ 612 Server: srv, 613 FullMethod: ETHBACKEND_PendingBlock_FullMethodName, 614 } 615 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 616 return srv.(ETHBACKENDServer).PendingBlock(ctx, req.(*emptypb.Empty)) 617 } 618 return interceptor(ctx, in, info, handler) 619 } 620 621 func _ETHBACKEND_BorEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 622 in := new(BorEventRequest) 623 if err := dec(in); err != nil { 624 return nil, err 625 } 626 if interceptor == nil { 627 return srv.(ETHBACKENDServer).BorEvent(ctx, in) 628 } 629 info := &grpc.UnaryServerInfo{ 630 Server: srv, 631 FullMethod: ETHBACKEND_BorEvent_FullMethodName, 632 } 633 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 634 return srv.(ETHBACKENDServer).BorEvent(ctx, req.(*BorEventRequest)) 635 } 636 return interceptor(ctx, in, info, handler) 637 } 638 639 // ETHBACKEND_ServiceDesc is the grpc.ServiceDesc for ETHBACKEND service. 640 // It's only intended for direct use with grpc.RegisterService, 641 // and not to be introspected or modified (even as a copy) 642 var ETHBACKEND_ServiceDesc = grpc.ServiceDesc{ 643 ServiceName: "remote.ETHBACKEND", 644 HandlerType: (*ETHBACKENDServer)(nil), 645 Methods: []grpc.MethodDesc{ 646 { 647 MethodName: "Etherbase", 648 Handler: _ETHBACKEND_Etherbase_Handler, 649 }, 650 { 651 MethodName: "NetVersion", 652 Handler: _ETHBACKEND_NetVersion_Handler, 653 }, 654 { 655 MethodName: "NetPeerCount", 656 Handler: _ETHBACKEND_NetPeerCount_Handler, 657 }, 658 { 659 MethodName: "Version", 660 Handler: _ETHBACKEND_Version_Handler, 661 }, 662 { 663 MethodName: "ProtocolVersion", 664 Handler: _ETHBACKEND_ProtocolVersion_Handler, 665 }, 666 { 667 MethodName: "ClientVersion", 668 Handler: _ETHBACKEND_ClientVersion_Handler, 669 }, 670 { 671 MethodName: "Block", 672 Handler: _ETHBACKEND_Block_Handler, 673 }, 674 { 675 MethodName: "TxnLookup", 676 Handler: _ETHBACKEND_TxnLookup_Handler, 677 }, 678 { 679 MethodName: "NodeInfo", 680 Handler: _ETHBACKEND_NodeInfo_Handler, 681 }, 682 { 683 MethodName: "Peers", 684 Handler: _ETHBACKEND_Peers_Handler, 685 }, 686 { 687 MethodName: "AddPeer", 688 Handler: _ETHBACKEND_AddPeer_Handler, 689 }, 690 { 691 MethodName: "PendingBlock", 692 Handler: _ETHBACKEND_PendingBlock_Handler, 693 }, 694 { 695 MethodName: "BorEvent", 696 Handler: _ETHBACKEND_BorEvent_Handler, 697 }, 698 }, 699 Streams: []grpc.StreamDesc{ 700 { 701 StreamName: "Subscribe", 702 Handler: _ETHBACKEND_Subscribe_Handler, 703 ServerStreams: true, 704 }, 705 { 706 StreamName: "SubscribeLogs", 707 Handler: _ETHBACKEND_SubscribeLogs_Handler, 708 ServerStreams: true, 709 ClientStreams: true, 710 }, 711 }, 712 Metadata: "remote/ethbackend.proto", 713 }