-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to specify custom result provider (#6)
- Loading branch information
Showing
3 changed files
with
69 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
Sources/Synchronization-swift/SynchronizationResolveTypes.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Evegeny Kalashnikov on 11.08.2023. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum SynchronizationResolveTypes { | ||
|
||
/// Not resolve and throw error | ||
case none | ||
|
||
/// Retry same operation | ||
case retry | ||
|
||
/// Retry same operation after delay in seconds | ||
case retryAfter(seconds: TimeInterval) | ||
|
||
/// Retry with another URLRequest | ||
case retryWith(request: URLRequest) | ||
|
||
/// Reset type will call object request from AnySynchronizable | ||
case reset | ||
} |