Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentry.proto: rename Peers to PeerEvents #101

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions p2psentry/sentry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@ message PeerCountRequest {}

message PeerCountReply {uint64 count = 1;}

message PeersRequest {}
message PeersReply {
enum PeerEvent {
message PeerEventsRequest {}
message PeerEvent {
enum PeerEventId {
// Happens after after a successful sub-protocol handshake.
Connect = 0;
Disconnect = 1;
}
types.H512 peer_id = 1;
PeerEvent event = 2;
PeerEventId event_id = 2;
}

service Sentry {
Expand All @@ -153,15 +154,15 @@ service Sentry {
returns (SentPeers);
rpc SendMessageToAll(OutboundMessageData) returns (SentPeers);


// 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.
rpc Messages(MessagesRequest) returns (stream InboundMessage);

rpc PeerCount(PeerCountRequest) returns (PeerCountReply);
// Subscribe to notifications about connected or lost peers.
rpc PeerEvents(PeerEventsRequest) returns (stream PeerEvent);

// Notifications about connected (after sub-protocol handshake) or lost peer
rpc Peers(PeersRequest) returns (stream PeersReply);
// NodeInfo returns a collection of metadata known about the host.
rpc NodeInfo(google.protobuf.Empty) returns(types.NodeInfoReply);
}