// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.0
// source: p2psentry/sentry.proto

package sentryproto

import (
	context "context"
	typesproto "github.com/erigontech/erigon/node/gointerfaces/typesproto"
	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.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	Sentry_SetStatus_FullMethodName                = "/sentry.Sentry/SetStatus"
	Sentry_PenalizePeer_FullMethodName             = "/sentry.Sentry/PenalizePeer"
	Sentry_SetPeerLatestBlock_FullMethodName       = "/sentry.Sentry/SetPeerLatestBlock"
	Sentry_SetPeerMinimumBlock_FullMethodName      = "/sentry.Sentry/SetPeerMinimumBlock"
	Sentry_SetPeerBlockRange_FullMethodName        = "/sentry.Sentry/SetPeerBlockRange"
	Sentry_HandShake_FullMethodName                = "/sentry.Sentry/HandShake"
	Sentry_SendMessageByMinBlock_FullMethodName    = "/sentry.Sentry/SendMessageByMinBlock"
	Sentry_SendMessageById_FullMethodName          = "/sentry.Sentry/SendMessageById"
	Sentry_SendMessageToRandomPeers_FullMethodName = "/sentry.Sentry/SendMessageToRandomPeers"
	Sentry_SendMessageToAll_FullMethodName         = "/sentry.Sentry/SendMessageToAll"
	Sentry_Messages_FullMethodName                 = "/sentry.Sentry/Messages"
	Sentry_Peers_FullMethodName                    = "/sentry.Sentry/Peers"
	Sentry_PeerCount_FullMethodName                = "/sentry.Sentry/PeerCount"
	Sentry_PeerById_FullMethodName                 = "/sentry.Sentry/PeerById"
	Sentry_PeerEvents_FullMethodName               = "/sentry.Sentry/PeerEvents"
	Sentry_AddPeer_FullMethodName                  = "/sentry.Sentry/AddPeer"
	Sentry_RemovePeer_FullMethodName               = "/sentry.Sentry/RemovePeer"
	Sentry_AddTrustedPeer_FullMethodName           = "/sentry.Sentry/AddTrustedPeer"
	Sentry_RemoveTrustedPeer_FullMethodName        = "/sentry.Sentry/RemoveTrustedPeer"
	Sentry_NodeInfo_FullMethodName                 = "/sentry.Sentry/NodeInfo"
)

// 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 {
	// SetStatus - force new ETH client state of sentry - network_id, max_block, etc...
	SetStatus(ctx context.Context, in *StatusData, opts ...grpc.CallOption) (*SetStatusReply, error)
	PenalizePeer(ctx context.Context, in *PenalizePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SetPeerLatestBlock(ctx context.Context, in *SetPeerLatestBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SetPeerMinimumBlock(ctx context.Context, in *SetPeerMinimumBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SetPeerBlockRange(ctx context.Context, in *SetPeerBlockRangeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// HandShake - pre-requirement for all Send* methods - returns list of ETH protocol versions,
	// without knowledge of protocol - impossible encode correct P2P message
	HandShake(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HandShakeReply, 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)
	// Subscribe to receive messages.
	// Calling multiple times with a different set of ids starts separate streams.
	// It is possible to subscribe to the same set if ids more than once.
	Messages(ctx context.Context, in *MessagesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InboundMessage], error)
	Peers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PeersReply, error)
	PeerCount(ctx context.Context, in *PeerCountRequest, opts ...grpc.CallOption) (*PeerCountReply, error)
	PeerById(ctx context.Context, in *PeerByIdRequest, opts ...grpc.CallOption) (*PeerByIdReply, error)
	// Subscribe to notifications about connected or lost peers.
	PeerEvents(ctx context.Context, in *PeerEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PeerEvent], error)
	AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerReply, error)
	RemovePeer(ctx context.Context, in *RemovePeerRequest, opts ...grpc.CallOption) (*RemovePeerReply, error)
	AddTrustedPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerReply, error)
	RemoveTrustedPeer(ctx context.Context, in *RemovePeerRequest, opts ...grpc.CallOption) (*RemovePeerReply, error)
	// NodeInfo returns a collection of metadata known about the host.
	NodeInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*typesproto.NodeInfoReply, error)
}

