Skip to content

Commit 5d5c68e

Browse files
authored
Merge branch 'main' into feature/distributed-tracing
2 parents ecec7cd + 04064f6 commit 5d5c68e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+66
-7
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ let defaultSwiftSettings: [SwiftSetting] =
1111

1212
let package = Package(
1313
name: "valkey-swift",
14-
platforms: [.macOS(.v13)],
1514
products: [
1615
.library(name: "Valkey", targets: ["Valkey"]),
1716
.library(name: "ValkeyBloom", targets: ["ValkeyBloom"]),
@@ -102,6 +101,7 @@ let package = Package(
102101
)
103102

104103
if Context.environment["ENABLE_VALKEY_BENCHMARKS"] != nil {
104+
package.platforms = [.macOS(.v13)]
105105
package.dependencies.append(
106106
.package(url: "https://github.com/ordo-one/package-benchmark", from: "1.0.0")
107107
)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let valkeyClient = ValkeyClient(.hostname("localhost", port: 6379), logger: logg
1111
try await withThrowingTaskgroup(of: Void.self) { group in
1212
group.addTask {
1313
// run connection pool in the background
14-
try await valkeyClient.run()
14+
await valkeyClient.run()
1515
}
1616
// use valkey client
1717
}

Sources/Valkey/Cluster/ValkeyClusterClientStateMachine.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import Glibc
2323
import Musl
2424
#endif
2525

26+
@available(valkeySwift 1.0, *)
2627
package struct ValkeyClusterTimer: Sendable, Hashable {
2728
package enum UseCase: Hashable {
2829
case nextDiscovery
@@ -43,6 +44,7 @@ package struct ValkeyClusterTimer: Sendable, Hashable {
4344
}
4445

4546
@usableFromInline
47+
@available(valkeySwift 1.0, *)
4648
package struct ValkeyClusterClientStateMachineConfiguration {
4749
/// The duration after which the cluster client rejects all requests, because it can't find a cluster consensus
4850
@usableFromInline
@@ -58,6 +60,7 @@ package struct ValkeyClusterClientStateMachineConfiguration {
5860
}
5961

6062
@usableFromInline
63+
@available(valkeySwift 1.0, *)
6164
package struct ValkeyClusterClientStateMachine<
6265
ConnectionPool: ValkeyNodeConnectionPool,
6366
ConnectionPoolFactory: ValkeyNodeConnectionPoolFactory,
@@ -755,6 +758,7 @@ package struct ValkeyClusterClientStateMachine<
755758
}
756759
}
757760

761+
@available(valkeySwift 1.0, *)
758762
extension ValkeyClusterClientStateMachine {
759763
/// Calculates the delay for the next connection attempt after the given number of failed `attempts`.
760764
///

Sources/Valkey/Cluster/ValkeyNodeConnectionPool.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import NIOSSL
1717

1818
/// A connection pool against a node
1919
@usableFromInline
20+
@available(valkeySwift 1.0, *)
2021
package protocol ValkeyNodeConnectionPool: AnyObject, Sendable {
2122
/// Function that process background events, cancel the task or call ``triggerShutdown`` to
2223
/// shutdown the server
@@ -28,6 +29,7 @@ package protocol ValkeyNodeConnectionPool: AnyObject, Sendable {
2829

2930
/// A connection pool factory that creates `ConnectionPool`s
3031
@usableFromInline
32+
@available(valkeySwift 1.0, *)
3133
package protocol ValkeyNodeConnectionPoolFactory: Sendable {
3234
associatedtype ConnectionPool: ValkeyNodeConnectionPool
3335

Sources/Valkey/Cluster/ValkeyNodeDiscovery.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
/// A type that allows the cluster client to initially find at least one node in the cluster, or find the
1616
/// nodes again if connection to them has been lost.
17+
@available(valkeySwift 1.0, *)
1718
public protocol ValkeyNodeDiscovery: Sendable {
1819
/// A type that describes a single node in a valkey cluster
1920
associatedtype NodeDescription: ValkeyNodeDescriptionProtocol

Sources/Valkey/Cluster/ValkeyTopologyCandidate.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/// designed specifically for efficient comparison during cluster updates. It preserves
1919
/// only the essential properties needed to determine if a topology has changed, while
2020
/// maintaining consistent ordering of elements to ensure reliable equality checks.
21+
@available(valkeySwift 1.0, *)
2122
package struct ValkeyTopologyCandidate: Hashable {
2223
/// Represents a shard (hash slot range) within a Valkey cluster topology.
2324
///
@@ -114,6 +115,7 @@ package struct ValkeyTopologyCandidate: Hashable {
114115
}
115116
}
116117

118+
@available(valkeySwift 1.0, *)
117119
package struct ValkeyClusterVoter<ConnectionPool: ValkeyNodeConnectionPool> {
118120
package var client: ConnectionPool
119121
package var nodeID: ValkeyNodeID

Sources/Valkey/Cluster/ValkeyTopologyElection.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
/// - Tracking vote counts for each topology candidate
2424
/// - Managing revotes (nodes changing their vote)
2525
/// - Determining when a winner has been elected
26+
@available(valkeySwift 1.0, *)
2627
package struct ValkeyTopologyElection {
2728
/// Represents a candidate in the topology election, tracking votes and thresholds.
2829
///

Sources/Valkey/Commands/BitmapCommands.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ public struct SETBIT: ValkeyCommand {
491491
}
492492
}
493493

494+
@available(valkeySwift 1.0, *)
494495
extension ValkeyClientProtocol {
495496
/// Counts the number of set bits (population counting) in a string.
496497
///

Sources/Valkey/Commands/ClusterCommands.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,7 @@ public struct READWRITE: ValkeyCommand {
873873
}
874874
}
875875

876+
@available(valkeySwift 1.0, *)
876877
extension ValkeyClientProtocol {
877878
/// Signals that a cluster client is following an -ASK redirect.
878879
///

Sources/Valkey/Commands/ConnectionCommands.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,7 @@ public struct SELECT: ValkeyCommand {
10291029
}
10301030
}
10311031

1032+
@available(valkeySwift 1.0, *)
10321033
extension ValkeyClientProtocol {
10331034
/// Authenticates the connection.
10341035
///

0 commit comments

Comments
 (0)