Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFlushInterval = 60 * time.Second
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Tracker)
func WithFlushInterval ¶
WithFlushInterval allows configuring the flush interval of Tracker.
func WithLogger ¶
WithLogger sets the logger to be used by Tracker.
type Store ¶
type Store interface {
BatchUpdateWorkspaceLastUsedAt(context.Context, database.BatchUpdateWorkspaceLastUsedAtParams) error
}
Store is a subset of database.Store
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker tracks and de-bounces updates to workspace usage activity. It keeps an internal map of workspace IDs that have been used and periodically flushes this to its configured Store.
Click to show internal directories.
Click to hide internal directories.