Typesensory.Api.Operations (Typesensory v0.1.0)
API calls for all endpoints tagged Operations
.
Link to this section Summary
Functions
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.
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.
Link to this section Functions
take_snapshot(connection, snapshot_path, opts \\ [])
@spec take_snapshot(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Typesensory.Model.SuccessStatus.t()} | {:error, Tesla.Env.t()}
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.
parameters
Parameters
connection
(Typesensory.Connection): Connection to serversnapshot_path
(String.t): The directory on the server where the snapshot should be saved.opts
(keyword): Optional parameters
returns
Returns
{:ok, Typesensory.Model.SuccessStatus.t}
on success{:error, Tesla.Env.t}
on failure
vote(connection, opts \\ [])
@spec vote( Tesla.Env.client(), keyword() ) :: {:ok, Typesensory.Model.SuccessStatus.t()} | {:error, Tesla.Env.t()}
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.
parameters
Parameters
connection
(Typesensory.Connection): Connection to serveropts
(keyword): Optional parameters
returns
Returns
{:ok, Typesensory.Model.SuccessStatus.t}
on success{:error, Tesla.Env.t}
on failure