type sentryClient struct {
	cc grpc.ClientConnInterface
}

func NewSentryClient(cc grpc.ClientConnInterface) SentryClient {
	return &sentryClient{cc}
}

func (c *sentryClient) SetStatus(ctx context.Context, in *StatusData, opts ...grpc.CallOption) (*SetStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SetStatusReply)
	err := c.cc.Invoke(ctx, Sentry_SetStatus_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) PenalizePeer(ctx context.Context, in *PenalizePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Sentry_PenalizePeer_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) SetPeerLatestBlock(ctx context.Context, in *SetPeerLatestBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Sentry_SetPeerLatestBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) SetPeerMinimumBlock(ctx context.Context, in *SetPeerMinimumBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Sentry_SetPeerMinimumBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) SetPeerBlockRange(ctx context.Context, in *SetPeerBlockRangeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Sentry_SetPeerBlockRange_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) HandShake(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HandShakeReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HandShakeReply)
	err := c.cc.Invoke(ctx, Sentry_HandShake_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) SendMessageByMinBlock(ctx context.Context, in *SendMessageByMinBlockRequest, opts ...grpc.CallOption) (*SentPeers, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SentPeers)
	err := c.cc.Invoke(ctx, Sentry_SendMessageByMinBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) SendMessageById(ctx context.Context, in *SendMessageByIdRequest, opts ...grpc.CallOption) (*SentPeers, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SentPeers)
	err := c.cc.Invoke(ctx, Sentry_SendMessageById_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) SendMessageToRandomPeers(ctx context.Context, in *SendMessageToRandomPeersRequest, opts ...grpc.CallOption) (*SentPeers, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SentPeers)
	err := c.cc.Invoke(ctx, Sentry_SendMessageToRandomPeers_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) SendMessageToAll(ctx context.Context, in *OutboundMessageData, opts ...grpc.CallOption) (*SentPeers, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SentPeers)
	err := c.cc.Invoke(ctx, Sentry_SendMessageToAll_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) Messages(ctx context.Context, in *MessagesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InboundMessage], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &Sentry_ServiceDesc.Streams[0], Sentry_Messages_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[MessagesRequest, InboundMessage]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Sentry_MessagesClient = grpc.ServerStreamingClient[InboundMessage]

