execution

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package execution implements the `execution` commands on experiment runs.

Index

Constants

This section is empty.

Variables

View Source
var States = []string{"CREATED", "PREPARED", "RUNNING", "FAILED", "CANCELED", "COMPLETED", "ERRORED"}

States are the ones the platform filters by; REQUESTED is a run not yet created, which the search does not know.

Functions

func AddProperty

func AddProperty(ctx context.Context, c *platform.Client, o PropertyOptions) error

func Cancel

func Cancel(ctx context.Context, c *platform.Client, id int64) error

Cancel asks the platform to stop a run. A 202 means it is being stopped, a 200 that there was nothing left to cancel.

func Download

func Download(ctx context.Context, c *platform.Client, o DownloadOptions) error

Download writes every selected artifact to <directory>/<target execution>/<artifact>: two targets of one step usually produce files of the same name.

func Fetch

func Fetch(ctx context.Context, c *platform.Client, id int64) (*output.Document, error)

Fetch gets a run with its steps. The platform leaves the steps out unless asked, and with them every target execution and artifact.

func Get

func Latest

func Latest(ctx context.Context, c *platform.Client, key string) (int64, error)

Latest is the most recent run of an experiment.

func List added in v6.1.0

List searches the runs of all experiments. With FailOnMatch it lets a pipeline stop when any run matches, such as a failed one of its team since the last deployment.

func ListArtifacts

func ListArtifacts(ctx context.Context, c *platform.Client, id int64, explicitType string) error

func SetProperty

func SetProperty(ctx context.Context, c *platform.Client, o PropertyOptions) error

func Watch

func Watch(ctx context.Context, c *platform.Client, o WatchOptions) error

Watch shows a run as it progresses, until it ends: redrawn in place on a terminal, as a line per change otherwise. It only watches; stopping it leaves the run alone.

Types

type Artifact

type Artifact struct {
	Step              string `json:"step"`
	Target            string `json:"target"`
	TargetExecutionID string `json:"targetExecutionId"`
	ArtifactID        string `json:"artifactId"`
}

func Collect

func Collect(run *jsyaml.Map) []Artifact

Collect gathers artifacts from the target executions of action steps, and of the actions a service validation step runs; the platform offers no listing of its own.

type DownloadOptions

type DownloadOptions struct {
	ID                                   int64
	Artifact, TargetExecution, Directory string
	Output                               string
}

type GetOptions

type GetOptions struct {
	ID         int64
	File, Type string
}

type ListOptions added in v6.1.0

type ListOptions struct {
	Name                                                             string
	Teams, ExcludeTeams, Experiments, Environments, Services, States []string
	// From and To bound when a run was created, the others when it was requested (queued
	// to start) and when it ended.
	From, To                   string
	RequestedFrom, RequestedTo string
	EndedFrom, EndedTo         string
	Limit                      int
	FailOnMatch                bool
	Type                       string
}

type PropertyOptions

type PropertyOptions struct {
	ID     int64
	Key    string
	Values []string
	JSON   bool
}

type WatchOptions

type WatchOptions struct {
	ID       int64
	Key      string
	Interval time.Duration
}

Jump to

Keyboard shortcuts

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