Documentation ¶
Index ¶
- func ExperimentName(application *v1alpha1.Application) string
- func FilterByExperimentName(app *v1alpha1.Application, name string) error
- func FilterObjectives(app *v1alpha1.Application, objectives []string) error
- func FilterScenarios(app *v1alpha1.Application, scenario string) error
- func LoadResources(app *v1alpha1.Application, fs filesys.FileSystem) (resmap.ResMap, error)
- type AmbiguousNameError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExperimentName ¶
func ExperimentName(application *v1alpha1.Application) string
ExperimentName returns the name of an experiment corresponding to the application state. Before passing an application, be sure to filter scenarios and objectives.
func FilterByExperimentName ¶
func FilterByExperimentName(app *v1alpha1.Application, name string) error
FilterByExperimentName filters the scenarios and objectives based on an experiment name. This can fail with an "ambiguous name" error if the combination of scenario and objective results in multiple possible combinations for the given experiment name. For example, if application name is "a", there are scenarios named "s" and "s-s" and objectives named "s-o" and "o" then the experiment name "a-s-s-o" could be "s" and "s-o" OR "s-s" and "o". Callers should have a back up plan for invoking `Filter*` methods independently.
func FilterObjectives ¶
func FilterObjectives(app *v1alpha1.Application, objectives []string) error
FilterObjectives retains and re-orders the named scenarios on the supplied application. Removing unused objectives may be useful for some types of application operations. If the requested objectives cannot be found, an error is returned.
func FilterScenarios ¶
func FilterScenarios(app *v1alpha1.Application, scenario string) error
FilterScenarios retains only the named scenario on the supplied application. Removing unused scenarios may be useful for some types of application operations. If the requested scenario cannot be found, an error is returned.
func LoadResources ¶
func LoadResources(app *v1alpha1.Application, fs filesys.FileSystem) (resmap.ResMap, error)
LoadResources loads all of the resources for an application, using the supplied file system to load file based resources (if necessary).
Types ¶
type AmbiguousNameError ¶
type AmbiguousNameError struct {
Name string
}
AmbiguousNameError is returned from `FilterByExperimentName` when an experiment name maps back to multiple combinations of scenario and objective names.
func (*AmbiguousNameError) Error ¶
func (e *AmbiguousNameError) Error() string
Error returns a description of the ambiguous name error.