View Source Qdrant.Api.Http.Cluster (Qdrant v0.0.8)
Service distributed setup.
Link to this section Summary
Functions
Get information about the current state and composition of the cluster. See more on qdrant
Get cluster information for a collection. See more on qdrant
Tries to recover current peer Raft state. [See more on qdrant](https://qdrant.github.io/qdrant/redoc/index.html#tag/cluster/operation/recover_current_peer
Remove peer from the cluster by its id. See more on qdrant Tries to remove peer from the cluster. Will return an error if peer has shards on it.
Update collection cluster setup. See more on qdrant
Link to this section Types
@type abort_transfer() :: %{abort_transfer: shard_params()}
@type drop_replica() :: %{shard_id: non_neg_integer(), peer_id: non_neg_integer()}
@type move_shard() :: %{move_shard: shard_params()}
@type replicate_shard() :: %{replicate_shard: shard_params()}
@type shard_operations() :: move_shard() | replicate_shard() | abort_transfer() | drop_replica()
@type shard_params() :: %{ shard_id: non_neg_integer(), to_peer_id: non_neg_integer(), from_peer_id: non_neg_integer() }
Link to this section Functions
@spec cluster_status() :: {:ok, Tesla.Env.t()} | {:error, any()}
Get information about the current state and composition of the cluster. See more on qdrant
example
Example
iex> Qdrant.Api.Http.Cluster.cluster_status()
{:ok, %Tesla.Env{status: 200,
body: %{
"result" => %{
"status" => "disabled",
},
"status" => "ok",
"time" => 0
}
}
}
@spec collection_cluster_info(String.t()) :: {:ok, Tesla.Env.t()} | {:error, any()}
Get cluster information for a collection. See more on qdrant
parameters
Parameters
collection_name
required -string
collection name
@spec recover_current_peer() :: {:ok, Tesla.Env.t()} | {:error, any()}
Tries to recover current peer Raft state. [See more on qdrant](https://qdrant.github.io/qdrant/redoc/index.html#tag/cluster/operation/recover_current_peer
example
Example
iex> Qdrant.Api.Http.Cluster.recover_current_peer()
{:ok, %Tesla.Env{status: 200,
body: %{
"result" => true,
"status" => "ok",
"time" => 0
}
}
}
@spec remove_peer(String.t()) :: {:ok, Tesla.Env.t()} | {:error, any()}
Remove peer from the cluster by its id. See more on qdrant Tries to remove peer from the cluster. Will return an error if peer has shards on it.
parameters
Parameters
peer_id
required -integer
peer id
example
Example
iex> Qdrant.Api.Http.Cluster.remove_peer(42)
{:ok, %Tesla.Env{status: 200,
body: %{
"result" => true,
"status" => "ok",
"time" => 0
}
}
}
@spec update_collection_cluster(String.t(), shard_operations()) :: {:ok, Tesla.Env.t()} | {:error, any()}
Update collection cluster setup. See more on qdrant
parameters
Parameters
collection_name
required -string
collection name
query-parameters
Query Parameters
timeout
- Wait for operation commit timeout in seconds. If timeout is reached - request will return with service error.