Skip to content

Commit 0f42792

Browse files
authored
Cleanup public symbols (#228)
* ValkeyNodeClient shouldnt be available to user I also fixed up the ask function I forgot to rename Signed-off-by: Adam Fowler <adamfowler71@gmail.com> * Removed public from ByteBuffer.writeRESP3Token Signed-off-by: Adam Fowler <adamfowler71@gmail.com> * remove ValkeyNodeClient from docs Signed-off-by: Adam Fowler <adamfowler71@gmail.com> --------- Signed-off-by: Adam Fowler <adamfowler71@gmail.com>
1 parent 6d85193 commit 0f42792

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Sources/Valkey/Cluster/ValkeyClusterClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public final class ValkeyClusterClient: Sendable {
251251
// send commands that need retrying
252252
let retriedResults =
253253
if ask {
254-
await node.ask(retryCommands.map(\.0))
254+
await node.executeWithAsk(retryCommands.map(\.0))
255255
} else {
256256
await node.execute(retryCommands.map(\.0))
257257
}

Sources/Valkey/Documentation.docc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Valkey-swift is a swift based client for Valkey, the high-performance key/value
2020
- ``ValkeyClient``
2121
- ``ValkeyClientConfiguration``
2222
- ``ValkeyClientProtocol``
23-
- ``ValkeyNodeClient``
2423
- ``ValkeyServerAddress``
2524
- ``ValkeyConnection``
2625
- ``ValkeyConnectionConfiguration``

Sources/Valkey/Node/ValkeyNodeClient.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import ServiceLifecycle
2323
///
2424
/// Supports TLS via both NIOSSL and Network framework.
2525
@available(valkeySwift 1.0, *)
26-
public final class ValkeyNodeClient: Sendable {
26+
@usableFromInline
27+
package final class ValkeyNodeClient: Sendable {
2728
typealias Pool = ConnectionPool<
2829
ValkeyConnection,
2930
ValkeyConnection.ID,
@@ -184,7 +185,7 @@ extension ValkeyNodeClient {
184185

185186
/// Internal command used by cluster client, that precedes each command with a ASKING
186187
/// command
187-
func ask<Commands: Collection & Sendable>(
188+
func executeWithAsk<Commands: Collection & Sendable>(
188189
_ commands: Commands
189190
) async -> sending [Result<RESPToken, Error>] where Commands.Element == any ValkeyCommand {
190191
do {

Sources/Valkey/RESP/RESPToken.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ extension ByteBuffer {
564564
return crIndex
565565
}
566566

567-
public mutating func writeRESP3Token(_ token: RESPToken.Value) {
567+
mutating func writeRESP3Token(_ token: RESPToken.Value) {
568568
switch token {
569569
case .simpleString(var string):
570570
self.writeInteger(RESPTypeIdentifier.simpleString.rawValue)

0 commit comments

Comments
 (0)