View Source OpenApiTypesense.Operations (OpenApiTypesense v0.2.0)

Provides API endpoints related to operations

Summary

Functions

Get stats about API endpoints.

Get current RAM, CPU, Disk & Network usage metrics.

Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory.

Triggers a follower node to initiate the raft voting process, which triggers leader re-election.

Functions

retrieve_api_stats(opts \\ [])

@spec retrieve_api_stats(keyword()) ::
  {:ok, OpenApiTypesense.APIStatsResponse.t()} | :error

Get stats about API endpoints.

Retrieve the stats about API endpoints.

retrieve_api_stats(conn, opts)

@spec retrieve_api_stats(
  OpenApiTypesense.Connection.t(),
  keyword()
) :: {:ok, OpenApiTypesense.APIStatsResponse.t()} | :error

retrieve_metrics(opts \\ [])

Get current RAM, CPU, Disk & Network usage metrics.

Retrieve the metrics.

retrieve_metrics(conn, opts)

@spec retrieve_metrics(
  OpenApiTypesense.Connection.t(),
  keyword()
) :: {:ok, map()} | :error
@spec retrieve_metrics(
  OpenApiTypesense.Connection.t(),
  keyword()
) :: {:ok, map()} | :error

take_snapshot(conn \\ Connection.new(), opts)

@spec take_snapshot(
  OpenApiTypesense.Connection.t(),
  keyword()
) :: {:ok, OpenApiTypesense.SuccessStatus.t()} | :error

Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory.

Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory. You can then backup the snapshot directory that gets created and later restore it as a data directory, as needed.

Options

  • snapshot_path: The directory on the server where the snapshot should be saved.

vote(opts \\ [])

@spec vote(keyword()) :: {:ok, OpenApiTypesense.SuccessStatus.t()} | :error

Triggers a follower node to initiate the raft voting process, which triggers leader re-election.

Triggers a follower node to initiate the raft voting process, which triggers leader re-election. The follower node that you run this operation against will become the new leader, once this command succeeds.

vote(conn, opts)