Documentation
¶
Overview ¶
Package action contains the logic for each action that Iter8 can perform.
This is a library for calling top-level Iter8 actions like 'launch', 'assert', or 'report'. Actions approximately match the command line invocations that the Iter8 CLI uses.
Index ¶
Constants ¶
const (
// Completed states that the experiment is complete
Completed = "completed"
// NoFailure states that none of the tasks in the experiment have failed
NoFailure = "nofailure"
// SLOs states that all app versions participating in the experiment satisfy SLOs
SLOs = "slos"
)
const (
// TextOutputFormat is the output format used to create text output
TextOutputFormatKey = "text"
// HTMLOutputFormat is the output format used to create html output
HTMLOutputFormatKey = "html"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultGitFolder ¶ added in v0.10.0
func DefaultGitFolder() string
Types ¶
type AssertOpts ¶
type AssertOpts struct {
// Timeout is the duration to wait for conditions to be satisfied
Timeout time.Duration
// Conditions are checked by assert
Conditions []string
// RunOpts provides options relating to experiment resources
RunOpts
}
AssertOpts are the options used for asserting experiment results
func NewAssertOpts ¶
func NewAssertOpts(kd *driver.KubeDriver) *AssertOpts
NewAssertOpts initializes and returns assert opts
func (*AssertOpts) KubeRun ¶
func (aOpts *AssertOpts) KubeRun() (bool, error)
LocalRun asserts conditions for a Kubernetes experiment
type DeleteOpts ¶ added in v0.10.0
type DeleteOpts struct {
// KubeDriver enables access to Kubernetes cluster
*driver.KubeDriver
}
DeleteOpts are the options used for deleting experiment groups
func NewDeleteOpts ¶ added in v0.10.0
func NewDeleteOpts(kd *driver.KubeDriver) *DeleteOpts
NewDeleteOpts initializes and returns launch opts
type GenOpts ¶
type GenOpts struct {
// Options provides the values to be combined with the experiment chart
values.Options
// ChartsParentDir is the directory where `charts` directory is located
ChartsParentDir string
// GenDir is the directory where the chart templates are rendered
GenDir string
// ChartName is the name of the chart
ChartName string
}
GenOpts are the options used for generating experiment.yaml
type HubOpts ¶
type HubOpts struct {
// GitFolder is the full path to the GitHub Iter8 experiment charts folder
GitFolder string
// ChartsDir is the full path to the `charts` dir
ChartsDir string
}
HubOpts are the options used for downloading Iter8 experiment charts
type LaunchOpts ¶
type LaunchOpts struct {
// DryRun enables simulating a launch
DryRun bool
// GitFolder is the full path to the GitHub Iter8 experiment charts folder
GitFolder string
// ChartsParentDir is the directory where `charts` is to be downloaded or is located
ChartsParentDir string
// NoDownload disables charts download.
// With this option turned on, `charts` that are already present locally are reused
NoDownload bool
// ChartName is the name of the chart
ChartName string
// Options provides the values to be combined with the experiment chart
values.Options
// Rundir is the directory where experiment.yaml file is located
RunDir string
// KubeDriver enables Kubernetes experiment run
*driver.KubeDriver
}
LaunchOpts are the options used for launching experiments
func NewLaunchOpts ¶
func NewLaunchOpts(kd *driver.KubeDriver) *LaunchOpts
NewHubOpts initializes and returns launch opts
type LogOpts ¶
type LogOpts struct {
// KubeDriver enables interaction with Kubernetes cluster
*driver.KubeDriver
}
LogOpts enables fetching logs from Kubernetes
func NewLogOpts ¶
func NewLogOpts(kd *driver.KubeDriver) *LogOpts
NewHubOpts initializes and returns log opts
type ReportOpts ¶
type ReportOpts struct {
// OutputFormat specifies the output format to be used by report
OutputFormat string
// RunOpts enables fetching local experiment spec and result
RunOpts
// KubeDriver enables fetching Kubernetes experiment spec and result
*driver.KubeDriver
}
ReportOpts are the options used for generating reports from experiment result
func NewReportOpts ¶
func NewReportOpts(kd *driver.KubeDriver) *ReportOpts
NewReportOpts initializes and returns report opts
func (*ReportOpts) KubeRun ¶
func (rOpts *ReportOpts) KubeRun(out io.Writer) error
KubeRun generates report for a Kubernetes experiment
type RunOpts ¶
type RunOpts struct {
// Rundir is the directory of the local experiment.yaml file
RunDir string
// KubeDriver enables Kubernetes experiment run
*driver.KubeDriver
}
RunOpts are the options used for running an experiment
func NewRunOpts ¶
func NewRunOpts(kd *driver.KubeDriver) *RunOpts
NewRunOpts initializes and returns run opts