summaryrefslogtreecommitdiffhomepage
path: root/ios/RelayCache
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2023-10-16 14:55:04 +0200
committerBug Magnet <marco.nikic@mullvad.net>2023-10-16 14:55:04 +0200
commit5d4fcb35d7273d074716840751818db690df415a (patch)
tree309723c806247371150565459e8b9b57937e9a0d /ios/RelayCache
parentf7b9c1bb4e5338808f7f7d6ec0c0d3dc3cb4f0a4 (diff)
parentc946ac56c4d591c41cc951ba1958f3d7d2f3affa (diff)
downloadmullvadvpn-5d4fcb35d7273d074716840751818db690df415a.tar.xz
mullvadvpn-5d4fcb35d7273d074716840751818db690df415a.zip
Merge branch 'tunnel-async-actor-tests'
Diffstat (limited to 'ios/RelayCache')
-rw-r--r--ios/RelayCache/RelayCache.swift7
1 files changed, 6 insertions, 1 deletions
diff --git a/ios/RelayCache/RelayCache.swift b/ios/RelayCache/RelayCache.swift
index abce823786..ba7ed31cf1 100644
--- a/ios/RelayCache/RelayCache.swift
+++ b/ios/RelayCache/RelayCache.swift
@@ -10,7 +10,12 @@ import Foundation
import MullvadREST
import MullvadTypes
-public final class RelayCache {
+public protocol RelayCacheProtocol {
+ func read() throws -> CachedRelays
+ func write(record: CachedRelays) throws
+}
+
+public final class RelayCache: RelayCacheProtocol {
private let fileCache: any FileCacheProtocol<CachedRelays>
/// Designated initializer