WeaviateEx.Embedded (WeaviateEx v0.7.4)

View Source

Manage a local, embedded Weaviate instance by downloading the official binary, mirroring the behaviour of the Python client's connect_to_embedded.

This module downloads the requested Weaviate release (once), keeps it in a cache directory, spawns the binary with sensible defaults, waits for both HTTP and gRPC listeners to become ready, and provides a handle that can be stopped when the caller is done.

Summary

Types

Options that control the embedded instance lifecycle.

Functions

Starts an embedded Weaviate process.

Stops the embedded instance represented by instance.

Types

option()

@type option() ::
  {:version, String.t()}
  | {:hostname, String.t()}
  | {:port, non_neg_integer()}
  | {:grpc_port, non_neg_integer()}
  | {:binary_path, String.t()}
  | {:persistence_data_path, String.t()}
  | {:environment_variables, map()}
  | {:ready_timeout, non_neg_integer()}

Options that control the embedded instance lifecycle.

Functions

start(opts \\ [])

@spec start([option()]) :: {:ok, WeaviateEx.Embedded.Instance.t()} | {:error, term()}

Starts an embedded Weaviate process.

Returns an %Instance{} handle that must be stopped with stop/1 to clean up the spawned OS process.

stop(instance)

@spec stop(WeaviateEx.Embedded.Instance.t()) :: :ok

Stops the embedded instance represented by instance.