mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
101 lines
3.1 KiB
Go
101 lines
3.1 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package proto
|
|
|
|
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
|
|
|
|
// BorClient is the client API for Bor 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 BorClient interface {
|
|
Debug(ctx context.Context, in *DebugInput, opts ...grpc.CallOption) (*DebugInput, error)
|
|
}
|
|
|
|
type borClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewBorClient(cc grpc.ClientConnInterface) BorClient {
|
|
return &borClient{cc}
|
|
}
|
|
|
|
func (c *borClient) Debug(ctx context.Context, in *DebugInput, opts ...grpc.CallOption) (*DebugInput, error) {
|
|
out := new(DebugInput)
|
|
err := c.cc.Invoke(ctx, "/proto.Bor/Debug", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// BorServer is the server API for Bor service.
|
|
// All implementations must embed UnimplementedBorServer
|
|
// for forward compatibility
|
|
type BorServer interface {
|
|
Debug(context.Context, *DebugInput) (*DebugInput, error)
|
|
mustEmbedUnimplementedBorServer()
|
|
}
|
|
|
|
// UnimplementedBorServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedBorServer struct {
|
|
}
|
|
|
|
func (UnimplementedBorServer) Debug(context.Context, *DebugInput) (*DebugInput, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Debug not implemented")
|
|
}
|
|
func (UnimplementedBorServer) mustEmbedUnimplementedBorServer() {}
|
|
|
|
// UnsafeBorServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to BorServer will
|
|
// result in compilation errors.
|
|
type UnsafeBorServer interface {
|
|
mustEmbedUnimplementedBorServer()
|
|
}
|
|
|
|
func RegisterBorServer(s grpc.ServiceRegistrar, srv BorServer) {
|
|
s.RegisterService(&Bor_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Bor_Debug_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DebugInput)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BorServer).Debug(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Bor/Debug",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BorServer).Debug(ctx, req.(*DebugInput))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Bor_ServiceDesc is the grpc.ServiceDesc for Bor service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Bor_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "proto.Bor",
|
|
HandlerType: (*BorServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Debug",
|
|
Handler: _Bor_Debug_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "command/server/proto/server.proto",
|
|
}
|