data ShardInfo
One shard group of the cluster (cluster.shards()).
Example:
fn main() io {
for s in cluster.shards() {
print("{s.group} {s.kind} leader={s.leader}")
}
print("done")
}Вывод
done
pub(api) data ShardInfoС версии. 1.0.0-beta
Поля
pub(api) group: i64 | Number of the shard group. |
pub(api) kind: str |
|
pub(api) db: str | Name of the database the group belongs to. |
pub(api) index: i64 | Index of the shard in its database and the number of shards of the database. |
pub(api) count: i64 | Number of shards of the database. |
pub(api) leader: str | The node believed to lead the group ("" when unknown) and the nodes holding replicas. |
pub(api) replicas: List<str> | Names of the nodes holding replicas. |
pub(api) moving: bool | A replica is being moved. |
Определено в: std/core/node.oxl:745