reader

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package reader provides abstract result reading interfaces for Arena.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultFilter

type ResultFilter struct {
	Scenarios []string   `json:"scenarios,omitempty"`
	Providers []string   `json:"providers,omitempty"`
	Regions   []string   `json:"regions,omitempty"`
	Status    []string   `json:"status,omitempty"` // "success", "failed"
	StartDate *time.Time `json:"start_date,omitempty"`
	EndDate   *time.Time `json:"end_date,omitempty"`
}

ResultFilter defines filtering criteria for results

type ResultMetadata

type ResultMetadata struct {
	RunID     string        `json:"run_id"`
	Scenario  string        `json:"scenario"`
	Provider  string        `json:"provider"`
	Region    string        `json:"region"`
	StartTime time.Time     `json:"start_time"`
	Duration  time.Duration `json:"duration"`
	Status    string        `json:"status"` // "success", "failed"
	Error     string        `json:"error,omitempty"`
	Cost      float64       `json:"cost"`
	Location  string        `json:"location"` // Source-specific location (file path, DB ID, etc.)
}

ResultMetadata contains summary information about a result (used for displaying in file browser without loading full result)

func (*ResultMetadata) MatchesFilter

func (m *ResultMetadata) MatchesFilter(filter *ResultFilter) bool

MatchesFilter checks if metadata matches the given filter

type ResultReader

type ResultReader interface {
	// ListResults returns metadata about available results (for browsing)
	ListResults() ([]ResultMetadata, error)

	// LoadResult loads a single result by ID
	LoadResult(runID string) (*statestore.RunResult, error)

	// LoadResults loads multiple results by IDs
	LoadResults(runIDs []string) ([]*statestore.RunResult, error)

	// LoadAllResults loads all available results
	LoadAllResults() ([]*statestore.RunResult, error)

	// SupportsFiltering returns true if the reader can filter on the server side
	SupportsFiltering() bool

	// FilterResults returns filtered result metadata (if supported)
	FilterResults(filter *ResultFilter) ([]ResultMetadata, error)
}

ResultReader provides abstract access to test result retrieval from various sources (filesystem, database, API, etc.)

Directories

Path Synopsis
Package filesystem provides filesystem-based result reading for Arena.
Package filesystem provides filesystem-based result reading for Arena.

Jump to

Keyboard shortcuts

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