mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-06 02:52:19 +00:00
2fd96a0b1c
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
102 lines
3.7 KiB
Go
102 lines
3.7 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
|
|
|
|
// LightclientClient is the client API for Lightclient 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 LightclientClient interface {
|
|
NotifyBeaconBlock(ctx context.Context, in *SignedBeaconBlockBellatrix, opts ...grpc.CallOption) (*NotificationStatus, error)
|
|
}
|
|
|
|
type lightclientClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewLightclientClient(cc grpc.ClientConnInterface) LightclientClient {
|
|
return &lightclientClient{cc}
|
|
}
|
|
|
|
func (c *lightclientClient) NotifyBeaconBlock(ctx context.Context, in *SignedBeaconBlockBellatrix, opts ...grpc.CallOption) (*NotificationStatus, error) {
|
|
out := new(NotificationStatus)
|
|
err := c.cc.Invoke(ctx, "/lightrpc.Lightclient/NotifyBeaconBlock", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// LightclientServer is the server API for Lightclient service.
|
|
// All implementations must embed UnimplementedLightclientServer
|
|
// for forward compatibility
|
|
type LightclientServer interface {
|
|
NotifyBeaconBlock(context.Context, *SignedBeaconBlockBellatrix) (*NotificationStatus, error)
|
|
mustEmbedUnimplementedLightclientServer()
|
|
}
|
|
|
|
// UnimplementedLightclientServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedLightclientServer struct {
|
|
}
|
|
|
|
func (UnimplementedLightclientServer) NotifyBeaconBlock(context.Context, *SignedBeaconBlockBellatrix) (*NotificationStatus, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method NotifyBeaconBlock not implemented")
|
|
}
|
|
func (UnimplementedLightclientServer) mustEmbedUnimplementedLightclientServer() {}
|
|
|
|
// UnsafeLightclientServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to LightclientServer will
|
|
// result in compilation errors.
|
|
type UnsafeLightclientServer interface {
|
|
mustEmbedUnimplementedLightclientServer()
|
|
}
|
|
|
|
func RegisterLightclientServer(s grpc.ServiceRegistrar, srv LightclientServer) {
|
|
s.RegisterService(&Lightclient_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Lightclient_NotifyBeaconBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SignedBeaconBlockBellatrix)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(LightclientServer).NotifyBeaconBlock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/lightrpc.Lightclient/NotifyBeaconBlock",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(LightclientServer).NotifyBeaconBlock(ctx, req.(*SignedBeaconBlockBellatrix))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Lightclient_ServiceDesc is the grpc.ServiceDesc for Lightclient service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Lightclient_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "lightrpc.Lightclient",
|
|
HandlerType: (*LightclientServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "NotifyBeaconBlock",
|
|
Handler: _Lightclient_NotifyBeaconBlock_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "lightclient.proto",
|
|
}
|