Documentation
¶
Index ¶
- func Enabled() bool
- func Enqueue(payload []byte)
- func EnqueueUsage(payload []byte, requestedAt time.Time)
- func FlushUsage(ctx context.Context)
- func PopOldest(count int) [][]byte
- func PrunePersistentUsage()
- func SetEnabled(value bool)
- func SetRetentionSeconds(value int)
- func SetUsageStatisticsEnabled(enabled bool)
- func SetUsageStore(store UsageStore)
- func SubscribeUsage() (<-chan []byte, func())
- func UsageStatisticsEnabled() bool
- type UsageStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnqueueUsage ¶ added in v0.0.7
func FlushUsage ¶ added in v0.0.47
FlushUsage forces any buffered usage rows to the durable store. Called on service shutdown so the loss window does not stretch past process exit.
func PrunePersistentUsage ¶ added in v0.0.7
func PrunePersistentUsage()
func SetEnabled ¶
func SetEnabled(value bool)
func SetRetentionSeconds ¶
func SetRetentionSeconds(value int)
func SetUsageStatisticsEnabled ¶
func SetUsageStatisticsEnabled(enabled bool)
SetUsageStatisticsEnabled toggles whether usage records are enqueued into the redisqueue payload buffer. This is controlled by the config field `usage-statistics-enabled` and the corresponding management API.
func SetUsageStore ¶ added in v0.0.7
func SetUsageStore(store UsageStore)
func SubscribeUsage ¶
func SubscribeUsage() (<-chan []byte, func())
func UsageStatisticsEnabled ¶
func UsageStatisticsEnabled() bool
UsageStatisticsEnabled reports whether the usage queue plugin should publish records.