Skip to main content

Class: InMemorySpendStore

Defined in: packages/orchestration/src/cost/spend-store.ts:34

Implements​

Constructors​

Constructor​

new InMemorySpendStore(): InMemorySpendStore

Returns​

InMemorySpendStore

Methods​

agentSpend()​

agentSpend(agentName): Promise<number>

Defined in: packages/orchestration/src/cost/spend-store.ts:47

An agent's lifetime spend. Read only for an agent with a budgetTotal; keep it a bounded read (a running total, not a sum over every run ever recorded) — PostgresSpendStore keeps one row per agent.

Parameters​

agentName​

string

Returns​

Promise<number>

Implementation of​

SpendStore.agentSpend


recordRun()​

recordRun(spend): Promise<void>

Defined in: packages/orchestration/src/cost/spend-store.ts:39

Parameters​

spend​

RunSpend

Returns​

Promise<void>

Implementation of​

SpendStore.recordRun


ticketSpend()​

ticketSpend(ticketId): Promise<number>

Defined in: packages/orchestration/src/cost/spend-store.ts:52

Parameters​

ticketId​

string

Returns​

Promise<number>

Implementation of​

SpendStore.ticketSpend