mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
* WIP * Send usage analytics * Improve loggin of cron tasks and fix test * Implement appconfig method now that we are checking that as well * Address review comments
18 lines
424 B
Go
18 lines
424 B
Go
package fleet
|
|
|
|
import "time"
|
|
|
|
type StatisticsPayload struct {
|
|
AnonymousIdentifier string `json:"anonymousIdentifier"`
|
|
FleetVersion string `json:"fleetVersion"`
|
|
NumHostsEnrolled int `json:"numHostsEnrolled"`
|
|
}
|
|
|
|
type StatisticsStore interface {
|
|
ShouldSendStatistics(frequency time.Duration) (StatisticsPayload, bool, error)
|
|
RecordStatisticsSent() error
|
|
}
|
|
|
|
const (
|
|
StatisticsFrequency = time.Hour * 24 * 7
|
|
)
|