WeaviateEx.Cluster.ShardingState (WeaviateEx v0.7.4)
View SourceRepresents the sharding state of a collection.
Contains information about which shards exist and their replica nodes.
Examples
%ShardingState{
collection: "Article",
shards: [
%ShardReplicas{name: "shard-0", replicas: ["node-0", "node-1"]},
%ShardReplicas{name: "shard-1", replicas: ["node-1", "node-2"]}
]
}
Summary
Functions
Parse sharding state from API response.
Types
@type t() :: %WeaviateEx.Cluster.ShardingState{ collection: String.t(), shards: [WeaviateEx.Cluster.ShardingState.ShardReplicas.t()] }
Functions
Parse sharding state from API response.
Examples
iex> ShardingState.from_api(%{
...> "shardingState" => %{
...> "collection" => "Article",
...> "shards" => [%{"shard" => "shard-0", "replicas" => ["node-0"]}]
...> }
...> })
%ShardingState{collection: "Article", shards: [%ShardReplicas{name: "shard-0", replicas: ["node-0"]}]}