Skip to content

Commit 10c8c6b

Browse files
authored
Add RedisClusterShardDescriptionProtocol (#93)
1 parent f837e29 commit 10c8c6b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the RediStack open source project
4+
//
5+
// Copyright (c) 2023 RediStack project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of RediStack project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
/// A description of a single shard that is part of a redis cluster
16+
public protocol RedisClusterShardDescriptionProtocol: Identifiable, Sendable {
17+
associatedtype NodeDescription: RedisClusterNodeDescriptionProtocol
18+
19+
/// The shard's master node
20+
var master: NodeDescription { get }
21+
22+
/// The shard's replica nodes
23+
var replicas: [NodeDescription] { get }
24+
}

0 commit comments

Comments
 (0)