Candil.Engine.Server (Candil v1.0.0)

Copy Markdown View Source

GenServer that manages a single llama-server OS process.

Each running model occupies one Server process. The server is registered in Candil.Registry under the model alias so callers can look it up by name.

The OS process is started with Port.open/2 and monitored. If the process dies unexpectedly the GenServer terminates, which causes the Registry entry to be removed automatically.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

state()

@type state() :: %{
  engine: Candil.Engine.t(),
  model: Candil.Model.t(),
  port: port(),
  base_url: binary(),
  healthy: boolean(),
  startup_timer: reference() | nil
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.