stats

package
v0.0.0-...-fbcb358 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(ctx context.Context) error

Clear deletes previously-computed stats from datastore and memcache.

func Get

func Get(ctx context.Context, live bool) (*common.Stats, error)

Get returns stats that were previously computed by the Update method. If live is true, new stats containing only current entity counts will be returned instead.

func Update

func Update(ctx context.Context) error

Update reads all songs and plays and saves stats to datastore.

This uses projection queries, which are counted as "small" datastore operations and are free in most (all?) regions, but it's still slow and should be called periodically by a cron job instead of interactively.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL