Documentation
¶
Index ¶
- Constants
- func NextTrialNamespace(c client.Client, ctx context.Context, exp *redskyv1alpha1.Experiment, ...) (string, error)
- func PopulateTrialFromTemplate(exp *redskyv1alpha1.Experiment, t *redskyv1alpha1.Trial)
- func UpdateStatus(exp *redskyv1alpha1.Experiment, trialList *redskyv1alpha1.TrialList) bool
Constants ¶
View Source
const ( // PhaseCreated indicates that the experiment has been created on the remote server but is not receiving trials PhaseCreated string = "Created" // PhasePaused indicates that the experiment has been paused, i.e. the desired replica count is zero PhasePaused = "Paused" // PhaseEmpty indicates there is no record of trials being run in the cluster PhaseEmpty = "Never run" // TODO This is misleading, it could be that we already deleted the trials that ran // PhaseIdle indicates that the experiment is waiting for trials to be manually created PhaseIdle = "Idle" // PhaseRunning indicates that there are actively running trials for the experiment PhaseRunning = "Running" // PhaseCompleted indicates that the experiment has exhausted it's trial budget and is no longer expecting new trials PhaseCompleted = "Completed" // PhaseDeleted indicates that the experiment has been deleted and is waiting for trials to be cleaned up PhaseDeleted = "Deleted" )
TODO Make the constant names better reflect the code, not the text
View Source
const (
// HasTrialFinalizer is a finalizer that indicates an experiment has at least one trial
HasTrialFinalizer = "hasTrialFinalizer.redskyops.dev"
)
Variables ¶
This section is empty.
Functions ¶
func NextTrialNamespace ¶
func NextTrialNamespace(c client.Client, ctx context.Context, exp *redskyv1alpha1.Experiment, trialList *redskyv1alpha1.TrialList) (string, error)
NextTrialNamespace searches for or creates a new namespace to run a new trial in, returning an empty string if no such namespace can be found
func PopulateTrialFromTemplate ¶
func PopulateTrialFromTemplate(exp *redskyv1alpha1.Experiment, t *redskyv1alpha1.Trial)
PopulateTrialFromTemplate creates a new trial for an experiment
func UpdateStatus ¶
func UpdateStatus(exp *redskyv1alpha1.Experiment, trialList *redskyv1alpha1.TrialList) bool
UpdateStatus will ensure the experiment's status matches what is in the supplied trial list; returns true only if changes were necessary
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.