Skip to content

Commit

Permalink
Rename RetryLogger → RetryLogging
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Jul 19, 2023
1 parent 1c498e8 commit 6cb6161
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Retry/Retry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum Retry {
public static func attempt<T>(_ label: String,
delay: Double = 5,
retries: Int = 5,
logger: RetryLogger = DefaultLogger(),
logger: RetryLogging = DefaultLogger(),
_ block: () throws -> T) throws -> T {
var retriesLeft = retries
var currentTry = 1
Expand All @@ -53,13 +53,13 @@ public enum Retry {
}


public protocol RetryLogger {
public protocol RetryLogging {
func onStartOfRetry(label: String, attempt: Int)
func onStartOfDelay(label: String, delay: Double)
}


public struct DefaultLogger: RetryLogger {
public struct DefaultLogger: RetryLogging {
public init() { }

public func onStartOfRetry(label: String, attempt: Int) {
Expand Down

0 comments on commit 6cb6161

Please sign in to comment.