Documentation ¶
Index ¶
- func FuncMap() template.FuncMap
- type Engine
- func (e *Engine) RenderHelmValue(helmValue *redskyv1beta1.HelmValue, trial *redskyv1beta1.Trial) (string, error)
- func (e *Engine) RenderMetricQueries(metric *redskyv1beta1.Metric, trial *redskyv1beta1.Trial, ...) (string, string, error)
- func (e *Engine) RenderPatch(patch *redskyv1beta1.PatchTemplate, trial *redskyv1beta1.Trial) ([]byte, error)
- type MetricData
- type PatchData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
Engine is used to render Go text templates
func (*Engine) RenderHelmValue ¶
func (e *Engine) RenderHelmValue(helmValue *redskyv1beta1.HelmValue, trial *redskyv1beta1.Trial) (string, error)
RenderHelmValue returns a rendered string of the supplied Helm value
func (*Engine) RenderMetricQueries ¶
func (e *Engine) RenderMetricQueries(metric *redskyv1beta1.Metric, trial *redskyv1beta1.Trial, target runtime.Object) (string, string, error)
RenderMetricQueries returns the metric query and the metric error query
func (*Engine) RenderPatch ¶
func (e *Engine) RenderPatch(patch *redskyv1beta1.PatchTemplate, trial *redskyv1beta1.Trial) ([]byte, error)
RenderPatch returns the JSON representation of the supplied patch template (input can be a Go template that produces YAML)
type MetricData ¶
type MetricData struct { // Trial metadata Trial metav1.ObjectMeta // The time at which the trial run started (possibly adjusted) StartTime time.Time // The time at which the trial run completed CompletionTime time.Time // The duration of the trial run expressed as a Prometheus range value Range string // Trial assignments Values map[string]interface{} // List of pods from the trial namespace (only available for "pods" type metrics) Pods *corev1.PodList }
MetricData represents a trial during metric evaluation
type PatchData ¶
type PatchData struct { // Trial metadata Trial metav1.ObjectMeta // Trial assignments Values map[string]interface{} }
PatchData represents a trial during patch evaluation
Click to show internal directories.
Click to hide internal directories.