Skip to content

Commit 9815255

Browse files
authored
Make response initializers internal or package (#310)
1 parent 06ecb3a commit 9815255

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

Sources/Valkey/Commands/Custom/ClusterCustomCommands.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public struct ValkeyClusterNode: Hashable, Sendable, RESPTokenDecodable {
144144
/// - configEpoch: Configuration epoch
145145
/// - linkState: Link state to this node
146146
/// - slots: Hash slots served by this node
147-
public init(
147+
init(
148148
nodeId: String,
149149
endpoint: String,
150150
flags: Set<Flag>,
@@ -330,7 +330,7 @@ public struct ValkeyClusterDescription: Hashable, Sendable, RESPTokenDecodable {
330330
/// - role: The node role
331331
/// - replicationOffset: The replication offset
332332
/// - health: The node health
333-
public init(
333+
package init(
334334
id: String,
335335
port: Int?,
336336
tlsPort: Int?,
@@ -369,7 +369,7 @@ public struct ValkeyClusterDescription: Hashable, Sendable, RESPTokenDecodable {
369369
/// - Parameters:
370370
/// - slots: The slots in the shard.
371371
/// - nodes: The nodes in the shard.
372-
public init(slots: HashSlots, nodes: [Node]) {
372+
package init(slots: HashSlots, nodes: [Node]) {
373373
self.slots = slots
374374
self.nodes = nodes
375375
}
@@ -392,7 +392,7 @@ public struct ValkeyClusterDescription: Hashable, Sendable, RESPTokenDecodable {
392392

393393
/// Creates a cluster description from a list of shards you provide.
394394
/// - Parameter shards: The shards that make up the cluster.
395-
public init(_ shards: [ValkeyClusterDescription.Shard]) {
395+
package init(_ shards: [ValkeyClusterDescription.Shard]) {
396396
self.shards = shards
397397
}
398398
}
@@ -449,7 +449,7 @@ public struct ValkeyClusterLink: Hashable, Sendable, RESPTokenDecodable {
449449
/// - events: Events registered for the link
450450
/// - sendBufferAllocated: Allocated send buffer size
451451
/// - sendBufferUsed: Used send buffer size
452-
public init(
452+
init(
453453
direction: Direction,
454454
node: String,
455455
createTime: Int,
@@ -546,7 +546,7 @@ public struct ValkeyClusterSlotRange: Hashable, Sendable, RESPTokenDecodable {
546546
/// - startSlot: The start slot
547547
/// - endSlot: The end slot
548548
/// - nodes: The nodes serving this range
549-
public init(startSlot: Int, endSlot: Int, nodes: [Node]) {
549+
init(startSlot: Int, endSlot: Int, nodes: [Node]) {
550550
self.startSlot = startSlot
551551
self.endSlot = endSlot
552552
self.nodes = nodes

Sources/Valkey/Commands/Custom/GeoCustomCommands.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public struct GeoSearchEntries: RESPTokenDecodable, Sendable {
8585
/// - distance: Optional distance from center.
8686
/// - hash: Optional geohash integer.
8787
/// - coordinates: Optional coordinates.
88-
public init(
88+
init(
8989
member: String,
9090
distance: Double? = nil,
9191
hash: Int64? = nil,

0 commit comments

Comments
 (0)