server

package
v2.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
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

FromCluster converts cluster state to API state

func FromClusterTrial

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 NewApplicationAPI(ctx context.Context, uaComment string) (applications.API, error)

func NewExperimentAPI

func NewExperimentAPI(ctx context.Context, uaComment string) (experimentsv1alpha1.API, error)

func ToCluster

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.

Jump to

Keyboard shortcuts

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