View Source Qdrant.Api.Http.Cluster (Qdrant v0.0.3)

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

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.

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
    }
  }
}
Link to this function

collection_cluster_info(collection_name)

View Source
@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_cluster() :: {: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_cluster()
{: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
    }
  }
}