stats

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEventFiles

func DeleteEventFiles(filePaths []string) error

DeleteEventFiles deletes the specified event files from the queue

func EnqueueEvent

func EnqueueEvent(event UsageEvent) error

EnqueueEvent writes a usage event to the queue directory

func FlushQueue

func FlushQueue(ctx context.Context, repo vault.Vault) error

FlushQueue loads pending events from queue and sends them to the repository

func GetQueuePath

func GetQueuePath() string

GetQueuePath returns the path to the usage queue directory

Types

type UsageEvent

type UsageEvent struct {
	AssetName    string `json:"asset_name"`
	AssetVersion string `json:"asset_version"`
	AssetType    string `json:"asset_type"`
	Timestamp    string `json:"timestamp"`
}

UsageEvent represents a single asset usage event

func DequeueEvents

func DequeueEvents(limit int) ([]UsageEvent, []string, error)

DequeueEvents reads up to 'limit' events from the queue directory Returns events, file paths, and error

Jump to

Keyboard shortcuts

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