Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateRecord ¶
Types ¶
type MemoryLedger ¶
type MemoryLedger struct {
// contains filtered or unexported fields
}
MemoryLedger is a minimal in-memory recorder for tests and off-by-default use.
func NewMemoryLedger ¶
func NewMemoryLedger(opts Options) *MemoryLedger
func (*MemoryLedger) ListByAttempt ¶
func (*MemoryLedger) ListByRequest ¶
type Record ¶
type Record struct {
RequestID string
AttemptID string
Backend string
Model string
Plane lipapi.UsagePlane
InputTokens int
OutputTokens int
CacheReadTokens int
CacheWriteTokens int
ReasoningTokens int
TotalTokens int
Metadata lipapi.UsageAccountingMetadata
CreatedAt time.Time
FailureReason string
}
Record is the core-owned billing ledger fact for one request attempt and usage plane.
type ValidationError ¶
ValidationError reports a field-specific invalid ledger record.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.