erigon-pulse/cmd/headers/sentry/sentry_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

243 lines
9.0 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package sentry
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
// SentryClient is the client API for Sentry 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 SentryClient interface {
PenalizePeer(ctx context.Context, in *PenalizePeerRequest, opts ...grpc.CallOption) (*empty.Empty, error)
SendMessageByMinBlock(ctx context.Context, in *SendMessageByMinBlockRequest, opts ...grpc.CallOption) (*SentPeers, error)
SendMessageById(ctx context.Context, in *SendMessageByIdRequest, opts ...grpc.CallOption) (*SentPeers, error)
SendMessageToRandomPeers(ctx context.Context, in *SendMessageToRandomPeersRequest, opts ...grpc.CallOption) (*SentPeers, error)
SendMessageToAll(ctx context.Context, in *OutboundMessageData, opts ...grpc.CallOption) (*SentPeers, error)
}
type sentryClient struct {
cc grpc.ClientConnInterface
}
func NewSentryClient(cc grpc.ClientConnInterface) SentryClient {
return &sentryClient{cc}
}
func (c *sentryClient) PenalizePeer(ctx context.Context, in *PenalizePeerRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/sentry.Sentry/PenalizePeer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sentryClient) SendMessageByMinBlock(ctx context.Context, in *SendMessageByMinBlockRequest, opts ...grpc.CallOption) (*SentPeers, error) {
out := new(SentPeers)
err := c.cc.Invoke(ctx, "/sentry.Sentry/SendMessageByMinBlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sentryClient) SendMessageById(ctx context.Context, in *SendMessageByIdRequest, opts ...grpc.CallOption) (*SentPeers, error) {
out := new(SentPeers)
err := c.cc.Invoke(ctx, "/sentry.Sentry/SendMessageById", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sentryClient) SendMessageToRandomPeers(ctx context.Context, in *SendMessageToRandomPeersRequest, opts ...grpc.CallOption) (*SentPeers, error) {
out := new(SentPeers)
err := c.cc.Invoke(ctx, "/sentry.Sentry/SendMessageToRandomPeers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sentryClient) SendMessageToAll(ctx context.Context, in *OutboundMessageData, opts ...grpc.CallOption) (*SentPeers, error) {
out := new(SentPeers)
err := c.cc.Invoke(ctx, "/sentry.Sentry/SendMessageToAll", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SentryServer is the server API for Sentry service.
// All implementations must embed UnimplementedSentryServer
// for forward compatibility
type SentryServer interface {
PenalizePeer(context.Context, *PenalizePeerRequest) (*empty.Empty, error)
SendMessageByMinBlock(context.Context, *SendMessageByMinBlockRequest) (*SentPeers, error)
SendMessageById(context.Context, *SendMessageByIdRequest) (*SentPeers, error)
SendMessageToRandomPeers(context.Context, *SendMessageToRandomPeersRequest) (*SentPeers, error)
SendMessageToAll(context.Context, *OutboundMessageData) (*SentPeers, error)
mustEmbedUnimplementedSentryServer()
}
// UnimplementedSentryServer must be embedded to have forward compatible implementations.
type UnimplementedSentryServer struct {
}
func (UnimplementedSentryServer) PenalizePeer(context.Context, *PenalizePeerRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method PenalizePeer not implemented")
}
func (UnimplementedSentryServer) SendMessageByMinBlock(context.Context, *SendMessageByMinBlockRequest) (*SentPeers, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendMessageByMinBlock not implemented")
}
func (UnimplementedSentryServer) SendMessageById(context.Context, *SendMessageByIdRequest) (*SentPeers, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendMessageById not implemented")
}
func (UnimplementedSentryServer) SendMessageToRandomPeers(context.Context, *SendMessageToRandomPeersRequest) (*SentPeers, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendMessageToRandomPeers not implemented")
}
func (UnimplementedSentryServer) SendMessageToAll(context.Context, *OutboundMessageData) (*SentPeers, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendMessageToAll not implemented")
}
func (UnimplementedSentryServer) mustEmbedUnimplementedSentryServer() {}
// UnsafeSentryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SentryServer will
// result in compilation errors.
type UnsafeSentryServer interface {
mustEmbedUnimplementedSentryServer()
}
func RegisterSentryServer(s grpc.ServiceRegistrar, srv SentryServer) {
s.RegisterService(&_Sentry_serviceDesc, srv)
}
func _Sentry_PenalizePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PenalizePeerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SentryServer).PenalizePeer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/sentry.Sentry/PenalizePeer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SentryServer).PenalizePeer(ctx, req.(*PenalizePeerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Sentry_SendMessageByMinBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendMessageByMinBlockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SentryServer).SendMessageByMinBlock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/sentry.Sentry/SendMessageByMinBlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SentryServer).SendMessageByMinBlock(ctx, req.(*SendMessageByMinBlockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Sentry_SendMessageById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendMessageByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SentryServer).SendMessageById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/sentry.Sentry/SendMessageById",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SentryServer).SendMessageById(ctx, req.(*SendMessageByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Sentry_SendMessageToRandomPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendMessageToRandomPeersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SentryServer).SendMessageToRandomPeers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/sentry.Sentry/SendMessageToRandomPeers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SentryServer).SendMessageToRandomPeers(ctx, req.(*SendMessageToRandomPeersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Sentry_SendMessageToAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OutboundMessageData)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SentryServer).SendMessageToAll(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/sentry.Sentry/SendMessageToAll",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SentryServer).SendMessageToAll(ctx, req.(*OutboundMessageData))
}
return interceptor(ctx, in, info, handler)
}
var _Sentry_serviceDesc = grpc.ServiceDesc{
ServiceName: "sentry.Sentry",
HandlerType: (*SentryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PenalizePeer",
Handler: _Sentry_PenalizePeer_Handler,
},
{
MethodName: "SendMessageByMinBlock",
Handler: _Sentry_SendMessageByMinBlock_Handler,
},
{
MethodName: "SendMessageById",
Handler: _Sentry_SendMessageById_Handler,
},
{
MethodName: "SendMessageToRandomPeers",
Handler: _Sentry_SendMessageToRandomPeers_Handler,
},
{
MethodName: "SendMessageToAll",
Handler: _Sentry_SendMessageToAll_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "sentry.proto",
}