application

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExperimentName

func ExperimentName(app *redskyappsv1alpha1.Application, scenario, objective string) string

ExperimentName returns the name of an experiment corresponding to the application.

func GetObjective

func GetObjective(app *redskyappsv1alpha1.Application, objective string) (*redskyappsv1alpha1.Objective, error)

GetObjective returns the goals of an objective, if possible.

func GetScenario

func GetScenario(app *redskyappsv1alpha1.Application, scenario string) (*redskyappsv1alpha1.Scenario, error)

GetScenario returns the named scenario from the application, if possible.

func GuessScenarioAndObjective

func GuessScenarioAndObjective(app *redskyappsv1alpha1.Application, experimentName string) (scenario, objective string)

GuessScenarioAndObjective attempts to match an experiment name back to the scenario and objective names used to generate it.

func WorkingDirectory

func WorkingDirectory(app *redskyappsv1alpha1.Application) string

WorkingDirectory returns the directory the application was loaded from. This directory should be used as the effective working directory when resolving relative paths found in the application definition.

Types

type DocumentationFilter

type DocumentationFilter struct {
	// Flag to completely disable documentation.
	Disabled bool
}

DocumentationFilter looks for Application instances and attempts to annotate them with comments that might help people finish writing their app.yaml.

func (*DocumentationFilter) Filter

func (f *DocumentationFilter) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error)

Filter applies documentation to any applications in the supplied node set.

type Generator

type Generator struct {
	// The name of the application to generate.
	Name string
	// The collection of resources defining the application.
	Resources konjure.Resources
	// File name containing a description of the load to generate.
	ScenarioFile string
	// The list of goal names to include in the application
	Goals []string
	// The filter to provide additional documentation in the generated YAML.
	Documentation DocumentationFilter
	// An explicit working directory used to relativize file paths.
	WorkingDirectory string
	// Configure the filter options.
	scan.FilterOptions
}

Generator is use to generate application definitions.

func (*Generator) Execute

func (g *Generator) Execute(output kio.Writer) error

func (*Generator) Map

func (g *Generator) Map(node *yaml.RNode, meta yaml.ResourceMeta) ([]interface{}, error)

Map scans for useful information to include in the application definition

func (*Generator) Select

func (g *Generator) Select(nodes []*yaml.RNode) ([]*yaml.RNode, error)

Select keeps all of the input resources.

func (*Generator) Transform

func (g *Generator) Transform(_ []*yaml.RNode, selected []interface{}) ([]*yaml.RNode, error)

Transform converts the scan information into an application definition.

Jump to

Keyboard shortcuts

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