erigon-pulse/cmd/headers/core/control_grpc.pb.go
Alex Sharov 7fd1f19435
txdb lazy cursors creation, grpc version up (#1440)
* txdb lazy, grpc version up

* tidy

* fix lint
2021-01-15 09:38:09 +00:00

135 lines
4.6 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package core
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// ControlClient is the client API for Control 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 ControlClient interface {
ForwardInboundMessage(ctx context.Context, in *InboundMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StatusData, error)
}
type controlClient struct {
cc grpc.ClientConnInterface
}
func NewControlClient(cc grpc.ClientConnInterface) ControlClient {
return &controlClient{cc}
}
func (c *controlClient) ForwardInboundMessage(ctx context.Context, in *InboundMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/control.Control/ForwardInboundMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StatusData, error) {
out := new(StatusData)
err := c.cc.Invoke(ctx, "/control.Control/GetStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ControlServer is the server API for Control service.
// All implementations must embed UnimplementedControlServer
// for forward compatibility
type ControlServer interface {
ForwardInboundMessage(context.Context, *InboundMessage) (*emptypb.Empty, error)
GetStatus(context.Context, *emptypb.Empty) (*StatusData, error)
mustEmbedUnimplementedControlServer()
}
// UnimplementedControlServer must be embedded to have forward compatible implementations.
type UnimplementedControlServer struct {
}
func (UnimplementedControlServer) ForwardInboundMessage(context.Context, *InboundMessage) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ForwardInboundMessage not implemented")
}
func (UnimplementedControlServer) GetStatus(context.Context, *emptypb.Empty) (*StatusData, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented")
}
func (UnimplementedControlServer) mustEmbedUnimplementedControlServer() {}
// UnsafeControlServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ControlServer will
// result in compilation errors.
type UnsafeControlServer interface {
mustEmbedUnimplementedControlServer()
}
func RegisterControlServer(s grpc.ServiceRegistrar, srv ControlServer) {
s.RegisterService(&_Control_serviceDesc, srv)
}
func _Control_ForwardInboundMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InboundMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).ForwardInboundMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/control.Control/ForwardInboundMessage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).ForwardInboundMessage(ctx, req.(*InboundMessage))
}
return interceptor(ctx, in, info, handler)
}
func _Control_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).GetStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/control.Control/GetStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).GetStatus(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Control_serviceDesc = grpc.ServiceDesc{
ServiceName: "control.Control",
HandlerType: (*ControlServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ForwardInboundMessage",
Handler: _Control_ForwardInboundMessage_Handler,
},
{
MethodName: "GetStatus",
Handler: _Control_GetStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "control.proto",
}