Documentation
¶
Overview ¶
Package comparisons coordinates fair same-model, multi-channel evaluations.
Index ¶
- Constants
- Variables
- type ChannelResult
- type Clock
- type Dependencies
- type ExecutionRepository
- type History
- type HistoryPage
- type HistoryRepository
- type MetaFactory
- type PreparationDependencies
- type PreparationRepository
- type PreparedComparison
- type Preparer
- type Refresher
- type RefresherDependencies
- type Repository
- type RunReader
- type Runner
- type Service
- type Snapshot
- type StartCommand
- type Summary
- type TargetPreparer
Constants ¶
View Source
const CurrentSnapshotSchemaVersion = 1
Variables ¶
View Source
var ( ErrInvalid = errors.New("comparisons: invalid input") ErrNotReady = errors.New("comparisons: selected channels are not comparable") ErrTargetUnmapped = errors.New("comparisons: model is not mapped to a selected channel") ErrChannelNotReady = errors.New("comparisons: a selected channel is not ready") )
Functions ¶
This section is empty.
Types ¶
type ChannelResult ¶
type ChannelResult struct {
ChannelID string `json:"channel_id"`
ChannelName string `json:"channel_name"`
RunID string `json:"run_id"`
RunStatus domain.RunStatus `json:"run_status"`
ReportReady bool `json:"report_ready"`
Passed bool `json:"passed"`
Verdict string `json:"verdict"`
Metrics map[string]domain.MetricValue `json:"metrics"`
}
type Dependencies ¶
type Dependencies struct {
Repository Repository
Runner Runner
Clock Clock
MetaFactory MetaFactory
}
type ExecutionRepository ¶
type History ¶
type History struct {
// contains filtered or unexported fields
}
func NewHistory ¶
func NewHistory(repository HistoryRepository, refresher *Refresher) *History
func (*History) ComparisonHistory ¶
type HistoryPage ¶
type HistoryRepository ¶
type MetaFactory ¶
type MetaFactory func(time.Time) (domain.EntityMeta, error)
type PreparationDependencies ¶
type PreparationDependencies struct {
Repository PreparationRepository
Targets TargetPreparer
Clock Clock
MetaFactory MetaFactory
}
type PreparationRepository ¶
type PreparationRepository interface {
GetPlan(context.Context, string) (domain.Plan, error)
ResolvePlanTargetSelection(
context.Context,
domain.Plan,
string,
string,
) (domain.Model, domain.Channel, domain.ChannelModel, error)
}
PreparationRepository reads catalog definitions without creating execution facts.
type PreparedComparison ¶
type PreparedComparison struct {
Meta domain.EntityMeta `json:"meta"`
Plan domain.EntityRevisionRef `json:"plan"`
Model domain.EntityRevisionRef `json:"model"`
Runs []runs.PreparedRun `json:"runs"`
}
PreparedComparison freezes the whole group before any child is accepted.
func (PreparedComparison) Comparison ¶
func (prepared PreparedComparison) Comparison() (domain.Comparison, error)
type Preparer ¶
type Preparer struct {
// contains filtered or unexported fields
}
func NewPreparer ¶
func NewPreparer(dependencies PreparationDependencies) (*Preparer, error)
func (*Preparer) Build ¶
func (preparer *Preparer) Build( ctx context.Context, command StartCommand, ) (PreparedComparison, map[string]*credentials.Lease, error)
type Refresher ¶
type Refresher struct {
// contains filtered or unexported fields
}
Refresher advances a complete group's state from execution facts alone. Both the node owner and desktop queries use this single aggregation rule. Mirrors return the node's committed state, including between journal pages.
func NewRefresher ¶
func NewRefresher(dependencies RefresherDependencies) (*Refresher, error)
type RefresherDependencies ¶
type RefresherDependencies struct {
Repository ExecutionRepository
Runs RunReader
Clock Clock
}
type Repository ¶
type Repository interface {
PreparationRepository
ExecutionRepository
CreateComparison(context.Context, domain.Comparison) error
}
type StartCommand ¶
type TargetPreparer ¶
type TargetPreparer interface {
BuildTarget(context.Context, runs.StartCommand) (runs.PreparedRun, *credentials.Lease, error)
}
Click to show internal directories.
Click to hide internal directories.