Skip to content

Commit

Permalink
sentry.proto: rename Peers to PeerEvents
Browse files Browse the repository at this point in the history
* rename Peers() -> PeerEvents()
* rename PeersRequest -> PeerEventsRequest
* rename PeerEvent -> PeerEventId
* rename PeersReply -> PeerEvent
  • Loading branch information
battlmonstr committed Apr 22, 2022
1 parent b073b1f commit 6bd41cb
Showing 1 changed file with 8 additions and 7 deletions.
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 = 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);
}

0 comments on commit 6bd41cb

Please sign in to comment.