Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ktoso committed Aug 2, 2022
1 parent 1c300c4 commit e5c7783
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Sources/SWIM/Peer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public protocol SWIMAddressablePeer: Sendable {
}

extension SWIMAddressablePeer {
internal var node: ClusterMembership.Node {
self.swimNode
}
internal var node: ClusterMembership.Node {
self.swimNode
}
}

/// SWIM A peer which originated a `ping`, should be replied to with an `ack`.
Expand Down
11 changes: 6 additions & 5 deletions Sources/SWIM/SWIMInstance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ extension SWIM {
/// **Please refer to `SWIM` for an in-depth discussion of the algorithm and extensions implemented in this package.**
///
/// - SeeAlso: `SWIM` for a complete and in depth discussion of the protocol.
public struct Instance<Peer: SWIMPeer,
PingOrigin: SWIMPingOriginPeer,
PingRequestOrigin: SWIMPingRequestOriginPeer>: SWIMProtocol { // TODO: could this be a struct?

public struct Instance<
Peer: SWIMPeer,
PingOrigin: SWIMPingOriginPeer,
PingRequestOrigin: SWIMPingRequestOriginPeer
>: SWIMProtocol { // TODO: could this be a struct?
/// The settings currently in use by this instance.
public let settings: SWIM.Settings

Expand Down Expand Up @@ -864,7 +865,7 @@ extension SWIM.Instance {
// ==== ------------------------------------------------------------------------------------------------------------
// MARK: On Ping Response Handlers

mutating public func onPingResponse(response: SWIM.PingResponse<Peer, PingRequestOrigin>, pingRequestOrigin: PingRequestOrigin?, pingRequestSequenceNumber: SWIM.SequenceNumber?) -> [PingResponseDirective] {
public mutating func onPingResponse(response: SWIM.PingResponse<Peer, PingRequestOrigin>, pingRequestOrigin: PingRequestOrigin?, pingRequestSequenceNumber: SWIM.SequenceNumber?) -> [PingResponseDirective] {
switch response {
case .ack(let target, let incarnation, let payload, let sequenceNumber):
return self.onPingAckResponse(target: target, incarnation: incarnation, payload: payload, pingRequestOrigin: pingRequestOrigin, pingRequestSequenceNumber: pingRequestSequenceNumber, sequenceNumber: sequenceNumber)
Expand Down
1 change: 0 additions & 1 deletion Sources/SWIM/Utils/time.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//


extension Swift.Duration {
typealias Value = Int64

Expand Down

0 comments on commit e5c7783

Please sign in to comment.