PingResponseDirective
public enum PingResponseDirective
Directs a shell implementation about how to handle an incoming .pingRequest
.
-
Indicates that incoming gossip was processed and the membership may have changed because of it, inspect the
GossipProcessedDirective
to learn more about what change was applied.Declaration
Swift
case gossipProcessed(GossipProcessedDirective)
-
Upon receiving an
ack
fromtarget
, if we were making this ping because of apingRequest
frompeer
, we need to forward that acknowledgement to that peer now.Declaration
Swift
case sendAck(peer: SWIMPingRequestOriginPeer, acknowledging: SWIM.SequenceNumber, target: SWIMPeer, incarnation: UInt64, payload: SWIM.GossipPayload)
Parameters
to
the peer to which an
ack
should be sentpingedTarget
the
myself
peer, should be passed astarget
when sending the ack messageincarnation
the incarnation number of this peer; used to determine which status is “the latest” when comparing acknowledgement with suspicions
payload
additional gossip payload to include in the ack message
acknowledging
sequence number of the ack message
-
Send a
nack
to thepeer
which originally send this peer request.Declaration
Swift
case sendNack(peer: SWIMPingRequestOriginPeer, acknowledging: SWIM.SequenceNumber, target: SWIMPeer)
Parameters
peer
the peer to which the
nack
should be sentacknowledging
sequence number of the ack message
target
the peer which we attempted to ping but it didn’t reply on time
-
Send a
pingRequest
as described by theSendPingRequestDirective
.The target node did not reply with an successful
.ack
and as such was now marked as.suspect
. By sending ping requests to other members of the cluster we attempt to revert this suspicion, perhaps some other node is able to receive an.ack
from it after all?Declaration
Swift
case sendPingRequests(SendPingRequestDirective)