ledger

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ledger provides anonymous usage tracking for foundryctl commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool
	Segment Segment
}

Config holds ledger configuration.

func NewConfig

func NewConfig() Config

NewConfig returns the default ledger configuration. The Segment write key is populated from the ldflags-injected value.

func (Config) Provider

func (c Config) Provider() string

Provider returns the provider name based on the configuration.

type Ledger

type Ledger interface {
	// Track records a single foundryctl event with the given properties.
	Track(ctx context.Context, event domain.Event, properties domain.Properties)

	// Close flushes any pending events and releases resources.
	Close() error
}

Ledger is the interface for tracking CLI usage events.

type Segment

type Segment struct {
	Key string
}

Segment holds Segment-specific configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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