(store *Store)
| 17 | } |
| 18 | |
| 19 | func NewUsageTracker(store *Store) *LiveUsageTracker { |
| 20 | return &LiveUsageTracker{store: store} |
| 21 | } |
| 22 | |
| 23 | func (t *LiveUsageTracker) RecordAndCheck(ctx context.Context, userID, agentID, domain, direction string) (bool, error) { |
| 24 | // Metering gate: resolve the account class once and short-circuit |
no outgoing calls