record

package module
v0.0.0-...-c87253e Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Usage

TBD

Development

Install dependencies

On macOS, run:

brew bundle;
make deps;

Build and test

make build test

Documentation

Index

Constants

View Source
const DefaulMaxReports = 100
View Source
const GitSummaryFileName = "git.json"
View Source
const HeaderAPIKey = "X-API-Key"

Variables

This section is empty.

Functions

func Predict

func Predict(l *slog.Logger, env map[string]string, o PredictOptions) error

func Upload

func Upload(l *slog.Logger, osEnv map[string]string, o UploadOptions) error

Types

type BundleOptions

type BundleOptions struct {
	InitialRun bool

	ReportsDir string
	MaxReports int
}

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector(l *slog.Logger, repo string, osEnv map[string]string) (*Collector, error)

func (*Collector) Bundle

func (c *Collector) Bundle(o BundleOptions, w io.Writer) error

func (*Collector) Env

func (c *Collector) Env() RunEnv

type GitSummary

type GitSummary struct {
	DiffStat    *git.DiffStat    `json:"diffStat"`
	CommitFiles []git.CommitFile `json:"commitFiles"`
}

type PredictOptions

type PredictOptions struct {
	Repo string

	WorkDir string

	Runner string

	Debug bool

	Stdin  io.Reader
	Stdout io.Writer
	// contains filtered or unexported fields
}

type RunEnv

type RunEnv struct {
	ActorName      string
	CIProviderName client.CIProviderName
	GitRef         string
	GitRefName     string
	GitRepo        string
	GitSha         string
	Group          string
	RunAttempt     int
	RunId          int
	RunNumber      int
	CIEnv          *map[string]interface{}
}

func (RunEnv) RunRequest

func (env RunEnv) RunRequest() client.CIRunRequest

type UploadOptions

type UploadOptions struct {
	// Repo is the path to the git repository directory.
	Repo string

	// Reports is the path to the JUnit reports directory.
	Reports string

	// Started is the start time of the run. If nil, `NOW()` is returned from
	// the API.
	Started *time.Time

	// MaxReports is the maximum number of reports that can be found in the
	// reports directory. If it exceeds the threshold, an error is returned.
	//
	// If omitted (or zero), DefaulMaxReports is used.
	MaxReports int

	// Debug enables verbose log messages. By default (false), only messages
	// with level info are visible.
	Debug bool

	// Client is the used HTTP client for all API requests.
	Client *http.Client
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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