The cyborg::Client class manages storage configurations and acts as a factory for creating or loading encrypted indexes.

Constructor

cyborg::Client(const DBConfig& index_location,
               const DBConfig& config_location,
               const DBConfig& items_location,
               const int cpu_threads,
               const bool gpu_accelerate);

Initializes a new instance of Client.

Parameters

ParameterTypeDescription
index_locationDBConfigConfiguration for index storage location.
config_locationDBConfigConfiguration for index metadata storage.
items_locationDBConfigConfiguration intended to be used in a future release. Pass in a DBConfig with a Location of ‘None’.
cpu_threadsintNumber of CPU threads to use (e.g., 0 to use all available cores).
gpu_accelerateboolWhether to enable GPU acceleration (requires CUDA).

Exceptions

Example Usage

#include "cyborgdb_core/client.hpp"

cyborg::DBConfig index_location(Location::kMemory);
cyborg::DBConfig config_location(Location::kRedis, "index_metadata", "redis://localhost");
cyborg::DBConfig items_location(Location::kNone); // No item storage
int cpu_threads = 4;
bool use_gpu = true;

cyborg::Client client(index_loc, config_loc, items_loc, cpu_threads, use_gpu);