Documentation ¶
Index ¶
- func ExperimentName(app *redskyappsv1alpha1.Application, scenario, objective string) string
- func GetObjective(app *redskyappsv1alpha1.Application, objective string) (*redskyappsv1alpha1.Objective, error)
- func GetScenario(app *redskyappsv1alpha1.Application, scenario string) (*redskyappsv1alpha1.Scenario, error)
- func GuessScenarioAndObjective(app *redskyappsv1alpha1.Application, experimentName string) (scenario, objective string)
- func WorkingDirectory(app *redskyappsv1alpha1.Application) string
- type DocumentationFilter
- type Generator
- func (g *Generator) Execute(output kio.Writer) error
- func (g *Generator) Map(node *yaml.RNode, meta yaml.ResourceMeta) ([]interface{}, error)
- func (g *Generator) Select(nodes []*yaml.RNode) ([]*yaml.RNode, error)
- func (g *Generator) Transform(_ []*yaml.RNode, selected []interface{}) ([]*yaml.RNode, error)
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.
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.