Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeatTracker ¶
type SeatTracker struct {
// contains filtered or unexported fields
}
SeatTracker records current AI seat state for users.
func (*SeatTracker) RecordUsage ¶
func (t *SeatTracker) RecordUsage(ctx context.Context, userID uuid.UUID, reason agplaiseats.Reason)
RecordUsage will record the AI seat usage for the user. There is a race condition between checking if the user should be recorded or throttled and actually recording. This is fine, as it just means we record the usage twice. The throttle just exists to prevent excessive database queries.
Click to show internal directories.
Click to hide internal directories.