Documentation ¶
Index ¶
- Constants
- func APIApplicationToClusterApplication(app applications.Application, scenario applications.Scenario) (*optimizeappsv1alpha1.Application, error)
- func APITemplateToClusterExperiment(exp *optimizev1beta2.Experiment, template *applications.Template) error
- func ClusterExperimentToAPITemplate(exp *optimizev1beta2.Experiment) (*applications.Template, error)
- func DeleteServerExperiment(exp *optimizev1beta2.Experiment) bool
- func FromCluster(in *optimizev1beta2.Experiment) (experimentsv1alpha1.ExperimentName, *experimentsv1alpha1.Experiment, ...)
- func FromClusterTrial(t *optimizev1beta2.Trial) *experimentsv1alpha1.TrialValues
- func IsServerSyncEnabled(exp *optimizev1beta2.Experiment) bool
- func NewApplicationAPI(ctx context.Context, uaComment string) (applications.API, error)
- func NewExperimentAPI(ctx context.Context, uaComment string) (experimentsv1alpha1.API, error)
- func ToCluster(exp *optimizev1beta2.Experiment, ee *experimentsv1alpha1.Experiment)
- func ToClusterTrial(t *optimizev1beta2.Trial, suggestion *experimentsv1alpha1.TrialAssignments)
Constants ¶
const (
// Finalizer is used to ensure synchronization with the server
Finalizer = "serverFinalizer.stormforge.io"
)
Variables ¶
This section is empty.
Functions ¶
func APIApplicationToClusterApplication ¶
func APIApplicationToClusterApplication(app applications.Application, scenario applications.Scenario) (*optimizeappsv1alpha1.Application, error)
APIApplicationToClusterApplication converts an API (optimize-go) representation of an Application into an in cluster ( api/apps/v1alpha1 ) representation.
func APITemplateToClusterExperiment ¶
func APITemplateToClusterExperiment(exp *optimizev1beta2.Experiment, template *applications.Template) error
APITemplateToClusterExperiment overlays the results of an application template ( parameters, metrics ) on top of an existing experiment.
func ClusterExperimentToAPITemplate ¶
func ClusterExperimentToAPITemplate(exp *optimizev1beta2.Experiment) (*applications.Template, error)
ClusterExperimentToAPITemplate converts an Application into an in cluster ( api/apps/v1alpha1 ) representation into an API (optimize-go) representation.
func DeleteServerExperiment ¶
func DeleteServerExperiment(exp *optimizev1beta2.Experiment) bool
DeleteServerExperiment checks to see if the supplied experiment should be deleted from the server upon completion. Normally, we do not actually want to delete the experiment from the server in order to preserve the data, for example, in a multi-cluster experiment we would require that the experiment still exist for all the other clusters. We also want to ensure results are visible in the UI after the experiment ends in the cluster (deleting the server experiments means it won't be available to the UI anymore. We also would not want a `reset` (which deletes the CRD) to wipe out all the data on the server.
func FromCluster ¶
func FromCluster(in *optimizev1beta2.Experiment) (experimentsv1alpha1.ExperimentName, *experimentsv1alpha1.Experiment, *experimentsv1alpha1.TrialAssignments, error)
FromCluster converts cluster state to API state
func FromClusterTrial ¶
func FromClusterTrial(t *optimizev1beta2.Trial) *experimentsv1alpha1.TrialValues
FromClusterTrial converts cluster state to API state
func IsServerSyncEnabled ¶
func IsServerSyncEnabled(exp *optimizev1beta2.Experiment) bool
IsServerSyncEnabled checks to see if server synchronization is enabled.
func NewApplicationAPI ¶
func NewExperimentAPI ¶
func ToCluster ¶
func ToCluster(exp *optimizev1beta2.Experiment, ee *experimentsv1alpha1.Experiment)
ToCluster converts API state to cluster state
func ToClusterTrial ¶
func ToClusterTrial(t *optimizev1beta2.Trial, suggestion *experimentsv1alpha1.TrialAssignments)
ToClusterTrial converts API state to cluster state
Types ¶
This section is empty.