runner

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 35 Imported by: 0 modules, 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.

Documentation

Overview

Package runner executes check runners and collects results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KillRunning added in v0.10.0

func KillRunning()

KillRunning kills the process group of every step still running, and of any that starts afterwards, for use when Maslow is interrupted.

func ProfileChecks added in v0.10.0

func ProfileChecks(mas *spec.MAS, profileName string) ([]spec.CheckRunner, error)

ProfileChecks returns the spec's checks that the profile selects, in spec order.

func RefPath added in v0.10.0

func RefPath(ref spec.Ref) string

refPath returns the best path/identifier for a ref. RefPath names a ref the way its result does in the evidence.

func RunBudgets

func RunBudgets(budgets []spec.Budget) []evidence.BudgetResult

RunBudgets evaluates all budget constraints and returns results.

func RunChecks

func RunChecks(checks []spec.CheckRunner) []evidence.CheckResult

RunChecks executes the given check runners and returns results.

func RunContracts

func RunContracts(contracts []spec.Contract) []evidence.ContractResult

RunContracts executes all contract scenarios and returns results.

func RunContractsWith added in v0.7.0

func RunContractsWith(contracts []spec.Contract, opts ContractOptions) []evidence.ContractResult

RunContractsWith executes all contract scenarios under opts.

func RunPolicy

func RunPolicy(policy *spec.Policy, scope PolicyScope) []evidence.PolicyResult

RunPolicy evaluates policy rules and returns results.

func RunProfileChecks

func RunProfileChecks(mas *spec.MAS, profileName string) ([]evidence.CheckResult, error)

RunProfileChecks executes only the checks matching the given profile.

func RunRefs

func RunRefs(refs []spec.Ref) []evidence.RefResult

RunRefs verifies all declared refs and returns results.

func SelectBudgets

func SelectBudgets(budgets []spec.Budget, selectedBy string, selectors []string) ([]spec.Budget, error)

SelectBudgets returns the budgets a profile selects by name or tag. A nil selector selects every budget.

func SelectContracts

func SelectContracts(contracts []spec.Contract, selectedBy string, selectors []string) ([]spec.Contract, error)

SelectContracts returns the contracts selected by name or tag; selectedBy names the spec location doing the selecting, for errors. A nil selector selects every contract.

Types

type ContractOptions added in v0.7.0

type ContractOptions struct {
	// BaseURL, when set, replaces every contract's base_url, so the same
	// scenarios can run against a deployed service.
	BaseURL string
	// Dir, when set, is where CLI steps run, so the same scenarios can run
	// against another checkout such as the base commit.
	Dir string
	// contains filtered or unexported fields
}

ContractOptions changes where contracts run.

type PolicyScope

type PolicyScope struct {
	Dir     string
	BaseSHA string
	// SpecPath and SpecFromBase report a spec edited on this branch when the
	// run verified against the base commit's spec.
	SpecPath     string
	SpecFromBase bool
	// SpecAddedOnBranch reports that the base had no spec, so the branch's
	// own spec was verified and a person must accept it.
	SpecAddedOnBranch bool
}

PolicyScope says which repository policy is judged in and against what. With an empty BaseSHA only uncommitted changes count as changes.

Jump to

Keyboard shortcuts

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