Documentation ¶
Overview ¶
Package rundex provides access to metadata about runs and attempts.
Index ¶
- func DoQuery[T any](ctx context.Context, q firestore.Query, fn func(*firestore.DocumentSnapshot) T, ...) <-chan error
- type FetchRebuildOpts
- type FetchRebuildRequest
- type FetchRunsOpts
- type FirestoreClient
- type LocalClient
- func (f *LocalClient) FetchRebuilds(ctx context.Context, req *FetchRebuildRequest) (map[string]Rebuild, error)
- func (f *LocalClient) FetchRuns(ctx context.Context, opts FetchRunsOpts) ([]Run, error)
- func (f *LocalClient) WriteRebuild(ctx context.Context, r Rebuild) error
- func (f *LocalClient) WriteRun(ctx context.Context, r Run) error
- type Reader
- type Rebuild
- type Run
- type VerdictGroup
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FetchRebuildOpts ¶
type FetchRebuildRequest ¶
type FetchRebuildRequest struct { Bench *benchmark.PackageSet Executors []string Runs []string Opts FetchRebuildOpts }
FetchRebuildRequest describes which Rebuild results you would like to fetch from firestore.
type FetchRunsOpts ¶
FetchRunsOpts describes which Runs you would like to fetch from firestore.
type FirestoreClient ¶
FirestoreClient is a wrapper around the external firestore client.
func NewFirestore ¶
func NewFirestore(ctx context.Context, project string) (*FirestoreClient, error)
NewFirestore creates a new FirestoreClient.
func (*FirestoreClient) FetchRebuilds ¶
func (f *FirestoreClient) FetchRebuilds(ctx context.Context, req *FetchRebuildRequest) (map[string]Rebuild, error)
FetchRebuilds fetches the Rebuild objects out of firestore.
func (*FirestoreClient) FetchRuns ¶
func (f *FirestoreClient) FetchRuns(ctx context.Context, opts FetchRunsOpts) ([]Run, error)
FetchRuns fetches Runs out of firestore.
type LocalClient ¶
type LocalClient struct {
// contains filtered or unexported fields
}
LocalClient reads rebuilds from the local filesystem.
func NewLocalClient ¶
func NewLocalClient(fs billy.Filesystem) *LocalClient
func (*LocalClient) FetchRebuilds ¶
func (f *LocalClient) FetchRebuilds(ctx context.Context, req *FetchRebuildRequest) (map[string]Rebuild, error)
FetchRebuilds fetches the Rebuild objects out of firestore.
func (*LocalClient) FetchRuns ¶
func (f *LocalClient) FetchRuns(ctx context.Context, opts FetchRunsOpts) ([]Run, error)
FetchRuns fetches Runs out of firestore.
func (*LocalClient) WriteRebuild ¶
func (f *LocalClient) WriteRebuild(ctx context.Context, r Rebuild) error
type Rebuild ¶
type Rebuild struct { schema.RebuildAttempt Created time.Time }
Rebuild represents the result of a specific rebuild.
func NewRebuildFromFirestore ¶
func NewRebuildFromFirestore(doc *firestore.DocumentSnapshot) Rebuild
NewRebuildFromFirestore creates a Rebuild instance from a "attempt" collection document.
type Run ¶
Run represents a group of one or more rebuild executions.
func NewRunFromFirestore ¶
func NewRunFromFirestore(doc *firestore.DocumentSnapshot) Run
NewRunFromFirestore creates a Run instance from a "runs" collection document.
type VerdictGroup ¶
VerdictGroup is a collection of Rebuild objects, grouped by the same Message.
func GroupRebuilds ¶
func GroupRebuilds(rebuilds map[string]Rebuild) (byCount []*VerdictGroup)
GroupRebuilds will create VerdictGroup objects, grouping rebuilds by Message.