func (c *sentryClient) Peers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PeersReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PeersReply)
	err := c.cc.Invoke(ctx, Sentry_Peers_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) PeerCount(ctx context.Context, in *PeerCountRequest, opts ...grpc.CallOption) (*PeerCountReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PeerCountReply)
	err := c.cc.Invoke(ctx, Sentry_PeerCount_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) PeerById(ctx context.Context, in *PeerByIdRequest, opts ...grpc.CallOption) (*PeerByIdReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PeerByIdReply)
	err := c.cc.Invoke(ctx, Sentry_PeerById_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) PeerEvents(ctx context.Context, in *PeerEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PeerEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &Sentry_ServiceDesc.Streams[1], Sentry_PeerEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[PeerEventsRequest, PeerEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Sentry_PeerEventsClient = grpc.ServerStreamingClient[PeerEvent]

func (c *sentryClient) AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AddPeerReply)
	err := c.cc.Invoke(ctx, Sentry_AddPeer_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) RemovePeer(ctx context.Context, in *RemovePeerRequest, opts ...grpc.CallOption) (*RemovePeerReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RemovePeerReply)
	err := c.cc.Invoke(ctx, Sentry_RemovePeer_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) AddTrustedPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AddPeerReply)
	err := c.cc.Invoke(ctx, Sentry_AddTrustedPeer_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) RemoveTrustedPeer(ctx context.Context, in *RemovePeerRequest, opts ...grpc.CallOption) (*RemovePeerReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RemovePeerReply)
	err := c.cc.Invoke(ctx, Sentry_RemoveTrustedPeer_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryClient) NodeInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*typesproto.NodeInfoReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(typesproto.NodeInfoReply)
	err := c.cc.Invoke(ctx, Sentry_NodeInfo_FullMethodName, in, out, cOpts...)
	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 {
	// SetStatus - force new ETH client state of sentry - network_id, max_block, etc...
	SetStatus(context.Context, *StatusData) (*SetStatusReply, error)
	PenalizePeer(context.Context, *PenalizePeerRequest) (*emptypb.Empty, error)
	SetPeerLatestBlock(context.Context, *SetPeerLatestBlockRequest) (*emptypb.Empty, error)
	SetPeerMinimumBlock(context.Context, *SetPeerMinimumBlockRequest) (*emptypb.Empty, error)
	SetPeerBlockRange(context.Context, *SetPeerBlockRangeRequest) (*emptypb.Empty, error)
	// HandShake - pre-requirement for all Send* methods - returns list of ETH protocol versions,
	// without knowledge of protocol - impossible encode correct P2P message
	HandShake(context.Context, *emptypb.Empty) (*HandShakeReply, 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)
	// Subscribe to receive messages.
	// Calling multiple times with a different set of ids starts separate streams.
	// It is possible to subscribe to the same set if ids more than once.
	Messages(*MessagesRequest, grpc.ServerStreamingServer[InboundMessage]) error
	Peers(context.Context, *emptypb.Empty) (*PeersReply, error)
	PeerCount(context.Context, *PeerCountRequest) (*PeerCountReply, error)
	PeerById(context.Context, *PeerByIdRequest) (*PeerByIdReply, error)
	// Subscribe to notifications about connected or lost peers.
	PeerEvents(*PeerEventsRequest, grpc.ServerStreamingServer[PeerEvent]) error
	AddPeer(context.Context, *AddPeerRequest) (*AddPeerReply, error)
	RemovePeer(context.Context, *RemovePeerRequest) (*RemovePeerReply, error)
	AddTrustedPeer(context.Context, *AddPeerRequest) (*AddPeerReply, error)
	RemoveTrustedPeer(context.Context, *RemovePeerRequest) (*RemovePeerReply, error)
	// NodeInfo returns a collection of metadata known about the host.
	NodeInfo(context.Context, *emptypb.Empty) (*typesproto.NodeInfoReply, error)
	mustEmbedUnimplementedSentryServer()
}

// UnimplementedSentryServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSentryServer struct{}

