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 ¶
This section is empty.
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 ChartNameAndDestOptions ¶
type ChartNameAndDestOptions struct {
// ChartName is the name of the chart
ChartName string
// DestDir is the directory where it is to be downloaded
DestDir string
}
ChartNameAndDestOptions specifies which chart needs to be downloaded and where
type GenOpts ¶
type GenOpts struct {
// Options provides the values to be combined with the experiment chart
values.Options
// SourceDir is the path to the experiment chart
SourceDir string
}
GenOpts are the options used for generating experiment.yaml
type HubOpts ¶
type HubOpts struct {
// ChartNameAndDestOptions contains ChartName and DestDir options
ChartNameAndDestOptions
// ChartPathOptions contains RepoURL and (chart) Version (constraint) options
action.ChartPathOptions
}
HubOpts are the options used for downloading an experiment chart
type LaunchOpts ¶
type LaunchOpts struct {
// DryRun enables simulating a launch
DryRun bool
// HubOpts contains the options for downloading the chart
HubOpts
// GenOpts contains the options for generating the experiment including values
GenOpts
// RunOpts enables local and Kubernetes runs
RunOpts
}
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