Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishRecord ¶
PublishRecord publishes a record using the default manager.
func RegisterPlugin ¶
func RegisterPlugin(plugin Plugin)
RegisterPlugin registers a plugin on the default manager.
func StartDefault ¶
StartDefault starts the default manager's dispatcher.
Types ¶
type Detail ¶
type Detail struct {
InputTokens int64
OutputTokens int64
ReasoningTokens int64
CachedTokens int64
TotalTokens int64
}
Detail holds the token usage breakdown.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager maintains a queue of usage records and delivers them to registered plugins.
func DefaultManager ¶
func DefaultManager() *Manager
DefaultManager returns the global usage manager instance.
func NewManager ¶
NewManager constructs a manager with a buffered queue.
func (*Manager) Publish ¶
Publish enqueues a usage record for processing. If no plugin is registered the record will be discarded downstream.
Click to show internal directories.
Click to hide internal directories.