func (UnimplementedSentryServer) SetStatus(context.Context, *StatusData) (*SetStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method SetStatus not implemented")
}
func (UnimplementedSentryServer) PenalizePeer(context.Context, *PenalizePeerRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method PenalizePeer not implemented")
}
func (UnimplementedSentryServer) SetPeerLatestBlock(context.Context, *SetPeerLatestBlockRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method SetPeerLatestBlock not implemented")
}
func (UnimplementedSentryServer) SetPeerMinimumBlock(context.Context, *SetPeerMinimumBlockRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method SetPeerMinimumBlock not implemented")
}
func (UnimplementedSentryServer) SetPeerBlockRange(context.Context, *SetPeerBlockRangeRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method SetPeerBlockRange not implemented")
}
func (UnimplementedSentryServer) HandShake(context.Context, *emptypb.Empty) (*HandShakeReply, error) {
	return nil, status.Error(codes.Unimplemented, "method HandShake not implemented")
}
func (UnimplementedSentryServer) SendMessageByMinBlock(context.Context, *SendMessageByMinBlockRequest) (*SentPeers, error) {
	return nil, status.Error(codes.Unimplemented, "method SendMessageByMinBlock not implemented")
}
func (UnimplementedSentryServer) SendMessageById(context.Context, *SendMessageByIdRequest) (*SentPeers, error) {
	return nil, status.Error(codes.Unimplemented, "method SendMessageById not implemented")
}
func (UnimplementedSentryServer) SendMessageToRandomPeers(context.Context, *SendMessageToRandomPeersRequest) (*SentPeers, error) {
	return nil, status.Error(codes.Unimplemented, "method SendMessageToRandomPeers not implemented")
}
func (UnimplementedSentryServer) SendMessageToAll(context.Context, *OutboundMessageData) (*SentPeers, error) {
	return nil, status.Error(codes.Unimplemented, "method SendMessageToAll not implemented")
}
func (UnimplementedSentryServer) Messages(*MessagesRequest, grpc.ServerStreamingServer[InboundMessage]) error {
	return status.Error(codes.Unimplemented, "method Messages not implemented")
}
func (UnimplementedSentryServer) Peers(context.Context, *emptypb.Empty) (*PeersReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Peers not implemented")
}
func (UnimplementedSentryServer) PeerCount(context.Context, *PeerCountRequest) (*PeerCountReply, error) {
	return nil, status.Error(codes.Unimplemented, "method PeerCount not implemented")
}
func (UnimplementedSentryServer) PeerById(context.Context, *PeerByIdRequest) (*PeerByIdReply, error) {
	return nil, status.Error(codes.Unimplemented, "method PeerById not implemented")
}
func (UnimplementedSentryServer) PeerEvents(*PeerEventsRequest, grpc.ServerStreamingServer[PeerEvent]) error {
	return status.Error(codes.Unimplemented, "method PeerEvents not implemented")
}
func (UnimplementedSentryServer) AddPeer(context.Context, *AddPeerRequest) (*AddPeerReply, error) {
	return nil, status.Error(codes.Unimplemented, "method AddPeer not implemented")
}
func (UnimplementedSentryServer) RemovePeer(context.Context, *RemovePeerRequest) (*RemovePeerReply, error) {
	return nil, status.Error(codes.Unimplemented, "method RemovePeer not implemented")
}
func (UnimplementedSentryServer) AddTrustedPeer(context.Context, *AddPeerRequest) (*AddPeerReply, error) {
	return nil, status.Error(codes.Unimplemented, "method AddTrustedPeer not implemented")
}
func (UnimplementedSentryServer) RemoveTrustedPeer(context.Context, *RemovePeerRequest) (*RemovePeerReply, error) {
	return nil, status.Error(codes.Unimplemented, "method RemoveTrustedPeer not implemented")
}
func (UnimplementedSentryServer) NodeInfo(context.Context, *emptypb.Empty) (*typesproto.NodeInfoReply, error) {
	return nil, status.Error(codes.Unimplemented, "method NodeInfo not implemented")
}
func (UnimplementedSentryServer) mustEmbedUnimplementedSentryServer() {}
func (UnimplementedSentryServer) testEmbeddedByValue()                {}

// 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) {
	// If the following call panics, it indicates UnimplementedSentryServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&Sentry_ServiceDesc, srv)
}

