Documentation
¶
Overview ¶
Package usage defines the Usage value object — an immutable accumulator of token counts produced during assistant Events.
Usage is a commutative monoid under Add: it has an identity element (Zero) and an associative, commutative binary operation (Add).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Usage ¶
Usage holds token counts accumulated during a single assistant Event or a sum of many Events. It is an immutable value object; Add never mutates the receiver.
func Zero ¶
func Zero() Usage
Zero returns the identity element of the Usage monoid. Zero.Add(a) == a and a.Add(Zero) == a for any Usage a.
Click to show internal directories.
Click to hide internal directories.