test

package
v0.0.0-...-89c9057 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0, MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUsageEvents

func GenerateUsageEvents(
	ctx context.Context,
	conn driver.Conn,
	logger *zap.SugaredLogger)

func RunAlertsMigrations

func RunAlertsMigrations(ctx context.Context, dsn string) error

func RunAnalyticsMigrations

func RunAnalyticsMigrations(ctx context.Context, dsn string) error

func RunErrorTrackingMigrations

func RunErrorTrackingMigrations(ctx context.Context, dsn string) error

func RunGooseMigrations

func RunGooseMigrations(ctx context.Context, dsn string, migrations []*goose.Migration) error

func RunLoggingMigrations

func RunLoggingMigrations(ctx context.Context, dsn string) error

func RunMetricsMigrations

func RunMetricsMigrations(ctx context.Context, dsn string) error

func RunSnowplowMigrations

func RunSnowplowMigrations(ctx context.Context, dsn string) error

func RunTestingMigrations

func RunTestingMigrations(ctx context.Context, dsn string) error

func RunTracingMigrations

func RunTracingMigrations(ctx context.Context, dsn string) error

Types

type JSONData

type JSONData struct {
	EventType        string  `json:"event_type"` // New field from your example
	InstanceID       string  `json:"instance_id"`
	UniqueInstanceID string  `json:"unique_instance_id"`
	HostName         string  `json:"host_name"`
	FeatureID        *string `json:"feature_id,omitempty"`
	// Specific format: "2024-05-20T14:30:45.123Z"
	ContextGeneratedAt        string          `json:"context_generated_at"`
	DurationSeconds           *float64        `json:"duration_seconds"`
	Realm                     string          `json:"realm"`
	ProjectID                 *int64          `json:"project_id"`
	NamespaceID               int64           `json:"namespace_id"`
	GlobalUserID              string          `json:"global_user_id"`
	UltimateParentNamespaceID int64           `json:"ultimate_parent_namespace_id"`
	Metadata                  MetadataContent `json:"metadata"`
	UnitOfMeasure             *string         `json:"unit_of_measure,omitempty"`
	EventID                   string          `json:"event_id,omitempty"`
}

type LLMOperations

type LLMOperations struct {
	TokenCount       int    `json:"token_count"`
	ModelID          string `json:"model_id"`
	PromptTokens     int    `json:"prompt_tokens"`
	CompletionTokens int    `json:"completion_tokens"`
}

type MetadataContent

type MetadataContent struct {
	WorkflowID           string              `json:"workflow_id"`
	ExecutionEnvironment string              `json:"execution_environment"`
	ResourceConsumption  ResourceConsumption `json:"resource_consumption"`
	LLMOperations        LLMOperations       `json:"llm_operations"`
	CommandsExecuted     int                 `json:"commands_executed"`
}

MetadataContent matches the structure of the "metadata" object in your example.

type ResourceConsumption

type ResourceConsumption struct {
	CPUSeconds        float64 `json:"cpu_seconds"`
	MemoryMBSeconds   float64 `json:"memory_mb_seconds"`
	StorageOperations int     `json:"storage_operations"`
}

Jump to

Keyboard shortcuts

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