func _Sentry_SetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StatusData)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).SetStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_SetStatus_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).SetStatus(ctx, req.(*StatusData))
	}
	return interceptor(ctx, in, info, handler)
}

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_PenalizePeer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).PenalizePeer(ctx, req.(*PenalizePeerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_SetPeerLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetPeerLatestBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).SetPeerLatestBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_SetPeerLatestBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).SetPeerLatestBlock(ctx, req.(*SetPeerLatestBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_SetPeerMinimumBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetPeerMinimumBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).SetPeerMinimumBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_SetPeerMinimumBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).SetPeerMinimumBlock(ctx, req.(*SetPeerMinimumBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_SetPeerBlockRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetPeerBlockRangeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).SetPeerBlockRange(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_SetPeerBlockRange_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).SetPeerBlockRange(ctx, req.(*SetPeerBlockRangeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_HandShake_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.(SentryServer).HandShake(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_HandShake_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).HandShake(ctx, req.(*emptypb.Empty))
	}
	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_SendMessageByMinBlock_FullMethodName,
	}
	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_SendMessageById_FullMethodName,
	}
	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_SendMessageToRandomPeers_FullMethodName,
	}
	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_SendMessageToAll_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).SendMessageToAll(ctx, req.(*OutboundMessageData))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_Messages_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(MessagesRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(SentryServer).Messages(m, &grpc.GenericServerStream[MessagesRequest, InboundMessage]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Sentry_MessagesServer = grpc.ServerStreamingServer[InboundMessage]

func _Sentry_Peers_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.(SentryServer).Peers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_Peers_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).Peers(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_PeerCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PeerCountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).PeerCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_PeerCount_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).PeerCount(ctx, req.(*PeerCountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_PeerById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PeerByIdRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).PeerById(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_PeerById_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).PeerById(ctx, req.(*PeerByIdRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_PeerEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(PeerEventsRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(SentryServer).PeerEvents(m, &grpc.GenericServerStream[PeerEventsRequest, PeerEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Sentry_PeerEventsServer = grpc.ServerStreamingServer[PeerEvent]

func _Sentry_AddPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddPeerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).AddPeer(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_AddPeer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).AddPeer(ctx, req.(*AddPeerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_RemovePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemovePeerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).RemovePeer(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_RemovePeer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).RemovePeer(ctx, req.(*RemovePeerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_AddTrustedPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddPeerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).AddTrustedPeer(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_AddTrustedPeer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).AddTrustedPeer(ctx, req.(*AddPeerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_RemoveTrustedPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemovePeerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServer).RemoveTrustedPeer(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_RemoveTrustedPeer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).RemoveTrustedPeer(ctx, req.(*RemovePeerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Sentry_NodeInfo_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.(SentryServer).NodeInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sentry_NodeInfo_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServer).NodeInfo(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// Sentry_ServiceDesc is the grpc.ServiceDesc for Sentry service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Sentry_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sentry.Sentry",
	HandlerType: (*SentryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetStatus",
			Handler:    _Sentry_SetStatus_Handler,
		},
		{
			MethodName: "PenalizePeer",
			Handler:    _Sentry_PenalizePeer_Handler,
		},
		{
			MethodName: "SetPeerLatestBlock",
			Handler:    _Sentry_SetPeerLatestBlock_Handler,
		},
		{
			MethodName: "SetPeerMinimumBlock",
			Handler:    _Sentry_SetPeerMinimumBlock_Handler,
		},
		{
			MethodName: "SetPeerBlockRange",
			Handler:    _Sentry_SetPeerBlockRange_Handler,
		},
		{
			MethodName: "HandShake",
			Handler:    _Sentry_HandShake_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,
		},
		{
			MethodName: "Peers",
			Handler:    _Sentry_Peers_Handler,
		},
		{
			MethodName: "PeerCount",
			Handler:    _Sentry_PeerCount_Handler,
		},
		{
			MethodName: "PeerById",
			Handler:    _Sentry_PeerById_Handler,
		},
		{
			MethodName: "AddPeer",
			Handler:    _Sentry_AddPeer_Handler,
		},
		{
			MethodName: "RemovePeer",
			Handler:    _Sentry_RemovePeer_Handler,
		},
		{
			MethodName: "AddTrustedPeer",
			Handler:    _Sentry_AddTrustedPeer_Handler,
		},
		{
			MethodName: "RemoveTrustedPeer",
			Handler:    _Sentry_RemoveTrustedPeer_Handler,
		},
		{
			MethodName: "NodeInfo",
			Handler:    _Sentry_NodeInfo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Messages",
			Handler:       _Sentry_Messages_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "PeerEvents",
			Handler:       _Sentry_PeerEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "p2psentry/sentry.proto",
}
