from typing import List, Literal, Optional, TypedDict
[docs]
class BatchStats(TypedDict):
queueLength: int
ratePerSecond: int
# must use functional syntax because class is a keyword
Shard = TypedDict(
"Shard",
{
"name": str,
"class": str,
"objectCount": int,
"vectorIndexingStatus": Literal["READONLY", "INDEXING", "READY"],
"vectorQueueLength": int,
"compressed": bool,
"loaded": Optional[bool],
},
)
[docs]
class Stats(TypedDict):
objectCount: int
shardCount: int
[docs]
class Node(TypedDict):
batchStats: BatchStats
gitHash: str
name: str
shards: Optional[List[Shard]]
stats: Stats
status: str
version: str