erigon-pulse/cmd/headers/core/control_grpc.pb.go
ledgerwatch 97a03a1ad7
[WIP] add interfaces subtree and switch headers POC to using shared proto files (#1315)
* Squashed 'interfaces/' content from commit c4e14d6dc

git-subtree-dir: interfaces
git-subtree-split: c4e14d6dc80a157c60acd42f0152d631d250601e

* Squashed 'interfaces/' changes from c4e14d6dc..84c5faa5f

84c5faa5f Update README.md
07db484a1 Update README.md
ea14fa4e3 Update README.md

git-subtree-dir: interfaces
git-subtree-split: 84c5faa5f956ea52119911f39ac5864b282dcec2

* Change proto paths

* Squashed 'interfaces/' changes from 84c5faa5f..eb9859d41

eb9859d41 Correct syntax
ae78fe955 Add go package

git-subtree-dir: interfaces
git-subtree-split: eb9859d4157351fac3b8bd2f477307a09978e6df

* Switch to shared proto files

* Fix generation

* Remove duplicate files

* Init hard-coded tips when not recovering

* Only check initiation when extending up
2020-10-29 16:38:46 +00:00

135 lines
4.6 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package core
import (
context "context"
empty "github.com/golang/protobuf/ptypes/empty"
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.
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) (*empty.Empty, error)
GetStatus(ctx context.Context, in *empty.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) (*empty.Empty, error) {
out := new(empty.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 *empty.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) (*empty.Empty, error)
GetStatus(context.Context, *empty.Empty) (*StatusData, error)
mustEmbedUnimplementedControlServer()
}
// UnimplementedControlServer must be embedded to have forward compatible implementations.
type UnimplementedControlServer struct {
}
func (UnimplementedControlServer) ForwardInboundMessage(context.Context, *InboundMessage) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ForwardInboundMessage not implemented")
}
func (UnimplementedControlServer) GetStatus(context.Context, *empty.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(empty.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.(*empty.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",
}