LLMProxy.ProviderUsage.Server (llm_proxy v0.2.0)

Copy Markdown View Source

Supervised cache and bounded refresh scheduler for provider usage.

One task refreshes accounts sequentially. A second manual or automatic request cannot start another task while that refresh is active.

Summary

Types

scope()

@type scope() :: :all | {:account, integer()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

refresh_account(id, server \\ __MODULE__)

@spec refresh_account(integer(), GenServer.server()) ::
  {:ok, :started | :already_refreshing}

refresh_all(server \\ __MODULE__)

@spec refresh_all(GenServer.server()) :: {:ok, :started | :already_refreshing}

snapshots(server \\ __MODULE__)

start_link(opts)