mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-06 02:52:19 +00:00
a8338e4dd2
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
129 lines
4.1 KiB
Go
129 lines
4.1 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package lightrpc
|
|
|
|
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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// SentinelClient is the client API for Sentinel 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 SentinelClient interface {
|
|
SubscribeBeaconBlock(ctx context.Context, in *GossipRequest, opts ...grpc.CallOption) (Sentinel_SubscribeBeaconBlockClient, error)
|
|
}
|
|
|
|
type sentinelClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewSentinelClient(cc grpc.ClientConnInterface) SentinelClient {
|
|
return &sentinelClient{cc}
|
|
}
|
|
|
|
func (c *sentinelClient) SubscribeBeaconBlock(ctx context.Context, in *GossipRequest, opts ...grpc.CallOption) (Sentinel_SubscribeBeaconBlockClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &Sentinel_ServiceDesc.Streams[0], "/lightrpc.Sentinel/SubscribeBeaconBlock", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &sentinelSubscribeBeaconBlockClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type Sentinel_SubscribeBeaconBlockClient interface {
|
|
Recv() (*SignedBeaconBlockBellatrix, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type sentinelSubscribeBeaconBlockClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *sentinelSubscribeBeaconBlockClient) Recv() (*SignedBeaconBlockBellatrix, error) {
|
|
m := new(SignedBeaconBlockBellatrix)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// SentinelServer is the server API for Sentinel service.
|
|
// All implementations must embed UnimplementedSentinelServer
|
|
// for forward compatibility
|
|
type SentinelServer interface {
|
|
SubscribeBeaconBlock(*GossipRequest, Sentinel_SubscribeBeaconBlockServer) error
|
|
mustEmbedUnimplementedSentinelServer()
|
|
}
|
|
|
|
// UnimplementedSentinelServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedSentinelServer struct {
|
|
}
|
|
|
|
func (UnimplementedSentinelServer) SubscribeBeaconBlock(*GossipRequest, Sentinel_SubscribeBeaconBlockServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method SubscribeBeaconBlock not implemented")
|
|
}
|
|
func (UnimplementedSentinelServer) mustEmbedUnimplementedSentinelServer() {}
|
|
|
|
// UnsafeSentinelServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to SentinelServer will
|
|
// result in compilation errors.
|
|
type UnsafeSentinelServer interface {
|
|
mustEmbedUnimplementedSentinelServer()
|
|
}
|
|
|
|
func RegisterSentinelServer(s grpc.ServiceRegistrar, srv SentinelServer) {
|
|
s.RegisterService(&Sentinel_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Sentinel_SubscribeBeaconBlock_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(GossipRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(SentinelServer).SubscribeBeaconBlock(m, &sentinelSubscribeBeaconBlockServer{stream})
|
|
}
|
|
|
|
type Sentinel_SubscribeBeaconBlockServer interface {
|
|
Send(*SignedBeaconBlockBellatrix) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type sentinelSubscribeBeaconBlockServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *sentinelSubscribeBeaconBlockServer) Send(m *SignedBeaconBlockBellatrix) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
// Sentinel_ServiceDesc is the grpc.ServiceDesc for Sentinel service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Sentinel_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "lightrpc.Sentinel",
|
|
HandlerType: (*SentinelServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "SubscribeBeaconBlock",
|
|
Handler: _Sentinel_SubscribeBeaconBlock_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "sentinel.proto",
|
|
}
|