sentry subscribe

This commit is contained in:
alex.sharov 2021-07-09 20:21:43 +07:00
parent b807cd1655
commit 8489543205
2 changed files with 396 additions and 147 deletions

View File

@ -247,6 +247,52 @@ func (Protocol) EnumDescriptor() ([]byte, []int) {
return file_p2psentry_sentry_proto_rawDescGZIP(), []int{2}
}
type PeersReply_PeerEvent int32
const (
PeersReply_Connect PeersReply_PeerEvent = 0
PeersReply_Disconnect PeersReply_PeerEvent = 1
)
// Enum value maps for PeersReply_PeerEvent.
var (
PeersReply_PeerEvent_name = map[int32]string{
0: "Connect",
1: "Disconnect",
}
PeersReply_PeerEvent_value = map[string]int32{
"Connect": 0,
"Disconnect": 1,
}
)
func (x PeersReply_PeerEvent) Enum() *PeersReply_PeerEvent {
p := new(PeersReply_PeerEvent)
*p = x
return p
}
func (x PeersReply_PeerEvent) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PeersReply_PeerEvent) Descriptor() protoreflect.EnumDescriptor {
return file_p2psentry_sentry_proto_enumTypes[3].Descriptor()
}
func (PeersReply_PeerEvent) Type() protoreflect.EnumType {
return &file_p2psentry_sentry_proto_enumTypes[3]
}
func (x PeersReply_PeerEvent) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PeersReply_PeerEvent.Descriptor instead.
func (PeersReply_PeerEvent) EnumDescriptor() ([]byte, []int) {
return file_p2psentry_sentry_proto_rawDescGZIP(), []int{15, 0}
}
type OutboundMessageData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1000,6 +1046,99 @@ func (x *PeerCountReply) GetCount() uint64 {
return 0
}
type PeersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PeersRequest) Reset() {
*x = PeersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_p2psentry_sentry_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PeersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PeersRequest) ProtoMessage() {}
func (x *PeersRequest) ProtoReflect() protoreflect.Message {
mi := &file_p2psentry_sentry_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PeersRequest.ProtoReflect.Descriptor instead.
func (*PeersRequest) Descriptor() ([]byte, []int) {
return file_p2psentry_sentry_proto_rawDescGZIP(), []int{14}
}
type PeersReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PeerId *types.H512 `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
Event PeersReply_PeerEvent `protobuf:"varint,2,opt,name=event,proto3,enum=sentry.PeersReply_PeerEvent" json:"event,omitempty"`
}
func (x *PeersReply) Reset() {
*x = PeersReply{}
if protoimpl.UnsafeEnabled {
mi := &file_p2psentry_sentry_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PeersReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PeersReply) ProtoMessage() {}
func (x *PeersReply) ProtoReflect() protoreflect.Message {
mi := &file_p2psentry_sentry_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PeersReply.ProtoReflect.Descriptor instead.
func (*PeersReply) Descriptor() ([]byte, []int) {
return file_p2psentry_sentry_proto_rawDescGZIP(), []int{15}
}
func (x *PeersReply) GetPeerId() *types.H512 {
if x != nil {
return x.PeerId
}
return nil
}
func (x *PeersReply) GetEvent() PeersReply_PeerEvent {
if x != nil {
return x.Event
}
return PeersReply_Connect
}
var File_p2psentry_sentry_proto protoreflect.FileDescriptor
var file_p2psentry_sentry_proto_rawDesc = []byte{
@ -1085,98 +1224,112 @@ var file_p2psentry_sentry_proto_rawDesc = []byte{
0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x26,
0x0a, 0x0e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0xda, 0x05, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x49, 0x64, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x36,
0x35, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b,
0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x01, 0x12, 0x14, 0x0a,
0x10, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36,
0x35, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53,
0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x54, 0x5f,
0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10,
0x04, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45,
0x53, 0x5f, 0x36, 0x35, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f,
0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x35, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c,
0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x35, 0x10, 0x07, 0x12, 0x13,
0x0a, 0x0f, 0x47, 0x45, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36,
0x35, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x53, 0x5f,
0x36, 0x35, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43,
0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0a, 0x12, 0x10, 0x0a,
0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x36, 0x35, 0x10, 0x0b, 0x12,
0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f,
0x36, 0x35, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, 0x57, 0x5f, 0x50, 0x4f, 0x4f, 0x4c,
0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x48,
0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0d, 0x12, 0x1e, 0x0a, 0x1a, 0x47, 0x45,
0x54, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43,
0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0e, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f,
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x73,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48,
0x35, 0x31, 0x32, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, 0x65, 0x6e,
0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x50,
0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22,
0x28, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x0a, 0x07,
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x69, 0x73,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x01, 0x2a, 0xda, 0x05, 0x0a, 0x09, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55,
0x53, 0x5f, 0x36, 0x35, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c,
0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x01,
0x12, 0x14, 0x0a, 0x10, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52,
0x53, 0x5f, 0x36, 0x35, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f,
0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x47,
0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f,
0x36, 0x35, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f,
0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54,
0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x35, 0x10, 0x06, 0x12,
0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x35, 0x10,
0x07, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54,
0x53, 0x5f, 0x36, 0x35, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50,
0x54, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, 0x57, 0x5f, 0x42,
0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0a,
0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x36, 0x35,
0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f,
0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, 0x57, 0x5f, 0x50,
0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f,
0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0d, 0x12, 0x1e, 0x0a,
0x1a, 0x47, 0x45, 0x54, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e,
0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0e, 0x12, 0x1a, 0x0a,
0x16, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54,
0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x35, 0x10, 0x0f, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41,
0x54, 0x55, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, 0x57, 0x5f,
0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10,
0x12, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x36,
0x36, 0x10, 0x13, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49,
0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x14, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, 0x57, 0x5f,
0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49,
0x4f, 0x4e, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x15, 0x12, 0x18,
0x0a, 0x14, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44,
0x45, 0x52, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x54, 0x5f,
0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10,
0x17, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41,
0x54, 0x41, 0x5f, 0x36, 0x36, 0x10, 0x18, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x54, 0x5f, 0x52,
0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x19, 0x12, 0x1e, 0x0a, 0x1a,
0x47, 0x45, 0x54, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53,
0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1a, 0x12, 0x14, 0x0a, 0x10,
0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x36,
0x10, 0x1b, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49,
0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1c, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f,
0x44, 0x41, 0x54, 0x41, 0x5f, 0x36, 0x36, 0x10, 0x1d, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43,
0x45, 0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1e, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f,
0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e,
0x53, 0x5f, 0x36, 0x35, 0x10, 0x0f, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
0x5f, 0x36, 0x36, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f,
0x43, 0x4b, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x12, 0x12, 0x10,
0x0a, 0x0c, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x36, 0x36, 0x10, 0x13,
0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53,
0x5f, 0x36, 0x36, 0x10, 0x14, 0x12, 0x24, 0x0a, 0x20, 0x4e, 0x45, 0x57, 0x5f, 0x50, 0x4f, 0x4f,
0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
0x48, 0x41, 0x53, 0x48, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x15, 0x12, 0x18, 0x0a, 0x14, 0x47,
0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53,
0x5f, 0x36, 0x36, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f,
0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x17, 0x12, 0x14,
0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f,
0x36, 0x36, 0x10, 0x18, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x45, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45,
0x49, 0x50, 0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x19, 0x12, 0x1e, 0x0a, 0x1a, 0x47, 0x45, 0x54,
0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54,
0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1a, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x4c, 0x4f,
0x43, 0x4b, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1b, 0x12,
0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x4f, 0x44, 0x49, 0x45, 0x53, 0x5f,
0x36, 0x36, 0x10, 0x1c, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54,
0x41, 0x5f, 0x36, 0x36, 0x10, 0x1d, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50,
0x54, 0x53, 0x5f, 0x36, 0x36, 0x10, 0x1e, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x4f, 0x4c, 0x45,
0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x36,
0x36, 0x10, 0x1f, 0x2a, 0x17, 0x0a, 0x0b, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x4b, 0x69,
0x6e, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x69, 0x63, 0x6b, 0x10, 0x00, 0x2a, 0x20, 0x0a, 0x08,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x54, 0x48, 0x36,
0x35, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x54, 0x48, 0x36, 0x36, 0x10, 0x01, 0x32, 0xfd,
0x04, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x43, 0x0a, 0x0c, 0x50, 0x65, 0x6e,
0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e, 0x74,
0x72, 0x79, 0x2e, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43,
0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b,
0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x12, 0x50, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x79, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x2e, 0x73,
0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x42, 0x79, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74,
0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72,
0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x49,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72,
0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x18, 0x53,
0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x52, 0x61, 0x6e, 0x64,
0x6f, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79,
0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x52, 0x61,
0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65,
0x65, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x54, 0x6f, 0x41, 0x6c, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79,
0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x44, 0x61, 0x74, 0x61, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65,
0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72,
0x79, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x12, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x17, 0x2e, 0x73,
0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x49,
0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x30, 0x01, 0x12,
0x3d, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x73,
0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e,
0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x11,
0x5a, 0x0f, 0x2e, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0x72,
0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x53, 0x5f, 0x36, 0x36, 0x10, 0x1f, 0x2a, 0x17, 0x0a, 0x0b, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74,
0x79, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x69, 0x63, 0x6b, 0x10, 0x00, 0x2a,
0x20, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x54, 0x48, 0x36, 0x35, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x54, 0x48, 0x36, 0x36, 0x10,
0x01, 0x32, 0xb2, 0x05, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x43, 0x0a, 0x0c,
0x50, 0x65, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x73,
0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x65,
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x12, 0x43, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63,
0x6b, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x4d,
0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x50, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
0x24, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x4d, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53,
0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x2e, 0x73, 0x65,
0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65,
0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x56,
0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x52,
0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x6e,
0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54,
0x6f, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x6e,
0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x41, 0x6c, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x6e,
0x74, 0x72, 0x79, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79,
0x2e, 0x53, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x53, 0x65,
0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79,
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x73, 0x65,
0x6e, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x12, 0x3d, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12,
0x17, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72,
0x79, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x30, 0x01, 0x12, 0x3d, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x18, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x6e, 0x74,
0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x12, 0x33, 0x0a, 0x05, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x6e,
0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x12, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x30, 0x01, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x73, 0x65, 0x6e, 0x74,
0x72, 0x79, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
@ -1191,71 +1344,78 @@ func file_p2psentry_sentry_proto_rawDescGZIP() []byte {
return file_p2psentry_sentry_proto_rawDescData
}
var file_p2psentry_sentry_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_p2psentry_sentry_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_p2psentry_sentry_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_p2psentry_sentry_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_p2psentry_sentry_proto_goTypes = []interface{}{
(MessageId)(0), // 0: sentry.MessageId
(PenaltyKind)(0), // 1: sentry.PenaltyKind
(Protocol)(0), // 2: sentry.Protocol
(*OutboundMessageData)(nil), // 3: sentry.OutboundMessageData
(*SendMessageByMinBlockRequest)(nil), // 4: sentry.SendMessageByMinBlockRequest
(*SendMessageByIdRequest)(nil), // 5: sentry.SendMessageByIdRequest
(*SendMessageToRandomPeersRequest)(nil), // 6: sentry.SendMessageToRandomPeersRequest
(*SentPeers)(nil), // 7: sentry.SentPeers
(*PenalizePeerRequest)(nil), // 8: sentry.PenalizePeerRequest
(*PeerMinBlockRequest)(nil), // 9: sentry.PeerMinBlockRequest
(*InboundMessage)(nil), // 10: sentry.InboundMessage
(*Forks)(nil), // 11: sentry.Forks
(*StatusData)(nil), // 12: sentry.StatusData
(*SetStatusReply)(nil), // 13: sentry.SetStatusReply
(*MessagesRequest)(nil), // 14: sentry.MessagesRequest
(*PeerCountRequest)(nil), // 15: sentry.PeerCountRequest
(*PeerCountReply)(nil), // 16: sentry.PeerCountReply
(*types.H512)(nil), // 17: types.H512
(*types.H256)(nil), // 18: types.H256
(*emptypb.Empty)(nil), // 19: google.protobuf.Empty
(PeersReply_PeerEvent)(0), // 3: sentry.PeersReply.PeerEvent
(*OutboundMessageData)(nil), // 4: sentry.OutboundMessageData
(*SendMessageByMinBlockRequest)(nil), // 5: sentry.SendMessageByMinBlockRequest
(*SendMessageByIdRequest)(nil), // 6: sentry.SendMessageByIdRequest
(*SendMessageToRandomPeersRequest)(nil), // 7: sentry.SendMessageToRandomPeersRequest
(*SentPeers)(nil), // 8: sentry.SentPeers
(*PenalizePeerRequest)(nil), // 9: sentry.PenalizePeerRequest
(*PeerMinBlockRequest)(nil), // 10: sentry.PeerMinBlockRequest
(*InboundMessage)(nil), // 11: sentry.InboundMessage
(*Forks)(nil), // 12: sentry.Forks
(*StatusData)(nil), // 13: sentry.StatusData
(*SetStatusReply)(nil), // 14: sentry.SetStatusReply
(*MessagesRequest)(nil), // 15: sentry.MessagesRequest
(*PeerCountRequest)(nil), // 16: sentry.PeerCountRequest
(*PeerCountReply)(nil), // 17: sentry.PeerCountReply
(*PeersRequest)(nil), // 18: sentry.PeersRequest
(*PeersReply)(nil), // 19: sentry.PeersReply
(*types.H512)(nil), // 20: types.H512
(*types.H256)(nil), // 21: types.H256
(*emptypb.Empty)(nil), // 22: google.protobuf.Empty
}
var file_p2psentry_sentry_proto_depIdxs = []int32{
0, // 0: sentry.OutboundMessageData.id:type_name -> sentry.MessageId
3, // 1: sentry.SendMessageByMinBlockRequest.data:type_name -> sentry.OutboundMessageData
3, // 2: sentry.SendMessageByIdRequest.data:type_name -> sentry.OutboundMessageData
17, // 3: sentry.SendMessageByIdRequest.peer_id:type_name -> types.H512
3, // 4: sentry.SendMessageToRandomPeersRequest.data:type_name -> sentry.OutboundMessageData
17, // 5: sentry.SentPeers.peers:type_name -> types.H512
17, // 6: sentry.PenalizePeerRequest.peer_id:type_name -> types.H512
4, // 1: sentry.SendMessageByMinBlockRequest.data:type_name -> sentry.OutboundMessageData
4, // 2: sentry.SendMessageByIdRequest.data:type_name -> sentry.OutboundMessageData
20, // 3: sentry.SendMessageByIdRequest.peer_id:type_name -> types.H512
4, // 4: sentry.SendMessageToRandomPeersRequest.data:type_name -> sentry.OutboundMessageData
20, // 5: sentry.SentPeers.peers:type_name -> types.H512
20, // 6: sentry.PenalizePeerRequest.peer_id:type_name -> types.H512
1, // 7: sentry.PenalizePeerRequest.penalty:type_name -> sentry.PenaltyKind
17, // 8: sentry.PeerMinBlockRequest.peer_id:type_name -> types.H512
20, // 8: sentry.PeerMinBlockRequest.peer_id:type_name -> types.H512
0, // 9: sentry.InboundMessage.id:type_name -> sentry.MessageId
17, // 10: sentry.InboundMessage.peer_id:type_name -> types.H512
18, // 11: sentry.Forks.genesis:type_name -> types.H256
18, // 12: sentry.StatusData.total_difficulty:type_name -> types.H256
18, // 13: sentry.StatusData.best_hash:type_name -> types.H256
11, // 14: sentry.StatusData.fork_data:type_name -> sentry.Forks
20, // 10: sentry.InboundMessage.peer_id:type_name -> types.H512
21, // 11: sentry.Forks.genesis:type_name -> types.H256
21, // 12: sentry.StatusData.total_difficulty:type_name -> types.H256
21, // 13: sentry.StatusData.best_hash:type_name -> types.H256
12, // 14: sentry.StatusData.fork_data:type_name -> sentry.Forks
2, // 15: sentry.SetStatusReply.protocol:type_name -> sentry.Protocol
0, // 16: sentry.MessagesRequest.ids:type_name -> sentry.MessageId
8, // 17: sentry.Sentry.PenalizePeer:input_type -> sentry.PenalizePeerRequest
9, // 18: sentry.Sentry.PeerMinBlock:input_type -> sentry.PeerMinBlockRequest
4, // 19: sentry.Sentry.SendMessageByMinBlock:input_type -> sentry.SendMessageByMinBlockRequest
5, // 20: sentry.Sentry.SendMessageById:input_type -> sentry.SendMessageByIdRequest
6, // 21: sentry.Sentry.SendMessageToRandomPeers:input_type -> sentry.SendMessageToRandomPeersRequest
3, // 22: sentry.Sentry.SendMessageToAll:input_type -> sentry.OutboundMessageData
12, // 23: sentry.Sentry.SetStatus:input_type -> sentry.StatusData
14, // 24: sentry.Sentry.Messages:input_type -> sentry.MessagesRequest
15, // 25: sentry.Sentry.PeerCount:input_type -> sentry.PeerCountRequest
19, // 26: sentry.Sentry.PenalizePeer:output_type -> google.protobuf.Empty
19, // 27: sentry.Sentry.PeerMinBlock:output_type -> google.protobuf.Empty
7, // 28: sentry.Sentry.SendMessageByMinBlock:output_type -> sentry.SentPeers
7, // 29: sentry.Sentry.SendMessageById:output_type -> sentry.SentPeers
7, // 30: sentry.Sentry.SendMessageToRandomPeers:output_type -> sentry.SentPeers
7, // 31: sentry.Sentry.SendMessageToAll:output_type -> sentry.SentPeers
13, // 32: sentry.Sentry.SetStatus:output_type -> sentry.SetStatusReply
10, // 33: sentry.Sentry.Messages:output_type -> sentry.InboundMessage
16, // 34: sentry.Sentry.PeerCount:output_type -> sentry.PeerCountReply
26, // [26:35] is the sub-list for method output_type
17, // [17:26] is the sub-list for method input_type
17, // [17:17] is the sub-list for extension type_name
17, // [17:17] is the sub-list for extension extendee
0, // [0:17] is the sub-list for field type_name
20, // 17: sentry.PeersReply.peer_id:type_name -> types.H512
3, // 18: sentry.PeersReply.event:type_name -> sentry.PeersReply.PeerEvent
9, // 19: sentry.Sentry.PenalizePeer:input_type -> sentry.PenalizePeerRequest
10, // 20: sentry.Sentry.PeerMinBlock:input_type -> sentry.PeerMinBlockRequest
5, // 21: sentry.Sentry.SendMessageByMinBlock:input_type -> sentry.SendMessageByMinBlockRequest
6, // 22: sentry.Sentry.SendMessageById:input_type -> sentry.SendMessageByIdRequest
7, // 23: sentry.Sentry.SendMessageToRandomPeers:input_type -> sentry.SendMessageToRandomPeersRequest
4, // 24: sentry.Sentry.SendMessageToAll:input_type -> sentry.OutboundMessageData
13, // 25: sentry.Sentry.SetStatus:input_type -> sentry.StatusData
15, // 26: sentry.Sentry.Messages:input_type -> sentry.MessagesRequest
16, // 27: sentry.Sentry.PeerCount:input_type -> sentry.PeerCountRequest
18, // 28: sentry.Sentry.Peers:input_type -> sentry.PeersRequest
22, // 29: sentry.Sentry.PenalizePeer:output_type -> google.protobuf.Empty
22, // 30: sentry.Sentry.PeerMinBlock:output_type -> google.protobuf.Empty
8, // 31: sentry.Sentry.SendMessageByMinBlock:output_type -> sentry.SentPeers
8, // 32: sentry.Sentry.SendMessageById:output_type -> sentry.SentPeers
8, // 33: sentry.Sentry.SendMessageToRandomPeers:output_type -> sentry.SentPeers
8, // 34: sentry.Sentry.SendMessageToAll:output_type -> sentry.SentPeers
14, // 35: sentry.Sentry.SetStatus:output_type -> sentry.SetStatusReply
11, // 36: sentry.Sentry.Messages:output_type -> sentry.InboundMessage
17, // 37: sentry.Sentry.PeerCount:output_type -> sentry.PeerCountReply
19, // 38: sentry.Sentry.Peers:output_type -> sentry.PeersReply
29, // [29:39] is the sub-list for method output_type
19, // [19:29] is the sub-list for method input_type
19, // [19:19] is the sub-list for extension type_name
19, // [19:19] is the sub-list for extension extendee
0, // [0:19] is the sub-list for field type_name
}
func init() { file_p2psentry_sentry_proto_init() }
@ -1432,14 +1592,38 @@ func file_p2psentry_sentry_proto_init() {
return nil
}
}
file_p2psentry_sentry_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PeersRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_p2psentry_sentry_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PeersReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_p2psentry_sentry_proto_rawDesc,
NumEnums: 3,
NumMessages: 14,
NumEnums: 4,
NumMessages: 16,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -31,6 +31,8 @@ type SentryClient interface {
// It is possible to subscribe to the same set if ids more than once.
Messages(ctx context.Context, in *MessagesRequest, opts ...grpc.CallOption) (Sentry_MessagesClient, error)
PeerCount(ctx context.Context, in *PeerCountRequest, opts ...grpc.CallOption) (*PeerCountReply, error)
// Notifications about connected (after sub-protocol handshake) or lost peer
Peers(ctx context.Context, in *PeersRequest, opts ...grpc.CallOption) (Sentry_PeersClient, error)
}
type sentryClient struct {
@ -145,6 +147,38 @@ func (c *sentryClient) PeerCount(ctx context.Context, in *PeerCountRequest, opts
return out, nil
}
func (c *sentryClient) Peers(ctx context.Context, in *PeersRequest, opts ...grpc.CallOption) (Sentry_PeersClient, error) {
stream, err := c.cc.NewStream(ctx, &Sentry_ServiceDesc.Streams[1], "/sentry.Sentry/Peers", opts...)
if err != nil {
return nil, err
}
x := &sentryPeersClient{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
}
type Sentry_PeersClient interface {
Recv() (*PeersReply, error)
grpc.ClientStream
}
type sentryPeersClient struct {
grpc.ClientStream
}
func (x *sentryPeersClient) Recv() (*PeersReply, error) {
m := new(PeersReply)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// SentryServer is the server API for Sentry service.
// All implementations must embed UnimplementedSentryServer
// for forward compatibility
@ -161,6 +195,8 @@ type SentryServer interface {
// It is possible to subscribe to the same set if ids more than once.
Messages(*MessagesRequest, Sentry_MessagesServer) error
PeerCount(context.Context, *PeerCountRequest) (*PeerCountReply, error)
// Notifications about connected (after sub-protocol handshake) or lost peer
Peers(*PeersRequest, Sentry_PeersServer) error
mustEmbedUnimplementedSentryServer()
}
@ -195,6 +231,9 @@ func (UnimplementedSentryServer) Messages(*MessagesRequest, Sentry_MessagesServe
func (UnimplementedSentryServer) PeerCount(context.Context, *PeerCountRequest) (*PeerCountReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method PeerCount not implemented")
}
func (UnimplementedSentryServer) Peers(*PeersRequest, Sentry_PeersServer) error {
return status.Errorf(codes.Unimplemented, "method Peers not implemented")
}
func (UnimplementedSentryServer) mustEmbedUnimplementedSentryServer() {}
// UnsafeSentryServer may be embedded to opt out of forward compatibility for this service.
@ -373,6 +412,27 @@ func _Sentry_PeerCount_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
func _Sentry_Peers_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(PeersRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SentryServer).Peers(m, &sentryPeersServer{stream})
}
type Sentry_PeersServer interface {
Send(*PeersReply) error
grpc.ServerStream
}
type sentryPeersServer struct {
grpc.ServerStream
}
func (x *sentryPeersServer) Send(m *PeersReply) error {
return x.ServerStream.SendMsg(m)
}
// 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)
@ -419,6 +479,11 @@ var Sentry_ServiceDesc = grpc.ServiceDesc{
Handler: _Sentry_Messages_Handler,
ServerStreams: true,
},
{
StreamName: "Peers",
Handler: _Sentry_Peers_Handler,
ServerStreams: true,
},
},
Metadata: "p2psentry/sentry.proto",
}