summaryrefslogtreecommitdiffstats
path: root/src/commands/cluster-shards.json
blob: e7a082953478f0f9958676b01d9adc4a9fc43a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
    "SHARDS": {
        "summary": "Returns the mapping of cluster slots to shards.",
        "complexity": "O(N) where N is the total number of cluster nodes",
        "group": "cluster",
        "since": "7.0.0",
        "arity": 2,
        "container": "CLUSTER",
        "function": "clusterCommand",
        "history": [],
        "command_flags": [
            "LOADING",
            "STALE"
        ],
        "command_tips": [
            "NONDETERMINISTIC_OUTPUT"
        ],
        "reply_schema": {
            "description": "a nested list of a map of hash ranges and shard nodes describing individual shards",
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "slots": {
                        "description": "an even number element array specifying the start and end slot numbers for slot ranges owned by this shard",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "nodes": {
                        "description": "nodes that handle these slot ranges",
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "port": {
                                    "type": "integer"
                                },
                                "tls-port": {
                                    "type": "integer"
                                },
                                "ip": {
                                    "type": "string"
                                },
                                "endpoint": {
                                    "type": "string"
                                },
                                "hostname": {
                                    "type": "string"
                                },
                                "role": {
                                    "oneOf": [
                                        {
                                            "const": "master"
                                        },
                                        {
                                            "const": "replica"
                                        }
                                    ]
                                },
                                "replication-offset": {
                                    "type": "integer"
                                },
                                "health": {
                                    "oneOf": [
                                        {
                                            "const": "fail"
                                        },
                                        {
                                            "const": "loading"
                                        },
                                        {
                                            "const": "online"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}